VisualStyleRenderer.IsSupported Property

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Gets a value specifying whether the operating system is using visual styles to draw controls.

Namespace:   System.Windows.Forms.VisualStyles
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

public static bool IsSupported { get; }

Property Value

Type: System.Boolean

true 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.

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.

Verify that the IsSupportedByOS property of the VisualStyleInformation class is true.

The user has enabled visual styles in the operating system.

Verify that the IsEnabledByUser property of the VisualStyleInformation class is true.

Visual styles are being used to draw the client area of application windows.

Verify that the VisualStyleState property of the Application class has the value VisualStyleState.ClientAreaEnabled or VisualStyleState.ClientAndNonClientAreasEnabled.

.NET Framework
Available since 2.0
Return to top
Show: