语言

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

属性值

枚举的值。 默认值为 Default。

注解

元素树中的某些边界设置为 InheritanceBehavior 故意限制继承行为的范围、强制资源查找以检查应用程序资源,或防止 RelativeSource FindAncestor 查找查询当前元素或任何其他内容。 当绑定使用 RelativeSource 其 Mode 属性设置为 RelativeSourceMode.FindAncestor 值的绑定时,将发生 RelativeSource FindAncestor 查找。

如果希望派生类设置此属性,则应在静态构造函数或其他初始化例程中执行此操作。

适用于

另请参阅