Back to Devexpress

How to: Create and Add Palettes in PopupColorEdit

wpf-10516-controls-and-libraries-data-editors-getting-started-how-to-create-and-add-palettes-in-popupcoloredit.md

latest1.0 KB
Original Source

How to: Create and Add Palettes in PopupColorEdit

  • May 22, 2020
  • 2 minutes to read

A PopupColorEdit allows you to choose colors from the RGBA color space. Its features include 20 preset color palettes and an unlimited number of custom color palettes.

This document demonstrates how to create the PopupColorEdit control, and add predefined and custom palettes.

Create a New Project and Add a PopupColorEdit

  1. Run MS Visual Studio.
  2. Create a new WPF Application project. For this, choose New Project on the File menu or press Ctrl+Shift+N , and then choose WPF Application.
  3. Add a PopupColorEdit component to the project.

Create and Add Palettes

  1. To add a predefined palette, add the following code after the InitializeComponent method.

  2. To create and add a custom palette, add the following code after the InitializeComponent method.

  3. Run the application to see the result.