VisualStyleRenderer Constructor (String, Int32, Int32)

 
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.

Initializes a new instance of the VisualStyleRenderer class using the given class, part, and state values.

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

public VisualStyleRenderer(
	string className,
	int part,
	int state
)

Parameters

className
Type: System.String

The class name of the element that this VisualStyleRenderer will represent.

part
Type: System.Int32

The part of the element that this VisualStyleRenderer will represent.

state
Type: System.Int32

The state of the element that this VisualStyleRenderer will represent.

Exception Condition
InvalidOperationException

The operating system does not support visual styles.

-or-

Visual styles are disabled by the user in the operating system.

-or-

Visual styles are not applied to the client area of application windows.

ArgumentException

The combination of className, part, and state is not defined by the current visual style.

This constructor uses the className, part, and state parameters to initialize the Class, Part, and State properties.

Before using this constructor, you should call the staticIsElementDefined method to verify whether the current visual style provides a definition for the element specified by the className, part, and state parameters.

.NET Framework
Available since 2.0
Return to top
Show: