Table of Contents

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

TextRunCollection

Properties

LineCount

Gets the number of lines in the text editor.

public int LineCount { get; }

Property Value

int

ScrollingStyle

Gets or sets the scrolling style of this TextFlow.

public ScrollingStyle ScrollingStyle { get; set; }

Property Value

ScrollingStyle

TextAlignment

Gets or sets the text alignment of this TextFlow.

public TextAlignment TextAlignment { get; set; }

Property Value

TextAlignment

TopLine

Gets or sets the top line to display.

public int TopLine { get; set; }

Property Value

int

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 int

The available width for the TextFlow.

availableHeight int

The available height for the TextFlow.

desiredWidth int

The desired width of the TextFlow.

desiredHeight int

The 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 ButtonEventArgs

The button event arguments.

OnRender(DrawingContext)

Overrides the base class OnRender method to render the text.

public override void OnRender(DrawingContext dc)

Parameters

dc DrawingContext

The drawing context.