Table of Contents

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

initial Color
showAlpha bool

Properties

Picker

The picker.

public ColorPicker Picker { get; }

Property Value

ColorPicker

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

e KeyEventArgs

OnRender(DrawingContext)

Draws the element (below its children).

protected override void OnRender(DrawingContext dc)

Parameters

dc DrawingContext

Events

Cancelled

Raised when the user pressed Escape (the original color was restored).

public event Action<ColorPickerPopup>? Cancelled

Event Type

Action<ColorPickerPopup>

ColorChanged

Raised while the user changes the color.

public event Action<ColorPickerPopup, Color>? ColorChanged

Event Type

Action<ColorPickerPopup, Color>

Committed

Raised when the popup closes without cancellation.

public event Action<ColorPickerPopup, Color>? Committed

Event Type

Action<ColorPickerPopup, Color>