ColourLabel

DrawablePanelContainerControlBindableWidgetWidgetReferences
public sealed class ColourLabel : Drawable
Provides a coloured label-like control which gives easy access to various types of colour input.

Constructors

ColourLabel

#
Creates a new colour label.
public ColourLabel(
Color
colour
Colour.
)

Properties

PaletteRegion

#
Gets the rectangle containing the palette icon.
public RectangleF PaletteRegion { get; }

PickerRegion

#
Gets the rectangle from within which the colour picker launches.
public RectangleF PickerRegion { get; }

ProvidePalette

#
Gets or sets whether to provide a custom palette window on click.
public bool ProvidePalette { get; set; }

ProvidePicker

#
Gets or sets whether to provide a colour picker window on click.
public bool ProvidePicker { get; set; }

ProvideSampler

#
Gets or sets whether to provide a screen sampler on click.
public bool ProvideSampler { get; set; }

SamplerRegion

#
Gets the rectangle containing the sampling icon.
public RectangleF SamplerRegion { get; }

ShowContextualColours

#
Gets or sets whether context aware colours are available in the colour picker.
public bool ShowContextualColours { get; set; }

ShowName

#
Gets or sets whether to include the colour name on the label.
public bool ShowName { get; set; }

ShowTransparency

#
Include the transparency slider when showing the picker.
public bool ShowTransparency { get; set; }

Values

#
Gets the plurality database associated with this colour label.
public Plurality<Color> Values { get; }

Methods

OnMouseDown

#
Raises the MouseDown event.
protected override void OnMouseDown(
MouseEventArgs
e
Event arguments
)
Remarks: To override default behaviour of the control, set Handled property to true.
Control.OnMouseDown

OnMouseMove

#
Raises the MouseMove event.
protected override void OnMouseMove(
MouseEventArgs
e
Mouse event args
)
Control.OnMouseMove

OnMouseUp

#
Raises the MouseUp event.
protected override void OnMouseUp(
MouseEventArgs
e
Event arguments
)
Control.OnMouseUp

OnPaint

#
Raises the Paint event
protected override void OnPaint(
PaintEventArgs
e
Paint event arguments
)
Drawable.OnPaint

Events

ColourChanged

#
Raised whenever the current colour is changed.