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将其Mode属性设置为RelativeSourceMode.FindAncestor值的时, 将发生 RelativeSource 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.

适用于

另请参阅