[]
The smart tag on the top right corner of the C1FontPicker control lets users select the visual style of the C1FontPicker.
Complete the following steps:
The code snippets refer the font picker application created in Working with C1FontPicker.
Add the ComboBox control to the form.
Add the following line of code to the application to get the visual styles in the ComboBox:
InitializeComponent()
ComboBox2.DataSource = [Enum].GetValues(GetType(VisualStyle))
InitializeComponent();
comboBox2.DataSource = Enum.GetValues(typeof(VisualStyle));
Add code to the comboBox1_SelectedIndexChanged event handler so that the visual style of C1FontPicker is updated on selecting an option from the combo box listing visual styles available:
Private Sub ComboBox2_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox2.SelectedIndexChanged
C1FontPicker1.VisualStyle = DirectCast(ComboBox2.SelectedItem, VisualStyle)
End Sub
private void comboBox2_SelectedIndexChanged(object sender, EventArgs e)
{
c1FontPicker1.VisualStyle = (VisualStyle)comboBox2.SelectedItem;
}
Run the application. Now you can select the visual style from the drop down of the combo box and set the visual style of the C1FontPicker. The following image shows the output: