TextReadingOrder enumeration

Applies to Windows and Windows Phone

Provides a value for TextReadingOrder properties.

Syntax


public enum TextReadingOrder


<object property="textReadingOrderMemberName"/>

Attributes

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

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.

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

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

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

See also

FlowDirection
RichTextBlock.TextReadingOrder
TextBlock.TextReadingOrder
How to support bidirectional UI

 

 

Show:
© 2014 Microsoft