Articles in this section
Category / Section

How to display ColorPicker in different color selectionmode?

1 min read

To display the colorpicker in different ColorSelectionmode, the VisualizationStyle property of ColorPicker can be used. There are four different ColorSelectionMode available in ColorPicker as follows:

  • RGB
  • HSV
  • ClassicHSV
  • ClassicRGB

The following code demonstrate how to set the VisualizationStyle as HSV. Similarly, the different SelectionMode of color can be switch using VisualizationStyle Property.

XAML:

<Window x:Class="ColorPicker_KB.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:syncfusion="http://schemas.syncfusion.com/wpf"
Title="MainWindow" Height="350" Width="525" BorderBrush="Yellow">
<Grid x:Name="Grid1">
<syncfusion:ColorPicker x:Name="_ColorPicker" VisualizationStyle="HSV" Height="30" Width="200" />
</Grid>
</Window>

 

C#:

using Syncfusion.Windows.Tools.Controls;
using Syncfusion.Windows.Shared;
using Syncfusion.Windows.Tools;
namespace ColorPicker_KB
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
ColorPicker _ColorPicker = new ColorPicker();
_ColorPicker.Height = 30;
_ColorPicker.Width = 200;
_ColorPicker.VisualizationStyle = ColorSelectionMode.HSV;
}
}
}

 

 

Output:

 

                    

 

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied