VisualStyleRenderer.SetParameters Method (String, Int32, Int32)
![]() |
---|
The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience. |
Sets this VisualStyleRenderer to the visual style element represented by the specified class, part, and state values.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Parameters
- className
-
Type:
System.String
The new value of the Class property.
- part
-
Type:
System.Int32
The new value of the Part property.
- state
-
Type:
System.Int32
The new value of the State property.
Exception | Condition |
---|---|
ArgumentException | The combination of className, part, and state is not defined by the current visual style. |
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. |
This method checks the value of the IsSupported property internally. Before calling this method, you should call the IsElementDefined method to verify that the current visual style provides a definition for the element specified by the className, part, and state parameters.
Available since 2.0