Documentation for this section has not yet been entered.
If you are drawing a custom control, use this property to decide whether to draw the control with or without visual styles, so that its appearance is consistent with other controls in the application.
The following table shows the four conditions that must exist for Application.RenderWithVisualStyles to return true.
The operating system supports visual styles |
To verify this condition separately, use the System.Windows.Forms.VisualStyles.VisualStyleInformation.IsSupportedByOS property of the System.Windows.Forms.VisualStyles.VisualStyleInformation class. |
The user has enabled visual styles in the operating system |
To verify this condition separately, use the System.Windows.Forms.VisualStyles.VisualStyleInformation.IsEnabledByUser property of the System.Windows.Forms.VisualStyles.VisualStyleInformation class. |
Visual styles are enabled in the application |
Visual styles can be enabled in an application by calling the Application.EnableVisualStyles method or by using an application manifest that specifies that ComCtl32.dll version 6 or later will be used to draw controls. |
Visual styles are being used to draw the client area of application windows |
To verify this condition separately, use the Application.VisualStyleState property of the System.Windows.Forms.Application class and verify that it has the value System.Windows.Forms.VisualStyles.VisualStyleState.ClientAreaEnabled or System.Windows.Forms.VisualStyles.VisualStyleState.ClientAndNonClientAreasEnabled. |