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. 當系結使用RelativeSourceMode屬性設定為RelativeSourceMode.FindAncestor值時, 就會發生 RelativeSource FindAncestor lookup。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.