VisualStyleElement.State 属性

定义

获取一个值,该值指示此 VisualStyleElement 表示的视觉样式元素的状态。Gets a value indicating the state of the visual style element that this VisualStyleElement represents.

public:
 property int State { int get(); };
public int State { get; }
member this.State : int
Public ReadOnly Property State As Integer

属性值

一个表示视觉样式元素的状态的值。A value that represents the state of a visual style element.

注解

视觉样式部件可以有一个或多个可视状态。A visual style part can have one or more visual states. 例如,表示单选按钮的视觉样式元素可以处于禁用、选中或取消选中状态。For example, a visual style element that represents a radio button can be in the disabled, checked, or unchecked state.

状态值是从1到为特定部分定义的状态数之间的整数。State values are integers that range from 1 to the number of states defined for a particular part. 有关视觉样式类、部件和状态的详细信息,请参阅位于https://msdn.microsoft.com/library上的 Windows Shell 文档中的 "部件和状态"。For more information on visual style classes, parts, and states, see "Parts and States" in the Windows Shell documentation located at https://msdn.microsoft.com/library.

适用于

另请参阅