Implementing WPF ColorPickerPalette
The ColorPickerPalette is a rich color selection control providing a visual palette interface with theme colors, standard colors, custom colors, and extended color options. Use this skill when you need to implement color selection functionality with flexible customization options.
When to Use This Skill
Use ColorPickerPalette when you need to:
- Allow users to select colors from predefined palettes (theme, standard, custom)
- Display recently used colors
- Provide "More Colors" options for extended selection
- Customize color panels and visibility
- Handle color selection events
- Support RTL flow direction
- Enable transparent or "No Color" options
Component Overview
ColorPickerPalette provides:
- Multiple color sources: Theme colors, standard colors, custom colors, recently used
- Flexible modes: Dropdown (default), Palette (expanded), Split (button + dropdown)
- Rich customization: Panel visibility, sizing, icons, headers, themes
- Event support: SelectedBrushChanged event and SelectedCommand binding
- Accessibility: Tooltip support, keyboard navigation, RTL support
Documentation Navigation Guide
Getting Started
📄 Read: references/getting-started.md
- Installation and assembly references
- Adding ColorPickerPalette via designer, XAML, and C#
- Control structure and key properties
- Setting initial colors programmatically
- Theme and localization support
Color Management
📄 Read: references/color-management.md
- Accessing and changing colors programmatically
- Working with color brushes
- Automatic color defaults
- Transparent color selection
- Theme color variants and standard colors
- Custom colors collection
- Recently used color panel
Appearance & Customization
📄 Read: references/appearance-customization.md
- Flow direction (RTL) support
- Panel visibility options (theme, standard, custom, recently used)
- Display modes (Dropdown, Palette, Split)
- Resizing color items and palette
- Icon customization and sizing
- Header template customization
Events & Interactions
📄 Read: references/events-interactions.md
- SelectedBrushChanged event handling
- SelectedCommand binding patterns
- "No Color" button functionality
- Tooltip support for color names
- More Colors window interaction
- Header template customization
Quick Start Example
<!-- Basic ColorPickerPalette setup -->
<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:syncfusion="http://schemas.syncfusion.com/wpf"
Title="ColorPickerPalette Sample">
<Grid>
<!-- Default dropdown mode with theme and standard colors -->
<syncfusion:ColorPickerPalette x:Name="colorPickerPalette"
Color="Red"
GenerateThemeVariants="True"
GenerateStandardVariants="True"
RecentlyUsedPanelVisibility="Visible"
Width="60"
Height="40" />
</Grid>
</Window>
C# Code-Behind:
using Syncfusion.Windows.Tools.Controls;
public partial class MainWindow : Window {
public MainWindow() {
InitializeComponent();
// Handle color selection
colorPickerPalette.SelectedBrushChanged += ColorPickerPalette_SelectedBrushChanged;
}
private void ColorPickerPalette_SelectedBrushChanged(object sender, SelectedBrushChangedEventArgs e) {
var newColor = e.NewColor;
var newBrush = e.NewBrush;
// Apply color to UI elements
}
}
Common Patterns
- Color Panel Customization: Set
ThemePanelVisibility, StandardPanelVisibility, RecentlyUsedPanelVisibility, MoreColorOptionVisibility to control which panels appear
- Custom Colors Collection: Bind
CustomColorsCollection property to ObservableCollection<CustomColor> and set SetCustomColors="True"
- Split Mode with Command: Set
Mode="Split" and bind SelectedCommand for button behavior with dropdown access
- Expanded Palette Mode: Set
Mode="Palette" to show palette always visible; adjust BorderWidth/BorderHeight for color item sizing
See appearance-customization.md and events-interactions.md for complete examples.
Key Properties
| Property |
Type |
Purpose |
Color |
Color |
Gets/sets the selected color (default: Black) |
SelectedBrush |
Brush |
Gets/sets the selected brush |
Mode |
PickerMode |
Dropdown, Palette, or Split mode |
Themes |
PaletteTheme |
Office, Apex, Metro, etc. |
GenerateThemeVariants |
bool |
Show/hide theme color variants |
GenerateStandardVariants |
bool |
Show/hide standard color variants |
CustomColorsCollection |
ObservableCollection<CustomColor> |
Custom color items |
SetCustomColors |
bool |
Enable custom colors display |
BorderWidth / BorderHeight |
double |
Color item dimensions |
PopupWidth / PopupHeight |
double |
Palette popup size |
RecentlyUsedPanelVisibility |
Visibility |
Show recently selected colors |
ThemePanelVisibility |
Visibility |
Show theme colors |
StandardPanelVisibility |
Visibility |
Show standard colors |
MoreColorOptionVisibility |
Visibility |
Show "More Colors" button |
NoColorVisibility |
Visibility |
Show transparent/no color button |
AutomaticColor |
Color |
Default reset color |
Common Use Cases
- Text Color Picker: Dropdown mode with standard/theme colors +
SelectedBrushChanged to apply formatting
- Shape Fill Selector: Split mode with custom brand colors +
SelectedCommand binding
- Theme Color Picker: Palette mode with
GenerateThemeVariants="True" to show color variants
- Color History Panel: Enable
RecentlyUsedPanelVisibility="Visible" for quick access to recent colors
Next Steps
- Start with basics: Read getting-started.md to set up ColorPickerPalette
- Customize colors: Use color-management.md to manage color sources
- Style the control: Apply customizations from appearance-customization.md
- Handle interactions: Implement event handling from events-interactions.md
1---2name: syncfusion-wpf-color-picker-palette3description: Implements the Syncfusion WPF ColorPickerPalette control for color selection from themed and standard color palettes. Use this when adding color pickers with predefined palettes, customizing color options, or handling color selection events in WPF applications. Covers setup, color management, appearance customization, and interaction patterns.4---56# Implementing WPF ColorPickerPalette78The [ColorPickerPalette](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Tools.Controls.ColorPickerPalette.html) is a rich color selection control providing a visual palette interface with theme colors, standard colors, custom colors, and extended color options. Use this skill when you need to implement color selection functionality with flexible customization options.910## When to Use This Skill1112Use ColorPickerPalette when you need to:13- Allow users to select colors from predefined palettes (theme, standard, custom)14- Display recently used colors15- Provide "More Colors" options for extended selection16- Customize color panels and visibility17- Handle color selection events18- Support RTL flow direction19- Enable transparent or "No Color" options2021## Component Overview2223ColorPickerPalette provides:24- **Multiple color sources:** Theme colors, standard colors, custom colors, recently used25- **Flexible modes:** Dropdown (default), Palette (expanded), Split (button + dropdown)26- **Rich customization:** Panel visibility, sizing, icons, headers, themes27- **Event support:** SelectedBrushChanged event and SelectedCommand binding28- **Accessibility:** Tooltip support, keyboard navigation, RTL support2930---3132## Documentation Navigation Guide3334### Getting Started35📄 **Read:** [references/getting-started.md](references/getting-started.md)36- Installation and assembly references37- Adding ColorPickerPalette via designer, XAML, and C#38- Control structure and key properties39- Setting initial colors programmatically40- Theme and localization support4142### Color Management43📄 **Read:** [references/color-management.md](references/color-management.md)44- Accessing and changing colors programmatically45- Working with color brushes46- Automatic color defaults47- Transparent color selection48- Theme color variants and standard colors49- Custom colors collection50- Recently used color panel5152### Appearance & Customization53📄 **Read:** [references/appearance-customization.md](references/appearance-customization.md)54- Flow direction (RTL) support55- Panel visibility options (theme, standard, custom, recently used)56- Display modes (Dropdown, Palette, Split)57- Resizing color items and palette58- Icon customization and sizing59- Header template customization6061### Events & Interactions62📄 **Read:** [references/events-interactions.md](references/events-interactions.md)63- SelectedBrushChanged event handling64- SelectedCommand binding patterns65- "No Color" button functionality66- Tooltip support for color names67- More Colors window interaction68- Header template customization6970---7172## Quick Start Example7374```xaml75<!-- Basic ColorPickerPalette setup -->76<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"77 xmlns:syncfusion="http://schemas.syncfusion.com/wpf" 78 Title="ColorPickerPalette Sample">79 <Grid>80 <!-- Default dropdown mode with theme and standard colors -->81 <syncfusion:ColorPickerPalette x:Name="colorPickerPalette" 82 Color="Red"83 GenerateThemeVariants="True"84 GenerateStandardVariants="True"85 RecentlyUsedPanelVisibility="Visible"86 Width="60" 87 Height="40" />88 </Grid>89</Window>90```9192**C# Code-Behind:**93```csharp94using Syncfusion.Windows.Tools.Controls;9596public partial class MainWindow : Window {97 public MainWindow() {98 InitializeComponent();99100 // Handle color selection101 colorPickerPalette.SelectedBrushChanged += ColorPickerPalette_SelectedBrushChanged;102 }103104 private void ColorPickerPalette_SelectedBrushChanged(object sender, SelectedBrushChangedEventArgs e) {105 var newColor = e.NewColor;106 var newBrush = e.NewBrush;107 // Apply color to UI elements108 }109}110```111112---113114## Common Patterns115116- **Color Panel Customization:** Set `ThemePanelVisibility`, `StandardPanelVisibility`, `RecentlyUsedPanelVisibility`, `MoreColorOptionVisibility` to control which panels appear117- **Custom Colors Collection:** Bind `CustomColorsCollection` property to `ObservableCollection<CustomColor>` and set `SetCustomColors="True"`118- **Split Mode with Command:** Set `Mode="Split"` and bind `SelectedCommand` for button behavior with dropdown access119- **Expanded Palette Mode:** Set `Mode="Palette"` to show palette always visible; adjust `BorderWidth`/`BorderHeight` for color item sizing120121See [appearance-customization.md](references/appearance-customization.md) and [events-interactions.md](references/events-interactions.md) for complete examples.122123---124125## Key Properties126127| Property | Type | Purpose |128|----------|------|---------|129| `Color` | `Color` | Gets/sets the selected color (default: Black) |130| `SelectedBrush` | `Brush` | Gets/sets the selected brush |131| `Mode` | `PickerMode` | Dropdown, Palette, or Split mode |132| `Themes` | `PaletteTheme` | Office, Apex, Metro, etc. |133| `GenerateThemeVariants` | `bool` | Show/hide theme color variants |134| `GenerateStandardVariants` | `bool` | Show/hide standard color variants |135| `CustomColorsCollection` | `ObservableCollection<CustomColor>` | Custom color items |136| `SetCustomColors` | `bool` | Enable custom colors display |137| `BorderWidth` / `BorderHeight` | `double` | Color item dimensions |138| `PopupWidth` / `PopupHeight` | `double` | Palette popup size |139| `RecentlyUsedPanelVisibility` | `Visibility` | Show recently selected colors |140| `ThemePanelVisibility` | `Visibility` | Show theme colors |141| `StandardPanelVisibility` | `Visibility` | Show standard colors |142| `MoreColorOptionVisibility` | `Visibility` | Show "More Colors" button |143| `NoColorVisibility` | `Visibility` | Show transparent/no color button |144| `AutomaticColor` | `Color` | Default reset color |145146---147148## Common Use Cases149150- **Text Color Picker:** Dropdown mode with standard/theme colors + `SelectedBrushChanged` to apply formatting151- **Shape Fill Selector:** Split mode with custom brand colors + `SelectedCommand` binding152- **Theme Color Picker:** Palette mode with `GenerateThemeVariants="True"` to show color variants153- **Color History Panel:** Enable `RecentlyUsedPanelVisibility="Visible"` for quick access to recent colors154155---156157## Next Steps1581591. **Start with basics:** Read [getting-started.md](references/getting-started.md) to set up ColorPickerPalette1602. **Customize colors:** Use [color-management.md](references/color-management.md) to manage color sources1613. **Style the control:** Apply customizations from [appearance-customization.md](references/appearance-customization.md)1624. **Handle interactions:** Implement event handling from [events-interactions.md](references/events-interactions.md)