/wpf-color-picker

Standalone wpf color picker

Primary LanguageC#MIT LicenseMIT

Wpf color picker

Standalone Wpf color picker

Requirements

.Net framework >= 4.6.2

Installation

Install nuget package here

Usage

  1. Create the instance of the dialog
var initialColor = Colors.Blue;
var dialog = new ColorPickerDialog(initialColor);
  1. Show the dialog
var result = dialog.ShowDialog();
  1. Check the dialog results and get the color
if (result.HasValue && result.Value)
{
    var newColor = dialog.Color;
}

Dialog constructors

public ColorPickerDialog()
public ColorPickerDialog(Color color)
public ColorPickerDialog(Color color, IEnumerable<Color> palette)