Edit

Share via


FlowDirection Enum

Definition

Defines constants that specify the content flow direction for text and user interface (UI) elements.

C#
[System.Windows.Localizability(System.Windows.LocalizationCategory.None, Readability=System.Windows.Readability.Unreadable)]
public enum FlowDirection
Inheritance
FlowDirection
Attributes

Fields

Name Value Description
LeftToRight 0

Indicates that content should flow from left to right.

RightToLeft 1

Indicates that content should flow from right to left.

Examples

The following example shows how to use the FlowDirection enumeration to set the FlowDirection attribute of a flow content Block element (Paragraph).

XAML
<FlowDocument>
  <Paragraph FlowDirection="LeftToRight">
    This paragraph will flow from left to right.
  </Paragraph>
</FlowDocument>

The following example shows how to use the FlowDirection enumeration programmatically.

C#
Paragraph par = new Paragraph(new Run("This paragraph will flow from left to right."));
par.FlowDirection = FlowDirection.LeftToRight;

Remarks

The flow direction of content typically corresponds to the innate flow direction of the language being represented. Hebrew and Arabic provide examples of languages that naturally flow from right-to-left. English, German, and Russian provide examples of languages that naturally flow from left-to-right.

Applies to

Product Versions
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9