FrameworkElement.InheritanceBehavior 屬性

定義

取得或設定屬性值繼承的範圍限制、資源索引鍵查閱,以及 RelativeSource FindAncestor 查閱。

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

屬性值

InheritanceBehavior

列舉值。 預設為 Default

備註

專案樹狀結構中的特定界限會 InheritanceBehavior 設定為刻意限制繼承行為的範圍、強制資源查閱來檢查應用程式資源,或防止 RelativeSource FindAncestor 查閱查詢目前專案或任何其他專案。 RelativeSource FindAncestor 查閱會在系結使用 RelativeSourceMode 屬性設定為 RelativeSourceMode.FindAncestor 值的 時發生。

如果您想要讓衍生類別設定這個屬性,您應該在靜態建構函式或其他初始化常式中執行此動作。

適用於

另請參閱