Constructors
ColourPicker
#Create a new colour picker, centered on a specific colour using the most recent model and palette constraints.
ColourPicker
#Create a new colour picker, centered on a specific colour.
public ColourPicker()
layout,
Ui layout.
colour,
Initial colour.
space,
Space override.
palette,
Palette override.
discrete
Discrete mode override.
ColourPicker
#Create a new colour picker, centered on a specific colour using the most recent model and palette constraints.
Fields
Properties
Bounds
#Gets the bounding rectangle for all UI elements in the picker.
public RectangleF Bounds { get; }
Channel1
#Gets the bounding rectangle for the first channel slider.
public RectangleF Channel1 { get; }
Channel2
#Gets the bounding rectangle for the second channel slider.
public RectangleF Channel2 { get; }
Channel3
#Gets the bounding rectangle for the third channel slider.
public RectangleF Channel3 { get; }
ChannelA
#Gets the bounding rectangle for the alpha channel slider.
public RectangleF ChannelA { get; }
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
#Gets the bounding rectangle of the colour code label.
public RectangleF ColourInfo { get; }
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
#Gets the currently implied colour, taking into account discretisation.
public Color ImpliedColour { get; }
IncludeContextuals
#Gets whether the layout specifies the inclusion of the contextual icon colour model.
ModelName
#Gets the bounding rectangle of the colour space name label.
public RectangleF ModelName { get; }
ModelToolbar
#Gets the bounding rectangle of the toolbar containing all colour spaces.
public RectangleF ModelToolbar { get; }
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
#Gets the region for the Screen Sampler button.
public RectangleF SamplerButton { get; }
Methods
ComputeBounds
#Compute the bounds based on a specific layout.
Returns: Dimensions of resulting picker.
PerformLayout
#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.
public void PerformLayout()
PointF
anchor
Layout anchor for top left corner.
SpaceInstance
#Gets the instance of the given space. Do not modify these instances unless you understand what consequences that might have to the validity of the picker state.
Returns: Instance of space or null.