Class ColorPickerPopup
- Namespace
- PluginUI
- Assembly
- PluginUI.dll
Popup containing a ColorPicker. Changes are live (ColorChanged); closing commits (Committed, the color is added to the recent colors) and Escape restores the original color.
public class ColorPickerPopup : Popup
- Inheritance
-
ColorPickerPopup
- Inherited Members
Constructors
ColorPickerPopup(Color, bool)
Creates the popup.
public ColorPickerPopup(Color initial, bool showAlpha = true)
Parameters
Properties
Picker
The picker.
public ColorPicker Picker { get; }
Property Value
Methods
OnClosed()
Called after the popup closed (raises Closed).
protected override void OnClosed()
OnKeyDown(KeyEventArgs)
Keyboard routed to the popup when CapturesKeyboard is set; Escape closes by default.
protected override void OnKeyDown(KeyEventArgs e)
Parameters
OnRender(DrawingContext)
Draws the element (below its children).
protected override void OnRender(DrawingContext dc)
Parameters
Events
Cancelled
Raised when the user pressed Escape (the original color was restored).
public event Action<ColorPickerPopup>? Cancelled
Event Type
ColorChanged
Raised while the user changes the color.
public event Action<ColorPickerPopup, Color>? ColorChanged
Event Type
Committed
Raised when the popup closes without cancellation.
public event Action<ColorPickerPopup, Color>? Committed