Stride

OPEN / CLOSE
  • Features
  • Blog
  • Documentation
  • Community
(icon) Download

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

OPEN / CLOSE
  • English
  • 日本語
    Show / Hide Table of Contents

    ScrollingText Class

    Namespace: Stride.UI.Controls
    Assembly: Stride.UI.dll

    A text viewer that scrolls automatically the text from right to left.

    System.Object → UIElement → TextBlock → ScrollingText
    Derived from ScrollingText:

    [DataContract("ScrollingText")]
    public class ScrollingText : TextBlock, IUIElementUpdate, IUIElementChildren, IIdentifiable
    Name Description
    Constructors
    ScrollingText()
    Properties
    AccumulatedWidth

    The total accumulated width of the scrolling text since the last call the Stride.UI.Controls.ScrollingText.ResetDisplayingText

    DesiredCharacterNumber

    Gets or sets the desired number of character in average to display at a given time. This value is taken in account during the measurement stage of the element.

    RepeatText

    Gets or sets the a value indicating if the text message must be repeated (wrapped) or not.

    ScrollingOffset

    The current offset of the text in the Ox axis.

    ScrollingSpeed

    Gets or sets the scrolling speed of the text. The unit is in virtual pixels.

    TextToDisplay
    Methods
    AppendText(String)

    Append the provided text to the end of the current Text without restarting the display to the begin of the Text.

    ArrangeOverride(Vector3)
    ClearText()

    Clear the currently scrolling text.

    MeasureOverride(Vector3)
    MeasureSize()

    Measure the size of the ScrollingText element.

    OnTextChanged()
    Update(GameTime)
    | Improve this Doc View Source

    Constructors


    ScrollingText()

    public ScrollingText()
    | Improve this Doc View Source

    Properties


    AccumulatedWidth

    The total accumulated width of the scrolling text since the last call the Stride.UI.Controls.ScrollingText.ResetDisplayingText

    public float AccumulatedWidth { get; }
    Property Value
    Type Description
    System.Single

    DesiredCharacterNumber

    Gets or sets the desired number of character in average to display at a given time. This value is taken in account during the measurement stage of the element.

    [DataMember]
    [Display(null, "Behavior")]
    public uint DesiredCharacterNumber { get; set; }
    Property Value
    Type Description
    System.UInt32

    RepeatText

    Gets or sets the a value indicating if the text message must be repeated (wrapped) or not.

    [DataMember]
    [Display(null, "Behavior")]
    public bool RepeatText { get; set; }
    Property Value
    Type Description
    System.Boolean

    ScrollingOffset

    The current offset of the text in the Ox axis.

    public float ScrollingOffset { get; }
    Property Value
    Type Description
    System.Single

    ScrollingSpeed

    Gets or sets the scrolling speed of the text. The unit is in virtual pixels.

    [DataMember]
    [DataMemberRange(0, 3)]
    [Display(null, "Behavior")]
    public float ScrollingSpeed { get; set; }
    Property Value
    Type Description
    System.Single
    Remarks

    The value is coerced in the range [0, System.Single.MaxValue].


    TextToDisplay

    public override string TextToDisplay { get; }
    Property Value
    Type Description
    System.String
    Overrides
    TextBlock.TextToDisplay
    | Improve this Doc View Source

    Methods


    AppendText(String)

    Append the provided text to the end of the current Text without restarting the display to the begin of the Text.

    public void AppendText(string text)
    Parameters
    Type Name Description
    System.String text

    The text to append


    ArrangeOverride(Vector3)

    protected override Vector3 ArrangeOverride(Vector3 finalSizeWithoutMargins)
    Parameters
    Type Name Description
    Vector3 finalSizeWithoutMargins
    Returns
    Type Description
    Vector3
    Overrides
    TextBlock.ArrangeOverride(Vector3)

    ClearText()

    Clear the currently scrolling text.

    public void ClearText()

    MeasureOverride(Vector3)

    protected override Vector3 MeasureOverride(Vector3 availableSizeWithoutMargins)
    Parameters
    Type Name Description
    Vector3 availableSizeWithoutMargins
    Returns
    Type Description
    Vector3
    Overrides
    TextBlock.MeasureOverride(Vector3)

    MeasureSize()

    Measure the size of the ScrollingText element.

    public Vector3 MeasureSize()
    Returns
    Type Description
    Vector3

    The size of the element


    OnTextChanged()

    protected override void OnTextChanged()
    Overrides
    TextBlock.OnTextChanged()

    Update(GameTime)

    protected override void Update(GameTime time)
    Parameters
    Type Name Description
    GameTime time
    Overrides
    UIElement.Update(GameTime)

    Inherited Members

    TextBlock.ActualTextSize
    TextBlock.Text
    TextBlock.Font
    TextBlock.TextSize
    TextBlock.TextColor
    TextBlock.TextAlignment
    TextBlock.WrapText
    TextBlock.DoNotSnapText
    TextBlock.SynchronousCharacterGeneration
    TextBlock.CalculateTextSize()
    TextBlock.CalculateTextSize(String)
    UIElement.InputCategory
    UIElement.PanelCategory
    UIElement.AppearanceCategory
    UIElement.BehaviorCategory
    UIElement.LayoutCategory
    UIElement.MiscCategory
    UIElement.MarginInternal
    UIElement.ArrangeChanged
    UIElement.LocalMatrixChanged
    UIElement.Id
    UIElement.DependencyProperties
    UIElement.LocalMatrix
    UIElement.BackgroundColor
    UIElement.Opacity
    UIElement.Visibility
    UIElement.ClipToBounds
    UIElement.DrawLayerNumber
    UIElement.IsEnabled
    UIElement.CanBeHitByUser
    UIElement.Width
    UIElement.Height
    UIElement.Depth
    UIElement.Size
    UIElement.HorizontalAlignment
    UIElement.VerticalAlignment
    UIElement.DepthAlignment
    UIElement.Margin
    UIElement.MinimumWidth
    UIElement.MinimumHeight
    UIElement.MinimumDepth
    UIElement.MaximumWidth
    UIElement.MaximumHeight
    UIElement.MaximumDepth
    UIElement.DefaultWidth
    UIElement.DefaultHeight
    UIElement.DefaultDepth
    UIElement.Name
    UIElement.DesiredSize
    UIElement.DesiredSizeWithMargins
    UIElement.IsArrangeValid
    UIElement.IsMeasureValid
    UIElement.WorldMatrix
    UIElement.DepthBias
    UIElement.LayoutingContext
    UIElement.VisualChildrenCollection
    UIElement.InvalidateArrange()
    UIElement.InvalidateMeasure()
    UIElement.OnNameChanged()
    UIElement.IsHierarchyEnabled
    UIElement.IsVisible
    UIElement.IsCollapsed
    UIElement.Parent
    UIElement.VisualParent
    UIElement.VisualChildren
    UIElement.HitableChildren
    UIElement.RenderOpacity
    UIElement.RenderSize
    UIElement.RenderOffsets
    UIElement.ActualWidth
    UIElement.ActualHeight
    UIElement.ActualDepth
    UIElement.IUIElementChildren.Children
    UIElement.EnumerateChildren()
    UIElement.Measure(Vector3)
    UIElement.Arrange(Vector3, Boolean)
    UIElement.CollapseOverride()
    UIElement.PropagateCollapseToChild(UIElement)
    UIElement.FindName(String)
    UIElement.SetParent(UIElement, UIElement)
    UIElement.SetVisualParent(UIElement, UIElement)
    UIElement.Intersects(Ray, Vector3)
    UIElement.IUIElementUpdate.Update(GameTime)
    UIElement.IUIElementUpdate.UpdateWorldMatrix(Matrix, Boolean)
    UIElement.IUIElementUpdate.UpdateElementState(Int32)
    UIElement.UpdateWorldMatrix(Matrix, Boolean)
    UIElement.CalculateSizeWithThickness(Vector3, Thickness)
    UIElement.CalculateSizeWithoutThickness(Vector3, Thickness)
    UIElement.CalculateAdjustmentOffsets(Thickness, Vector3, Vector3)
    UIElement.IsTouched
    UIElement.MouseOverState
    UIElement.RequiresMouseOverUpdate
    UIElement.RaiseEvent(RoutedEventArgs)
    UIElement.AddHandler<T>(RoutedEvent<T>, EventHandler<T>, Boolean)
    UIElement.RemoveHandler<T>(RoutedEvent<T>, EventHandler<T>)
    UIElement.MouseOverStateChanged
    UIElement.PreviewTouchDown
    UIElement.PreviewTouchMove
    UIElement.PreviewTouchUp
    UIElement.TouchDown
    UIElement.TouchEnter
    UIElement.TouchLeave
    UIElement.TouchMove
    UIElement.TouchUp
    UIElement.OnPreviewTouchDown(TouchEventArgs)
    UIElement.OnPreviewTouchMove(TouchEventArgs)
    UIElement.OnPreviewTouchUp(TouchEventArgs)
    UIElement.OnTouchDown(TouchEventArgs)
    UIElement.OnTouchEnter(TouchEventArgs)
    UIElement.OnTouchLeave(TouchEventArgs)
    UIElement.OnTouchMove(TouchEventArgs)
    UIElement.OnTouchUp(TouchEventArgs)

    Extension Methods

    ComponentBaseExtensions.DisposeBy<T>(T, ICollectorHolder)
    ComponentBaseExtensions.RemoveDisposeBy<T>(T, ICollectorHolder)
    UIElementExtensions.SetPanelZIndex(UIElement, Int32)
    UIElementExtensions.GetPanelZIndex(UIElement)
    UIElementExtensions.SetCanvasRelativeSize(UIElement, Vector3)
    UIElementExtensions.GetCanvasRelativeSize(UIElement)
    UIElementExtensions.SetCanvasRelativePosition(UIElement, Vector3)
    UIElementExtensions.GetCanvasRelativePosition(UIElement)
    UIElementExtensions.SetCanvasAbsolutePosition(UIElement, Vector3)
    UIElementExtensions.GetCanvasAbsolutePosition(UIElement)
    UIElementExtensions.SetCanvasPinOrigin(UIElement, Vector3)
    UIElementExtensions.GetCanvasPinOrigin(UIElement)
    UIElementExtensions.SetGridColumn(UIElement, Int32)
    UIElementExtensions.GetGridColumn(UIElement)
    UIElementExtensions.SetGridRow(UIElement, Int32)
    UIElementExtensions.GetGridRow(UIElement)
    UIElementExtensions.SetGridLayer(UIElement, Int32)
    UIElementExtensions.GetGridLayer(UIElement)
    UIElementExtensions.SetGridColumnSpan(UIElement, Int32)
    UIElementExtensions.GetGridColumnSpan(UIElement)
    UIElementExtensions.SetGridRowSpan(UIElement, Int32)
    UIElementExtensions.GetGridRowSpan(UIElement)
    UIElementExtensions.SetGridLayerSpan(UIElement, Int32)
    UIElementExtensions.GetGridLayerSpan(UIElement)
    VisualTreeHelper.FindVisualChildOfType<T>(UIElement, String)
    VisualTreeHelper.FindVisualChildrenOfType<T>(UIElement)
    VisualTreeHelper.FindVisualParentOfType<T>(UIElement)
    VisualTreeHelper.FindVisualRoot(UIElement)
    • Improve this Doc
    • View Source
    In This Article

    Back to top

    Copyright © 2019-2021 .NET Foundation and Contributors
    Supported by the .NET Foundation