共用方式為


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

範例

下列範例示範如何設定 Block 元素的 FlowDirection 屬性 (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 項目的內容在指示的方向重新流動。

內容的流程方向通常對應於所表示語言的內在流程方向。 希伯來文和阿拉伯文是自然從右至左流動的語言範例。 英文、德文和俄文是自然從左至右流動的語言範例。

注意

此屬性的值不會自動變更,以符合操作系統所使用的語言。 如果您需要使用不同的值 n 預設值LeftToRight,您必須自行指定。

相依性屬性資訊

標識元欄位 FlowDirectionProperty
設定為 true 的元數據屬性 InheritsAffectsParentArrange

適用於