Loading...
Loading...
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.
npx skill4agent add syncfusion/wpf-ui-components-skills syncfusion-wpf-color-picker-palette<!-- 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>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
}
}<syncfusion:ColorPickerPalette
Themes="Metro"
GenerateThemeVariants="True"
GenerateStandardVariants="True"
ThemePanelVisibility="Visible"
StandardPanelVisibility="Visible"
RecentlyUsedPanelVisibility="Visible"
MoreColorOptionVisibility="Visible"
NoColorVisibility="Visible" />var customColors = new ObservableCollection<CustomColor>
{
new CustomColor { Color = Color.FromArgb(255, 17, 235, 248), ColorName = "Aqua" },
new CustomColor { Color = Color.FromArgb(255, 248, 15, 166), ColorName = "Deep Pink" }
};
colorPickerPalette.CustomColorsCollection = customColors;
colorPickerPalette.SetCustomColors = true;
colorPickerPalette.CustomHeaderText = "Brand Colors";<syncfusion:ColorPickerPalette
Mode="Split"
SelectedCommand="{Binding ApplyColorCommand}"
Color="{Binding SelectedColor, Mode=TwoWay}" /><syncfusion:ColorPickerPalette
Mode="Palette"
BorderWidth="30"
BorderHeight="30" />| Property | Type | Purpose |
|---|---|---|
| | Gets/sets the selected color (default: Black) |
| | Gets/sets the selected brush |
| | Dropdown, Palette, or Split mode |
| | Office, Apex, Metro, etc. |
| | Show/hide theme color variants |
| | Show/hide standard color variants |
| | Custom color items |
| | Enable custom colors display |
| | Color item dimensions |
| | Palette popup size |
| | Show recently selected colors |
| | Show theme colors |
| | Show standard colors |
| | Show "More Colors" button |
| | Show transparent/no color button |
| | Default reset color |