FlexGrid for WinForms | ComponentOne
FlexGrid for WinForms Task-Based Help / Customizing Appearance Using Visual Styles
In This Topic
    Customizing Appearance Using Visual Styles
    In This Topic

    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.

    In the Designer

    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.

    In Code

    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;
    

    Custom Visual Style

    No visual style is applied:

    Image illustrating custom visual style.

    Office2007Black Visual Style

    The Office 2007 Black color scheme:

    Image illustrating Office 2007 Black color scheme.

    Office2007Blue Visual Style

    The Office 2007 Blue color scheme:

    Image illustrating Office 2007 Blue color scheme.

    Office2007Silver Visual Style

    The Office 2007 Silver color scheme.


    Image illustrating Office 2007 Silver color scheme.

    Office2010Blue Visual Style

    The Office 2010 Blue color scheme:


    Image illustrating Office 2010 Blue color scheme.

    Office2010Silver Visual Style

    The Office 2010 Silver color scheme:

    Image illustrating Office2010Silver Visual Style

    Office2010Black Visual Style

    The Office 2010 Black color scheme:


    Image illustrating Office 2010 Black color scheme

    System Visual Style

    The current system settings:

    Image illustrating System Visual Style.
    Note: Visual styles are not supported in .NET 5 version.