Skip to content

dsafa/wpf-color-picker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)