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

範例

下列範例示範如何設定 FlowDirectionBlock 專案的屬性 () 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 項目的內容依指示的方向重新流動。

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

注意

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

相依性屬性資訊

識別碼欄位 FlowDirectionProperty
中繼資料屬性設定為 true Inherits, AffectsParentArrange

適用於