Block.FlowDirection 属性

定义

获取或设置 Block 元素中内容流的相对方向。

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 值之一,指定相对流动方向。 默认值为 LeftToRight

示例

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

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

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

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

注解

获取此属性将返回当前有效的流动方向。 设置此属性将导致 Block 元素的内容重新沿指示的方向流动。

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

注意

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

依赖项属性信息

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

适用于