Selection Mode in WPF ColorPicker

ColorPicker and ColorEdit controls can be displayed in two different modes. They are HSV and RGB modes. The VisualizationStyle property is used to switch between these modes.

To set the ColorSelection Mode as “HSV” for ColorEdit control, use the below code.

<!-- Adding ColorEdit -->
<syncfusion:ColorEdit  Margin="20" VisualizationStyle="HSV" Name="colorEdit"/><
//Creating an instance of color edit
ColorEdit colorEdit = new ColorEdit();

//Setting selection mode as HSV ColorEdit.
VisualizationStyle = ColorSelectionMode.HSV;    

//Adding control to the window
this.Content = colorEdit;

ColorEdit with HSV selection mode

To set the ColorSelection Mode as “HSV” for ColorPicker control, use the below code.

//Creating an instance of color picker
ColorPicker colorPicker = new ColorPicker();

//Setting selection mode as HSV
colorPicker.VisualizationStyle = ColorSelectionMode.HSV;    

//Adding control to the window
this.Content = colorPicker;

ColorPicker with HSV selection mode

To set the ColorSelection Mode as “RGB” for ColorEdit control, use the below code.

//Creating an instance of color edit
ColorEdit colorEdit = new ColorEdit();

//Setting selection mode as RGB
colorEdit.VisualizationStyle = ColorSelectionMode.RGB; 

//Adding control to the window
this.Content = colorEdit;

ColorEdit with RGB selection mode

To set the ColorSelection Mode as “RGB” for ColorPicker control, use the below code.

//Creating an instance of color picker
ColorPicker colorPicker = new ColorPicker();

//Setting selection mode as RGB
colorPicker.VisualizationStyle = ColorSelectionMode.RGB;

//Adding control to the window
this.Content = colorPicker;

ColorPicker with RGB selection mode