UIElement.IsEnabledCore Property


获取一个值,该值成为派生类中 IsEnabled 的返回值。Gets a value that becomes the return value of IsEnabled in derived classes.

 virtual property bool IsEnabledCore { bool get(); };
protected virtual bool IsEnabledCore { get; }
member this.IsEnabledCore : bool
Protected Overridable ReadOnly Property IsEnabledCore As Boolean

Property Value


如果启用此元素,则为 true;否则为 falsetrue if the element is enabled; otherwise, false.

Notes to Inheritors

此属性的默认实现会缓存值,还会计算是否已启用此元素的父元素。The default implementation of this property caches the value and also calculates whether the parent element of this element is enabled. (如果未启用父元素,则不能在实际 用户界面 (UI)user interface (UI)中有效地启用子元素。)如果选择重写此实现,请确保调用基实现以保留此行为。(If the parent is not enabled, the child element cannot be effectively enabled in practical 用户界面 (UI)user interface (UI).) If you choose to override this implementation, make certain that you call the base implementation to preserve this behavior.

ScrollBar 类提供此属性的现有重写实现。The ScrollBar class provides an existing override implementation of this property. 此重写确定内容显示区域内的内容是否超出可用区域。This override determines whether the content inside the content presentation area exceeds the available area. 如果内容超出了区域,则会启用滚动条部分。If the content does exceed the area, the scrollbar portion is enabled. 否则,不会启用滚动条。Otherwise, the scrollbar is not enabled.

Applies to

See also