Guide implementation of the Syncfusion WinUI DropDown Color Palette control for color selection in Windows desktop applications. Use this skill when implementing color selection dropdowns, theme color support, custom color palettes, split-mode buttons, or the More Colors dialog. Covers dropdown customization, palette structure, and color-based UI interactions.
The SfDropDownColorPalette control provides a rich visual interface for color selection. It displays a dropdown with selected color highlighted at the top, offers standard colors, theme colors with variants, and supports custom color palettes and additional color selection through a More Colors dialog.
Use this skill when you need to:
The DropDown Color Palette combines several color selection areas:
| Section | Purpose |
|---|---|
| Selected Color Button | Displays currently selected color; clicking opens palette |
| Automatic Color | Quick access to default color (usually black) |
| Theme Colors | Predefined theme colors with shade variants |
| Standard Colors | 10 standard colors (red, green, blue, yellow, etc.) |
| Recently Used | Colors selected from More Colors dialog |
| More Colors... | Opens spectrum dialog for any color |
📄 Read: references/getting-started.md
Syncfusion.Editors.WinUI version via the NuGet package manager.📄 Read: references/palette-structure.md
📄 Read: references/more-colors-dialog.md
<Page
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:editors="using:Syncfusion.UI.Xaml.Editors">
<Grid>
<editors:SfDropDownColorPalette x:Name="colorPalette" />
</Grid>
</Page>
using Syncfusion.UI.Xaml.Editors;
public sealed partial class MainPage : Page
{
public MainPage()
{
this.InitializeComponent();
var colorPalette = new SfDropDownColorPalette();
grid.Children.Add(colorPalette);
}
}
<editors:SfDropDownColorPalette SelectedBrush="Yellow" x:Name="palette" />
// Get the selected color
var selectedBrush = palette.SelectedBrush as SolidColorBrush;
if (selectedBrush != null)
{
Color selectedColor = selectedBrush.Color;
}
// Set a new color
palette.SelectedBrush = new SolidColorBrush(Colors.Red);
<editors:SfDropDownColorPalette
SelectedBrushChanged="Palette_SelectedBrushChanged"
x:Name="palette" />
private void Palette_SelectedBrushChanged(object sender, SelectedBrushChangedEventArgs e)
{
var oldBrush = e.OldBrush as SolidColorBrush;
var newBrush = e.NewBrush as SolidColorBrush;
// Apply color somewhere
textBlock.Foreground = newBrush;
}
<editors:SfDropDownColorPalette
DropDownMode="Split"
Command="{x:Bind ApplyColorCommand}"
x:Name="palette" />
private ICommand applyColorCommand;
public ICommand ApplyColorCommand => applyColorCommand;
public void ApplyColorToSelectedText(object param)
{
// Apply the currently selected color
richTextBox.Document.Selection.CharacterFormat.BackgroundColor =
(palette.SelectedBrush as SolidColorBrush).Color;
}
<editors:SfDropDownColorPalette
DropDownPlacement="BottomEdgeAlignedRight"
x:Name="palette" />
Common Placement Options:
Auto - Best available position (default)BottomEdgeAlignedLeft - Below, left-alignedBottomEdgeAlignedRight - Below, right-alignedTopEdgeAlignedLeft - Above, left-alignedTopEdgeAlignedRight - Above, right-aligned<editors:SfDropDownColorPalette
DropDownOpened="Palette_DropDownOpened"
DropDownClosed="Palette_DropDownClosed"
x:Name="palette" />
private void Palette_DropDownOpened(object sender, EventArgs e)
{
// Palette opened
}
private void Palette_DropDownClosed(object sender, EventArgs e)
{
// Palette closed
}
| Property | Type | Purpose |
|---|---|---|
SelectedBrush | Brush | Gets/sets the currently selected color (default: Black) |
DropDownPlacement | FlyoutPlacementMode | Position of dropdown relative to button (default: Auto) |
DropDownMode | DropDownMode | Dropdown or Split mode (default: Dropdown) |
Command | ICommand | Command executed when button clicked (Split mode) |
ContentTemplate | DataTemplate | Customize selected color button appearance |
DropDownButtonTemplate | DataTemplate | Customize dropdown arrow button (Split mode) |
All detailed documentation is organized by feature:
Ready to implement? Choose a specific task from the Navigation Guide above and read the corresponding reference file.