An object which activates application-wide visual style enhancement until it is disposed.
For a list of all members of this type, see VisualStyleContext Members.
System.Object
Skybound.VisualStyles.VisualStyleContext
Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.
The standard Windows Forms controls do not draw properly when visual styles are enabled. For example, the TabPage control draws a gray background instead of the properly themed gradient background. Transparent controls placed on tab pages also draw this gray background, even when the tab page itself is properly themed. Furthermore, the Image property is ignored and no image is drawn on Button, CheckBox, and RadioButton controls.
The VisualStyleContext class fixes these problems. When you create a new VisualStyleContext, VisualStyles it will use its internal drawing routines to enhance all the controls in your application. This means that transparent controls will draw properly on tab pages, and images will be displayed properly on Button, CheckBox, and RadioButton controls. Also, controls that should have transparent backgrounds (such as Label and TrackBar, and read-only TextBox controls) are drawn correctly.
To learn how to use a VisualStyleContext in your application, please refer to 1. Enabling VisualStyles in the Programmer's Guide.
Namespace: Skybound.VisualStyles
Assembly: Skybound.VisualStyles (in Skybound.VisualStyles.dll)
VisualStyleContext Members | Skybound.VisualStyles Namespace