Sets this System.Windows.Forms.VisualStyles.VisualStyleRenderer to the visual style element represented by the specified System.Windows.Forms.VisualStyles.VisualStyleElement.
- element
- A System.Windows.Forms.VisualStyles.VisualStyleElement that specifies the new values of the VisualStyleRenderer.Class, VisualStyleRenderer.Part, and VisualStyleRenderer.State properties.
This method checks the value of the VisualStyleRenderer.IsSupported property internally. Before calling this method, you should call the VisualStyleRenderer.IsElementDefined(VisualStyleElement) method to verify that the current visual style provides a definition for the element specified by the element parameter.