Inline.FlowDirection 属性

定义

获取或设置一个值,该值指定 Inline 元素中内容流的相对方向。

public:
 property System::Windows::FlowDirection FlowDirection { System::Windows::FlowDirection get(); void set(System::Windows::FlowDirection value); };
public System.Windows.FlowDirection FlowDirection { get; set; }
member this.FlowDirection : System.Windows.FlowDirection with get, set
Public Property FlowDirection As FlowDirection

属性值

FlowDirection 枚举的一个成员,它指定相对流动方向。 获取此属性将返回当前有效的流动方向。 设置此属性将导致 Inline 元素的内容重新沿指示的方向流动。

默认值是 LeftToRight

示例

以下示例演示如何设置 FlowDirection 元素的 属性 Inline (Run) 。

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

下面的示例演示如何以编程方式设置 FlowDirection 属性。

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

注解

内容的流方向通常对应于所表示语言的先天流方向。 希伯来语和阿拉伯语提供了从右到左自然流动的语言示例。 英语、德语和俄语提供了从左到右自然流动的语言示例。

注意

此属性的值不会自动更改以匹配操作系统使用的语言。 如果需要使用不同的值,则必须自行指定默认值 LeftToRight

依赖项属性信息

标识符字段 FlowDirectionProperty
元数据属性设置为 true Inherits, AffectsParentArrange

适用于