FrameworkElement.FlowDirection 屬性

定義

取得或設定文字和其他 使用者介面 (UI)user interface (UI) 項目在控制其配置的任何父項目中的流向。Gets or sets the direction that text and other 使用者介面 (UI)user interface (UI) elements flow within any parent element that controls their layout.

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

屬性值

文字和其他 UIUI 項目在其父項目中的流向,以列舉值表示。The direction that text and other UIUI elements flow within their parent element, as a value of the enumeration. 預設值是 LeftToRightThe default value is LeftToRight.

屬性

備註

相依性屬性使用方式會在此元素上設定 FlowDirectionThe dependency property usage sets the FlowDirection on this element. 由於屬性值繼承的關係,在專案上設定 FlowDirection 可能會在所有未 FlowDirection 設定于本機或透過其他方式(例如樣式)的子項目上設定 FlowDirectionBecause of property value inheritance, setting FlowDirection on an element can potentially set FlowDirection on all child elements that did not set FlowDirection locally or though other means such as styles.

這個屬性不會自動設定為任何應用程式文化特性資訊的一部分,因為元素可能包含不一定要遵守文化特性資訊所隱含之一般流程方向的內容。This property is not automatically set as part of any application culture information, because an element might contain content that is not necessarily intended to obey the general flow direction implied by the culture information. 如需全球化考慮的詳細資訊,請參閱WPF 的全球化For more information on globalization considerations, see Globalization for WPF.

這個屬性具有已定義的 通用語言執行平台 (CLR)common language runtime (CLR) 屬性存取子,因此它會做為相依性屬性。This property has a defined 通用語言執行平台 (CLR)common language runtime (CLR) property accessor, so it functions as a dependency property. 不過,它也會註冊為附加的,因此它也可以當做附加屬性來運作。However, it is also registered as attached, so it can also function as an attached property. 附加的註冊主要是為了支援屬性值繼承,但屬性也可以用來做為真正的附加屬性。The attached registration is mainly so that property value inheritance is supported, but the property can also be used as a true attached property. 只有當您想要設定流程方向的物件具有在其上執行配置的 FrameworkElement 父元素、本身不是 FrameworkElement,而且尚未有更直接定義的 FlowDirection 屬性時,附加屬性用法才會相關。The attached property usage is only relevant if the object you intend to set the flow direction on has a FrameworkElement parent element that performs layout upon it, is itself not a FrameworkElement, and does not already have a more directly defined FlowDirection property. (某些非固定格式檔類別,例如 BlockInline 會定義自己的 FlowDirection,而這個屬性也可以設定流程方向。(Some of the flow document classes such as Block and Inline define their own FlowDirection, and this property can also set the flow direction. 屬性值接著會由最終內容主機讀取,而不需要附加屬性使用方式)。The property value is then read by the eventual content host without requiring attached property usage.)

XAML Attribute UsageXAML Attribute Usage

<物件 system.windows.frameworkelement.flowdirection= "FlowDirection"/><object FlowDirection="FlowDirection"/>

XAML 文字使用方式XAML Text Usage

這個屬性也可以在不是 FrameworkElement 衍生類別的類別上設定,方法如下 XAMLXAML 附加屬性使用方式:This property can also be set on classes that are not FrameworkElement derived classes, by the following XAMLXAML attached property usage:

<物件FrameworkElement.system.windows.frameworkelement.flowdirection= "FlowDirection"/>< object FrameworkElement.FlowDirection="FlowDirection"/>

相依性屬性資訊Dependency Property Information

識別碼欄位Identifier field FlowDirectionProperty
設定為 true 的中繼資料屬性Metadata properties set to true AffectsMeasureAffectsParentArrangeInheritsAffectsMeasure, AffectsParentArrange, Inherits

這個屬性同時是相依性屬性和附加屬性。請參閱備註。This property is both a dependency property and an attached property; see Remarks.

適用於