Class TextFlow
- Namespace
- nanoFramework.Presentation.Controls
- Assembly
- nanoFramework.Graphics.dll
Represents a flow of text, composed of one or more TextRuns, that can be displayed in a UIElement container. Provides properties to control scrolling, alignment, and layout.
public class TextFlow : UIElement
- Inheritance
-
TextFlow
- Inherited Members
- Extension Methods
Constructors
TextFlow()
Initializes a new instance of the TextFlow class.
public TextFlow()
Fields
TextRuns
Gets or sets the collection of TextRuns that make up this TextFlow.
public TextRunCollection TextRuns
Field Value
Properties
LineCount
Gets the number of lines in the text editor.
public int LineCount { get; }
Property Value
ScrollingStyle
Gets or sets the scrolling style of this TextFlow.
public ScrollingStyle ScrollingStyle { get; set; }
Property Value
TextAlignment
Gets or sets the text alignment of this TextFlow.
public TextAlignment TextAlignment { get; set; }
Property Value
TopLine
Gets or sets the top line to display.
public int TopLine { get; set; }
Property Value
Methods
MeasureOverride(int, int, out int, out int)
Measures the desired size of the TextFlow given available width and height.
protected override void MeasureOverride(int availableWidth, int availableHeight, out int desiredWidth, out int desiredHeight)
Parameters
availableWidth
intThe available width for the TextFlow.
availableHeight
intThe available height for the TextFlow.
desiredWidth
intThe desired width of the TextFlow.
desiredHeight
intThe desired height of the TextFlow.
OnButtonDown(ButtonEventArgs)
Overrides the base class OnButtonDown method to handle button events.
protected override void OnButtonDown(ButtonEventArgs e)
Parameters
e
ButtonEventArgsThe button event arguments.
OnRender(DrawingContext)
Overrides the base class OnRender method to render the text.
public override void OnRender(DrawingContext dc)
Parameters
dc
DrawingContextThe drawing context.