Constructors
ColourPicker
#Create a new colour picker, centered on a specific colour using the most recent model and palette constraints.
Parameters:
| layout (PickerLayout) | Ui layout. |
| colour (Color) | Initial colour. |
ColourPicker
#Create a new colour picker, centered on a specific colour.
Parameters:
| layout (PickerLayout) | Ui layout. |
| colour (Colour) | Initial colour. |
| space (Space) | Space override. |
| palette (string) | Palette override. |
| discrete (bool) | Discrete mode override. |
ColourPicker
#Create a new colour picker, centered on a specific colour using the most recent model and palette constraints.
Parameters:
| layout (PickerLayout) | Ui layout. |
| colour (Colour) | Initial colour. |
Fields
Properties
Bounds
#public RectangleF Bounds { get; }
Gets the bounding rectangle for all UI elements in the picker.
Channel1
#public RectangleF Channel1 { get; }
Gets the bounding rectangle for the first channel slider.
Channel2
#public RectangleF Channel2 { get; }
Gets the bounding rectangle for the second channel slider.
Channel3
#public RectangleF Channel3 { get; }
Gets the bounding rectangle for the third channel slider.
ChannelA
#public RectangleF ChannelA { get; }
Gets the bounding rectangle for the alpha channel slider.
ChildResponsives
#Sliders this picker hosts as standalone responsive children. The hosting control should register each of these as an IResponsive so the FlexControl dispatcher routes slider drags through their own Responsive instances instead of going through the picker.
ColourInfo
#public RectangleF ColourInfo { get; }
Gets the bounding rectangle of the colour code label.
CurrentColour
#Gets the currently selected colour within the current colour model. This does not take discretisation into account. You *probably* want to use the ImpliedColour property.
DisplayDiscrete
#Gets or sets whether to limit the colours in the model space to the currently loaded palette.
Format
#Gets or sets the textual format in which colours are displayed. Caller is responsible for triggering a redraw of the control.
ImpliedColour
#public Color ImpliedColour { get; }
Gets the currently implied colour, taking into account discretisation.
IncludeContextuals
#Gets whether the layout specifies the inclusion of the contextual icon colour model.
ModelName
#public RectangleF ModelName { get; }
Gets the bounding rectangle of the colour space name label.
ModelToolbar
#public RectangleF ModelToolbar { get; }
Gets the bounding rectangle of the toolbar containing all colour spaces.
MostRecentDiscrete
#Gets or sets the most recently used discrete mode. This will be the default for any new colour picker.
MostRecentFormat
#Gets or sets the most recently selected colour format. This will be the default for any new colour picker.
MostRecentPalette
#Gets or sets the most recently selected colour space. This will be the default for any new colour picker.
MostRecentSpace
#Gets or sets the most recently selected colour space. This will be the default for any new colour picker.
SamplerButton
#public RectangleF SamplerButton { get; }
Gets the region for the Screen Sampler button.
Methods
ComputeBounds
#Compute the bounds based on a specific layout.
Parameters:
| layout (PickerLayout) | Layout. |
Returns: Dimensions of resulting picker.
Draw
#Draw this colour picker to a graphics context.
Parameters:
| context (Context) | Graphics context. |
| anchor (PointF) | Anchor point (upper left corner of colour picker) |
ModelButton
#Resolve the bounds for the specific space button on the space toolbar.
Parameters:
| space (Space) |
PerformLayout
#public void PerformLayout(PointF anchor)
Perform layout of the picker. This happens automatically within each Draw iteration, but you can call it specifically if you need to examine the boundaries prior to a draw operation.
Parameters:
| anchor (PointF) | Layout anchor for top left corner. |