Category / Section
How to set the selected color in SfColorPicker?
1 min read
In SfColorPicker, you can load it with a specified selected color by using SelectedColor property.
XAML
<syncfusion:SfColorPicker Name="sfcp" SelectedColor="#0000FF" VerticalAlignment="Center"> </syncfusion:SfColorPicker>
C#
SfColorPicker sfcp = new SfColorPicker(); SolidColorBrush brush = new SolidColorBrush(Color.FromArgb(0xFF, 0x00, 0x00, 0xFF)); sfcp.SelectedColor = brush.Color;
The following screenshot displays Blue as selected color of SfColorPicker.
Figure 1: Blue as selected color of SfColorPicker