# Customizing Appearance Using Visual Styles

This topic provides an insight into customizing Appearance Using Visual Styles.

## Content



Setting the **VisualStyle** property on a **C1Input** control will control the gradients and borders used to paint [C1TextBox](/componentone/api/win/online-input/dotnet-framework-api/C1.Win.C1Input.4.8/C1.Win.C1Input.C1TextBox.html), [C1Label](/componentone/api/win/online-input/dotnet-framework-api/C1.Win.C1Input.4.8/C1.Win.C1Input.C1Label.html), [C1DbNavigator](/componentone/api/win/online-input/dotnet-framework-api/C1.Win.C1Input.4.8/C1.Win.C1Input.C1DbNavigator.html), [C1DropDownControl](/componentone/api/win/online-input/dotnet-framework-api/C1.Win.C1Input.4.8/C1.Win.C1Input.C1DropDownControl.html), [C1DateEdit](/componentone/api/win/online-input/dotnet-framework-api/C1.Win.C1Input.4.8/C1.Win.C1Input.C1DateEdit.html) (including the drop down calendar), [C1NumericEdit](/componentone/api/win/online-input/dotnet-framework-api/C1.Win.C1Input.4.8/C1.Win.C1Input.C1NumericEdit.html) (including the drop down calculator), and [C1Button](/componentone/api/win/online-input/dotnet-framework-api/C1.Win.C1Input.4.8/C1.Win.C1Input.C1Button.html).

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:

DOC-DETAILS-TAG-OPEN

DOC-SUMMARY-TAG-OPEN

To write code in Visual Basic

DOC-SUMMARY-TAG-CLOSE

```vbnet
Me.C1TextBox1.VisualStyle = C1.Win.C1Input.VisualStyle.Office2007Blue
```

DOC-DETAILS-TAG-CLOSE

DOC-DETAILS-TAG-OPEN

DOC-SUMMARY-TAG-OPEN

To write code in C#

DOC-SUMMARY-TAG-CLOSE

```csharp
Me.C1TextBox1.VisualStyle = C1.Win.C1Input.VisualStyle.Office2007Blue
```

DOC-DETAILS-TAG-CLOSE

## See Also

[Customizing the C1DateEdit Control](/componentone/docs/win/online-input/inputforwinformstask/customizingthec1date)