FrameworkElement.InheritanceBehavior FrameworkElement.InheritanceBehavior FrameworkElement.InheritanceBehavior FrameworkElement.InheritanceBehavior Property

定義

取得或設定屬性值繼承的範圍限制、資源索引鍵查閱,以及 RelativeSource FindAncestor 查閱。Gets or sets the scope limits for property value inheritance, resource key lookup, and RelativeSource FindAncestor lookup.

protected public:
 property System::Windows::InheritanceBehavior InheritanceBehavior { System::Windows::InheritanceBehavior get(); void set(System::Windows::InheritanceBehavior value); };
protected internal System.Windows.InheritanceBehavior InheritanceBehavior { get; set; }
member this.InheritanceBehavior : System.Windows.InheritanceBehavior with get, set
Protected Friend Property InheritanceBehavior As InheritanceBehavior

屬性值

列舉值。A value of the enumeration. 預設為 DefaultThe default is Default.

備註

項目中的特定界限樹狀組InheritanceBehavior刻意限制的繼承行為,來檢查應用程式資源,或防止 RelativeSource FindAncestor 查閱查詢目前的項目強制資源查閱範圍或任何進一步。Certain boundaries in the element tree set InheritanceBehavior to deliberately limit the scope of inheritance behavior, to a force resource lookup to check the application resources, or to prevent a RelativeSource FindAncestor lookup from querying the current element or any further. 當使用繫結時,就會發生 RelativeSource FindAncestor 查閱RelativeSource具有其Mode屬性設定為RelativeSourceMode.FindAncestor值。RelativeSource FindAncestor lookup occurs when a binding uses a RelativeSource that has its Mode property set to the RelativeSourceMode.FindAncestor value.

若要讓您設定此屬性的衍生的類別,您應該這麼做在靜態建構函式或其他初始化常式中。If you want your derived class to set this property, you should do so within the static constructor or in other initialization routines.

適用於

另請參閱