[]
        
(Showing Draft Content)

C1Themes and the Visual Style Property

Many ComponentOne WinForms controls include a property called VisualStyle, of an enum type defined in the control assembly, but following a common naming pattern for the type and possible values. Typically, the enum type is called VisualStyle, with values such as Office2010Blue, Office2010Black, and so on. C1Themes are designed to provide a more powerful and flexible mechanism for adjusting the look of controls. Still there is obvious overlap between the two mechanisms, with the possibility of conflicts. The rules for dealing with this overlap are as follows:

  • Theme sections for all C1 controls include a VisualStyle property that can be specified by the theme.
  • By default and in all supplied themes, those properties are set to 'Custom' so that the VisualStyle does not interfere with applying other properties.
  • Setting VisualStyle in a theme to anything other than custom sets the corresponding property on the target control and disables applying all other theme properties. (In the C1ThemeDesigner, this actually disables the rest of the theme tree for the control.)

While we recognize that backward compatibility or other considerations may require the use of VisualStyle rather than themes to customize the look of your application, we recommend that if possible you use C1Themes as they provide a more powerful and flexible mechanism for that. Support for visual styles in new controls will be phased out as themes will replace it.