Windows Dev Center

TextReadingOrder enumeration

Provides a value for TextReadingOrder properties.

Syntax


public enum TextReadingOrder


<object property="textReadingOrderMemberName"/>

Members

The TextReadingOrder enumeration has these members.

MemberValueDescription
Default0

Do not detect flow direction from content. Use FlowDirection value (if any) for reading order decisions. (Windows 8.1)

UseFlowDirection0

Do not detect flow direction from content. Use FlowDirection value (if any) for reading order decisions. (Starting with Windows 10)

DetectFromContent1

Detect flow direction from text content. For bidirectional text, text containers will infer the reading order for text based on the content. See Remarks.

Remarks

Important  

Starting with Windows 10, the enumeration value 0 has the constant name UseFlowDirection.

The TextReadingOrder properties influences the reading order (left-to-right or right-to-left) of individual UI elements that contain bidirectional text. These properties can be set to TextReadingOrder ="DetectFromContent" so that content can be detected dynamically, rather than using a FlowDirection property on a content parent. The DetectFromContent logic uses the first strong character in each paragraph to determine the reading direction for the paragraph, based on the Unicode Bidirectional Algorithm, P2.

This property can be useful when the base direction of the text is unknown, and may not match the user's language or direction. For more info see How to support bidirectional UI.

If content is coming from data binding, this avoids the need for binding to FlowDirection with a converter that interprets right-to-left locale info that comes from the data.

Unlike FlowDirection and its logic, the reading order logic for DetectFromContent will not affect the alignment of the text within the text control, it just adjusts the order in which blocks of bidirectional text are laid out.

Requirements (Windows 10 device family)

Device family

Universal

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

Windows.UI.Xaml
Windows::UI::Xaml [C++]

Metadata

Windows.Foundation.UniversalApiContract.winmd

Requirements (Windows 8.x and Windows Phone 8.x)

Minimum supported client

Windows 8.1

Minimum supported server

Windows Server 2012 R2

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.UI.Xaml
Windows::UI::Xaml [C++]

Metadata

Windows.winmd

Attributes

[Version(0x06030000)]
[WebHostHidden()]

See also

FlowDirection
PasswordBox.TextReadingOrder
RichEditBox.TextReadingOrder
RichTextBlock.TextReadingOrder
TextBlock.TextReadingOrder
TextBox.TextReadingOrder
How to support bidirectional UI

 

 

Show:
© 2015 Microsoft