Block.FlowDirection 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得或設定元素內 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元素()Paragraph的Block屬性。
<FlowDocument>
<Paragraph FlowDirection="LeftToRight">
This paragraph will flow from left to right.
</Paragraph>
</FlowDocument>
下列示範如何以程式設計的方式設定 Typography 屬性。
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 物沿指定方向重新流動。
內容的流程方向通常對應於所表示語言的內在流程方向。 希伯來文和阿拉伯文是自然從右至左流動的語言範例。 英文、德文和俄文是自然從左至右流動的語言範例。
注意
此屬性的值不會自動變更,以符合操作系統所使用的語言。 如果您需要使用不同的值An 預設LeftToRight情況下,你必須自己指定。
相依性屬性資訊
| 項目 | 價值 |
|---|---|
| 標識元欄位 | FlowDirectionProperty |
元資料屬性設為 true |
Inherits、AffectsParentArrange |