WPF Sfcolorpalette Examples
color
color-palette
color-picker
color-selector
controls
examples
syncfusion
tools
wpf
A concise guide to adding and using the Syncfusion SfColorPalette in WPF. This document modernizes and clarifies the setup and usage while preserving the original code snippets.
Highlights
- Pick colors instantly from a curated palette
- Bind selected color to UI elements and view models
- Navigate among swatches to explore more color sets
- Apply built-in themes via SfSkinManager or create a custom theme
- Add via Designer, XAML, or C# code-behind
Add the control manually in C
- Add the required assembly references.
- Import the namespace: Syncfusion.Windows.Controls.Media
- Create and add the control to the page.
Select a color
Click any color item in SfColorPalette to select it. Access the selection via the SelectedColor property. The selected color is also shown as a tooltip.
Bind the selected color
Bind SelectedColor to any dependency property. Below, SelectedColor is bound to Rectangle.Fill using a color-to-brush converter.
Navigate swatches
Use the Swatches button in the top-right of the control to browse and select colors from different swatch sets.
Theming
SfColorPalette supports multiple built-in themes.
- Apply a theme using SfSkinManager
- Create a custom theme using ThemeStudio
About the sample
These samples demonstrate common SfColorPalette scenarios:
- Selecting a color and reading it from SelectedColor
- Binding SelectedColor to UI elements (e.g., Rectangle.Fill) via converter
- Switching between swatches to explore extended palettes
- Applying themes for consistent look and feel