Standalone Wpf color picker
.Net framework >= 4.6.2
- Create the instance of the dialog
var initialColor = Colors.Blue;
var dialog = new ColorPickerDialog(initialColor);
- Show the dialog
var result = dialog.ShowDialog();
- 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)