FrameworkElement.FlowDirection FrameworkElement.FlowDirection FrameworkElement.FlowDirection FrameworkElement.FlowDirection Property

定義

取得或設定文字和其他 使用者介面 (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.

備註

相依性屬性使用方式會FlowDirection在此元素上設定。The dependency property usage sets the FlowDirection on this element. 由於屬性值繼承的關係, FlowDirection在專案上設定可能會FlowDirection在所有未設定FlowDirection于本機的子專案上, 或透過其他方式 (例如樣式) 設定。Because 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的父元素時, 附加的屬性用法才會相關property.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

<object 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:

< object FrameworkElement.FlowDirection="FlowDirection"/>< object FrameworkElement.FlowDirection="FlowDirection"/>

相依性屬性資訊Dependency Property Information

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

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

適用於