FlexGrid for WinForms Task-Based Help > Customizing Appearance Using Visual Styles |
To customize the appearance of C1FlexGrid using Visual Styles, set the VisualStyle property to Custom, Office2007Black, Office2007Blue, Office2007Silver, Office2010Blue, Office2010Black, Office2010Silver, or System. This property can be set either in the designer or in code. The following table describes each of the Visual Styles:
Visual Style | Description |
---|---|
Custom | Do not use any visual styles. Render the control using the styles and properties only. |
Office2007Black | Render the control with an appearance based on the Office 2007 Black color scheme. |
Office2007Blue | Render the control with an appearance based on the Office 2007 Blue color scheme. |
Office2007Silver | Render the control with an appearance based on the Office 2007 Silver color scheme. |
System | Render the control with an appearance based on the current system settings. |
Office2010Black | Render the control with an appearance based on the Office 2010 Black color scheme. |
Office2010Silver | Render the control with an appearance based on the Office 2010 Silver color scheme. |
Office2010Blue | Render the control with an appearance based on the Office 2010 Blue color scheme. |
Locate the VisualStyle property in the Properties window and set it to Custom, Office2007Black, Office2007Blue, Office2007Silver, Office2010Blue, Office2010Black, Office2010Silver, or System. In this example, the VisualStyle property is set to Office2007Blue.
Add code to the Form_Load event to set the VisualStyle property to Custom, Office2007Black, Office2007Blue, Office2007Silver, Office2010Blue, Office2010Black, Office2010Silver, or System. The following code sets the VisualStyle property to Office2007Blue:
To write code in Visual Basic
Visual Basic |
Copy Code
|
---|---|
Me.C1FlexGrid1.VisualStyle = C1.Win.C1FlexGrid.VisualStyle.Office2007Blue |
To write code in C#
C# |
Copy Code
|
---|---|
this.c1FlexGrid1.VisualStyle = C1.Win.C1FlexGrid.VisualStyle.Office2007Blue; |
No visual style is applied:
The Office 2007 Black color scheme:
The Office 2007 Blue color scheme:
The Office 2007 Silver color scheme.
The Office 2010 Blue color scheme:
The Office 2010 Silver color scheme:
The Office 2010 Black color scheme:
The current system settings: