Skip to content

syncfusion/wpf-ui-components-skills / skills/syncfusion-wpf-colorpicker

syncfusion-wpf-colorpicker

Verified

Implement Syncfusion WPF ColorPicker for color and gradient selection. Use this skill whenever users need to add color picking functionality, select solid colors, create linear/radial gradients, customize palettes, apply themes, or handle color-changed events in WPF applications. Covers XAML and C# implementations.

Implementing WPF ColorPicker

The ColorPicker is a WPF user interface control for selecting and adjusting color values. It supports multiple color specifications including RGB (Red Green Blue), HSV (Hue Saturation Value), and hexadecimal codes, with built-in gradient editor, eyedropper, color palette, and theming support.

When to Use This Skill

Use the ColorPicker when you need to:

  • Allow users to select solid colors in WPF applications
  • Create linear or radial gradient brushes with multiple color stops
  • Edit color values manually using RGB, HSV, or Hex input
  • Include an eyedropper tool for picking colors from anywhere in the app
  • Control color opacity/alpha channel
  • Provide a color palette for quick color selection
  • Handle color-changed and brush-changed events
  • Apply built-in or custom themes to match application design

Navigation Guide

Getting Started

πŸ“„ Read: references/getting-started.md

  • Assembly dependencies and NuGet package setup
  • Adding ColorPicker via Designer, XAML, and C#
  • Control structure overview
  • Basic configuration

Solid and Gradient Colors

πŸ“„ Read: references/solid-gradient-colors.md

  • Selecting solid colors with Color property
  • Creating linear gradients with StartPoint, EndPoint, and GradientStops
  • Creating radial gradients with GradientOrigin, Center, RadiusX, RadiusY
  • Runtime color editing and selection
  • Managing opacity with alpha channel
  • Switching between solid, linear, and gradient modes

Customization Options

πŸ“„ Read: references/customization.md

  • Enabling/disabling color palette visibility
  • Gradient brush display modes (Default vs Extended)
  • Inverted color calculation for contrast
  • ScRGB color support
  • Hiding or showing alpha value editors
  • Restricting brush mode transitions

Appearance and Theming

πŸ“„ Read: references/appearance-theming.md

  • Built-in theme support
  • SfSkinManager integration for theme application
  • ThemeStudio custom theme creation
  • Theme-based appearance customization

Events and Integration

πŸ“„ Read: references/events-integration.md

  • ColorChanged event handling
  • SelectedBrushChanged event handling
  • Runtime color change notifications
  • Integration patterns with other controls

Quick Start

Basic XAML Setup

<Window xmlns:syncfusion="http://schemas.syncfusion.com/wpf">
    <Grid>
        <syncfusion:ColorPicker Name="colorPicker" 
                                Width="280" 
                                Height="100"/>
    </Grid>
</Window>

Basic C# Setup

using Syncfusion.Windows.Shared;

ColorPicker colorPicker = new ColorPicker();
colorPicker.Width = 300;
colorPicker.Height = 100;
grid.Children.Add(colorPicker);

Set Initial Color

<syncfusion:ColorPicker Color="Yellow" />

Common Patterns

Pattern 1: Solid Color Selection - Set Color property and IsColorPaletteVisible="True" for user solid color picking.

Pattern 2: Gradient Selection - Set Brush property with LinearGradientBrush or RadialGradientBrush with GradientStops for gradient selection.

Pattern 3: Respond to Color Changes - Subscribe to ColorChanged and SelectedBrushChanged events to handle real-time color/brush updates.

Pattern 4: Hide Alpha Channel - Set IsAlphaVisible="False" for opaque colors only.

Pattern 5: Lock to Solid Colors - Set EnableSolidToGradientSwitch="False" to prevent gradient mode switching.

Key Properties

PropertyTypePurpose
ColorColorGets or sets the selected solid color
BrushBrushGets or sets the selected gradient or solid brush
IsAlphaVisibleboolShows/hides alpha (opacity) controls
IsColorPaletteVisibleboolShows/hides built-in color palette
EnableSolidToGradientSwitchboolAllows/prevents switching between modes
GradientBrushDisplayModeenumSets display mode (Default or Extended)

Key Events

EventTriggered When
ColorChangedSelected solid color changes
SelectedBrushChangedSelected brush (gradient) changes

Dependencies

  • Assembly: Syncfusion.Shared.WPF
  • Framework: .NET Framework 4.5+
  • Dependencies: Syncfusion WPF shared components
reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 468kUpdated Claude CodeCodexVerifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why β€” repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" β€” or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 321kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 321kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself β€” your human partner chose inline execution, or no subagent tool is availableStars: 321kUpdated Claude CodeCodexVerifiedInstall