ColorBar Class
Definition
Section titled “Definition”A color bar control.
public class ColorBar : ControlBaseInheritance object → ControlBase
Constructors
Section titled “Constructors”ColorBar(int)
Section titled “ColorBar(int)”Creates a new color bar with the specified width.
public ColorBar(int width)Parameters
Section titled “Parameters”width int
The width of the bar.
Fields
Section titled “Fields”_positions
Section titled “_positions”Internal use by theme.
public int _positions_colorSteps
Section titled “_colorSteps”Internal use by theme.
public Color[] _colorStepsProperties
Section titled “Properties”StartingColor
Section titled “StartingColor”Gets or sets the color on the left-side of the bar.
public Color StartingColor { get; set; }EndingColor
Section titled “EndingColor”Gets or sets the color on the right-side of the bar.
public Color EndingColor { get; set; }SelectedColor
Section titled “SelectedColor”The selected color.
public Color SelectedColor { get; set; }SelectedPosition
Section titled “SelectedPosition”The position on the bar currently selected.
public int SelectedPosition { get; }Methods
Section titled “Methods”OnMouseIn(ControlMouseState)
Section titled “OnMouseIn(ControlMouseState)”Called as the mouse moves around the control area. Raises the MouseMove event and calls the DetermineState() method.
protected override void OnMouseIn(ControlBase.ControlMouseState info)Parameters
Section titled “Parameters”info ControlBase.ControlMouseState
ProcessMouse(MouseScreenObjectState)
Section titled “ProcessMouse(MouseScreenObjectState)”Checks if the mouse is the control and calls the appropriate mouse methods.
public override bool ProcessMouse(MouseScreenObjectState info)Parameters
Section titled “Parameters”Returns
Section titled “Returns”bool
True when the control is enabled, set to use the mouse and the mouse is over it, otherwise false.
UpdateAndRedraw(TimeSpan)
Section titled “UpdateAndRedraw(TimeSpan)”Redraws the control if applicable.
public override void UpdateAndRedraw(TimeSpan time)Parameters
Section titled “Parameters”time TimeSpan
The duration of thecurrent frame.
Events
Section titled “Events”ColorChanged
Section titled “ColorChanged”Raised when the SelectedColor value changes.
public event EventHandler? ColorChanged