VisualStyleRenderer.IsSupported 属性

定义

获取一个值,该值指定操作系统是否正在使用视觉样式绘制控件。Gets a value specifying whether the operating system is using visual styles to draw controls.

public:
 static property bool IsSupported { bool get(); };
public static bool IsSupported { get; }
member this.IsSupported : bool
Public Shared ReadOnly Property IsSupported As Boolean

属性值

如果操作系统支持视觉样式,且用户已经在操作系统中启用了视觉样式并将视觉样式应用于应用程序窗口的工作区,则为 true;否则为 falsetrue if the operating system supports visual styles, the user has enabled visual styles in the operating system, and visual styles are applied to the client area of application windows; otherwise, false.

注解

下表介绍了如何单独检查每个必须为 IsSupported 属性返回 true的条件。The following table describes how to individually check for each of the three conditions that must exist for the IsSupported property to return true.

条件Condition 如何单独确定How to determine separately
操作系统支持视觉样式。The operating system supports visual styles. 验证 VisualStyleInformationtrueIsSupportedByOS 属性。Verify that the IsSupportedByOS property of the VisualStyleInformation class is true.
用户已在操作系统中启用视觉样式。The user has enabled visual styles in the operating system. 验证 VisualStyleInformationtrueIsEnabledByUser 属性。Verify that the IsEnabledByUser property of the VisualStyleInformation class is true.
正在使用视觉样式来绘制应用程序窗口的工作区。Visual styles are being used to draw the client area of application windows. 验证 Application 类的 VisualStyleState 属性的值 VisualStyleState.ClientAreaEnabledVisualStyleState.ClientAndNonClientAreasEnabledVerify that the VisualStyleState property of the Application class has the value VisualStyleState.ClientAreaEnabled or VisualStyleState.ClientAndNonClientAreasEnabled.

适用于