Table of Contents

Class ColorPickerPanel

Namespace
Myra.Graphics2D.UI.ColorPicker
Assembly
Myra.dll

A color picker panel that provides user interface controls for selecting colors.

public class ColorPickerPanel : VerticalStackPanel, IItemWithId, INotifyAttachedPropertyChanged, IContainer
Inheritance
ColorPickerPanel
Implements
Inherited Members

Constructors

ColorPickerPanel(Stylesheet, string)

Initializes a new instance of the ColorPickerPanel class with the specified stylesheet and style name.

public ColorPickerPanel(Stylesheet stylesheet, string styleName = "")

Parameters

stylesheet Stylesheet

The stylesheet to use for applying the style.

styleName string

The name of the style to apply.

ColorPickerPanel(string)

Initializes a new instance of the ColorPickerPanel class with the specified style name.

public ColorPickerPanel(string styleName = "")

Parameters

styleName string

The name of the style to apply.

Fields

UserColors

An array of predefined user colors.

public static readonly Color[] UserColors

Field Value

Color[]

Properties

A

Gets or sets the alpha (opacity) value of the color (0.0-1.0).

public float A { get; set; }

Property Value

float

B

Gets or sets the blue component of the color (0-255).

public byte B { get; set; }

Property Value

byte

Color

Gets or sets the currently selected color.

public Color Color { get; set; }

Property Value

Color

G

Gets or sets the green component of the color (0-255).

public byte G { get; set; }

Property Value

byte

R

Gets or sets the red component of the color (0-255).

public byte R { get; set; }

Property Value

byte

Methods

ApplyColorPickerDialogStyle(ColorPickerDialogStyle)

Applies a color picker dialog style to the color picker panel.

public void ApplyColorPickerDialogStyle(ColorPickerDialogStyle style)

Parameters

style ColorPickerDialogStyle

The color picker dialog style to apply.

OnTouchDown()

Called when a touch is pressed down on the color picker.

public override void OnTouchDown()

OnTouchLeft()

Called when a touch leaves the color picker.

public override void OnTouchLeft()

OnTouchMoved()

Called when a touch is moved on the color picker.

public override void OnTouchMoved()

OnTouchUp()

Called when a touch is released from the color picker.

public override void OnTouchUp()