FrameworkElement.InheritanceBehavior 屬性
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得或設定屬性值繼承的範圍限制、資源索引鍵查閱,以及 RelativeSource FindAncestor 查閱。
protected public:
property System::Windows::InheritanceBehavior InheritanceBehavior { System::Windows::InheritanceBehavior get(); void set(System::Windows::InheritanceBehavior value); };
C#
protected internal System.Windows.InheritanceBehavior InheritanceBehavior { get; set; }
member this.InheritanceBehavior : System.Windows.InheritanceBehavior with get, set
Protected Friend Property InheritanceBehavior As InheritanceBehavior
列舉值。 預設為 Default。
專案樹狀結構中的特定界限會 InheritanceBehavior 設定為刻意限制繼承行為的範圍、強制資源查閱來檢查應用程式資源,或防止 RelativeSource FindAncestor 查閱查詢目前專案或任何其他專案。 RelativeSource FindAncestor 查閱會在系結使用 RelativeSource 其 Mode 屬性設定為 RelativeSourceMode.FindAncestor 值的 時發生。
如果您想要讓衍生類別設定這個屬性,您應該在靜態建構函式或其他初始化常式中執行此動作。
產品 | 版本 |
---|---|
.NET Framework | 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8 |
Windows Desktop | 3.0, 3.1, 5, 6, 7 |