FlowDirection 枚举

定义

定义一些常量,指定文本和用户界面 (UI) 元素的内容流动方向。Defines constants that specify the content flow direction for text and user interface (UI) elements.

public enum class FlowDirection
[System.Windows.Localizability(System.Windows.LocalizationCategory.None, Readability=System.Windows.Readability.Unreadable)]
public enum FlowDirection
type FlowDirection = 
Public Enum FlowDirection
继承
FlowDirection
属性

字段

LeftToRight 0

指示内容应从左向右流动。Indicates that content should flow from left to right.

RightToLeft 1

指示内容应从右向左流动。Indicates that content should flow from right to left.

示例

下面的示例演示如何FlowDirection使用枚举FlowDirection设置流内容Block元素 (Paragraph) 的特性。The following example shows how to use the FlowDirection enumeration to set the FlowDirection attribute of a flow content Block element (Paragraph).

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

下面的示例演示如何以编程方式FlowDirection使用枚举。The following example shows how to use the FlowDirection enumeration programmatically.

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

注解

内容的流动方向通常对应于所表示语言的原始流方向。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.

适用于