Visual styles can be applied to the C1ColorPicker control using VisualStyle property. The smart tag on the top right corner of C1ColorPicker control lets users select the visual style they want to apply on the color picker.
The code snippets refer the color picker application created in Working with C1ColorPicker.
VB |
Copy Code
|
---|---|
InitializeComponent() ComboBox1.DataSource = [Enum].GetValues(GetType(VisualStyle)) |
C# |
Copy Code
|
---|---|
InitializeComponent();
comboBox1.DataSource = Enum.GetValues(typeof(VisualStyle));
|
VB |
Copy Code
|
---|---|
Private Sub ComboBox1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox1.SelectedIndexChanged C1ColorPicker1.VisualStyle = DirectCast(ComboBox1.SelectedItem, VisualStyle) End Sub |
C# |
Copy Code
|
---|---|
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e) { c1ColorPicker1.VisualStyle = (VisualStyle)comboBox1.SelectedItem; } |