[]
        
(Showing Draft Content)

Themes

In addition to the Visual Styles you can use the C1ThemeController to apply other themes to the C1Input control. You could also create your own theme using the ThemeDesigner.


To customize the appearance of a C1Input control using Themes, add the C1ThemeController to your component tray and set the Themes property to any of the following predefined styles listed below:

Theme Name

Image

Office2007Black

Office2007Black

Office2007Blue

Office2007Blue

Office2007Silver

Office2007Silver

Office2010Black

2010_Black

Office2010Blue

2010_Blue

Office2010Silver

2010_Silver

Office2013DarkGray

Office2013_DarkGrey

Office2013LightGray

Office2013_LightGrey

Office2013White

Office2013_White

ExpressionDark

Themes_ExpressionDark

ExpressionLight

Themes_ExpressionLight

GreenHouse

Themes_GreenHouse

RainerOrange

Themes_RainierOrange

ShinyBlue

Themes_ShinyBlue

Violette

Themes_Violette

VS2013Blue

Themes_VS2013Blue

VS2013Dark

Themes_VS2013Dark

VS2013Light

Themes_VS2013Light

VS2013DarkSolar

Themes_VS2013DarkSolar

VS2013Green

Themes_VS2013Green

VS2013Purple

Themes_VS2013Purple

VS2013Red

Themes_VS2013Red

VS2013Tan

Themes_VS2013Tan

How to apply themes to the C1Input controls at Design Time


To use the C1ThemeController component with any of the C1Input controls, complete the following:

  1. Add any of the C1Input controls, for example C1ComboBox, on the form at design time.

  2. Add the C1ThemeController component to your component tray. The C1ThemeController dialog box appears.

If you use the C1ThemeController 2.0 component a C1ThemeController dialog box appears. The ThemeController dialog box is used to quickly to apply the theme to all themeable controls in the application, all theme-able controls on the form, or different themes on different controls.


The C1ThemeController dialog box lists all of the components that appears on your form. If you have themeable controls on your form before you add the C1ThemeController the dialog box lists all of the components on your form. Each control/component is initially set to none to prevent unintentional loss of property settings on those controls.

  1. In the C1ThemeController dialog box click on the Theme dropdown button next to Form1 and c1ComboBox1 and select one of the predefined themes, for example, Violette.

    combobox

  2. Click OK to save and close the C1ThemeController dialog box.

  3. Run your project and observe that the Violette theme is applied to your Form and C1Combobox.

    combobox

How to Apply Themes to the C1Input Controls Programatically


The following code shows how to programatically apply the built-in theme using the RegisterTheme and SetTheme methods:


To write code in Visual Basic

'Register the theme file with the C1ThemeController
C1.Win.C1Themes.C1ThemeController.RegisterTheme("C:\Users\Documents\Visual Studio 2010\Projects\ThemesProject\ShinyBlue.c1theme")
'Apply it to a control, use the theme name, not the file name
Me.c1ThemeController1.SetTheme(c1ComboBox1, "ShinyBlue")

To write code in C#

//Register the theme file with the C1ThemeController;

C1.Win.C1Themes.C1ThemeController.RegisterTheme(@"C:\Users\Documents\Visual Studio 2010\Projects\ThemesProject\ShinyBlue.c1theme");

//Apply it to a control and use the theme name
this.c1ThemeController1.SetTheme(c1ComboBox1, "ShinyBlue")


In addition to the predefined themes you can customize your theme using the Themes designer. For more information see the Themes for WinForms documentation.

See Also

C1Themes and the VisualStyle Property