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

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

Properties

PaletteRegion

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

PickerRegion

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

ProvidePalette

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

ProvidePicker

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

ProvideSampler

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

SamplerRegion

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

ShowContextualColours

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

ShowName

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

ShowTransparency

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

Values

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

Methods

OnMouseDown

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

OnMouseMove

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

OnMouseUp

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

OnPaint

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

Events

ColourChanged

#
Raised whenever the current colour is changed.