Different Panels and control its visibility in WPF Color Picker Palette
The ColorPickerPalette control includes three panels namely ThemePanel, StandardColorPanel, RecentlyUsedPanel. You can set the visibility of these panels by using the ThemePanelVisibility, StandardPanelVisibility, RecentlyUsedPanelVisibility properties respectively. The ThemePanel displays the palette of selected theme colors and their variant colors in the panel. The StandardColorPanel displays a palette of 8 preset colors in panel. The RecentlyUsedColor panel displays the most recently used colors.
Use case scenarios
You can use the ColorPickerPalette control to view the panels of your choice.
Adding setting panel visibilities to an application
Setting Panel Visibilities can be added to an application by using XAML or C# code.
The following code example illustrates how to add the Setting Panel Visibilities feature to an application through XAML.
<sync:ColorPickerPalette x:Name="ColorPicker"
ThemePanelVisibility="Collapsed"/>
<sync:ColorPickerPalette x:Name="ColorPicker"
StandardPanelVisibility="Collapsed"/>
<sync:ColorPickerPalette x:Name="ColorPicker"
RecentlyUsedPanelVisibility="Collapsed"/>
The following code example illustrates how to add the Setting Panel Visibilities feature to an application through C#.
ColorPickerPalette colorpicker = new ColorPickerPalette();
colorpicker.ThemePanelVisibility = System.Windows.Visibility.Collapsed;
colorpicker.StandardPanelVisibility = System.Windows.Visibility.Collapsed;
colorpicker.RecentlyUsedPanelVisibility = System.Windows.Visibility.Collapsed;
ColorPickerPalette colorpicker = new ColorPickerPalette()
colorpicker.ThemePanelVisibility = System.Windows.Visibility.Collapsed
colorpicker.StandardPanelVisibility = System.Windows.Visibility.Collapsed
colorpicker.RecentlyUsedPanelVisibility = System.Windows.Visibility.Collapsed
Properties
Property | Description | Type | Data Type | Reference links |
---|---|---|---|---|
ThemePanelVisibility | Enables or disables the visibility of the ThemePanel. | DependencyProperty | ThemePanelVisibility.Visible | N/A |
StandardPanelVisibility | Enables or disables the visibility of the StandardColorPanel. | DependencyProperty | StandardPanelVisibility.Visible | N/A |
RecentlyUsedPanelVisibility | Enables or disables the visibility of the Recently Used ColorPanel. | DependencyProperty | RecentlyUsedPanelVisibility.Visible | N/A |
Sample link
To view samples:
- Select Start -> Programs -> Syncfusion -> Essential Studio xx.x.x.xx -> Dashboard.
- Select Run Locally Installed Samples in WPF Button.
- Now select the colorpicker sample and launch it.