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

    Setting the VisualStyle property on a C1Input control will control the gradients and borders used to paint C1TextBox, C1Label, C1DbNavigator, C1DropDownControl, C1DateEdit (including the drop down calendar), C1NumericEdit (including the drop down calculator), and C1Button.

    To customize the appearance of a C1Input control using Visual Styles, set the VisualStyle property to Custom, Office2007Black, Office2007Blue, Office2007Silver, System, Office2010Blue, Office2010Black, or Office2010Silver. 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 No visual style (use styles and appearance properties as usual).
    Office2007Black Style matches Office2007 Black color scheme.
    Office2007Blue Style matches Office2007 Blue color scheme.
    Office2007Silver Style matches Office2007 Silver color scheme.
    System Style matches the current system settings.
    Office2010Blue Style matches Office2010 Blue color scheme.
    Office2010Black Style matches Office2010 Black color scheme.
    Office2010Silver Style matches Office2010 Silver color scheme.

    Using the Designer

    Locate the VisualStyle property in the Properties window and set it to Custom, Office2007Black, Office2007Blue, Office2007Silver, System, Office2010Blue, Office2010Black, or Office2010Silver. In this example, the VisualStyle property is set to Office2007Blue for a C1TextBox control.

    Using the Code Editor

    Add code to the Form_Load event to set the VisualStyle property to Custom, Office2007Black, Office2007Blue, Office2007Silver, or System. The following code sets the VisualStyle property to Office2007Blue for a C1TextBox control:

    To write code in Visual Basic

    Visual Basic
    Copy Code
    Me.C1TextBox1.VisualStyle = C1.Win.C1Input.VisualStyle.Office2007Blue
    

    To write code in C#

    C#
    Copy Code
    Me.C1TextBox1.VisualStyle = C1.Win.C1Input.VisualStyle.Office2007Blue
    
    See Also