CheckBox Class
Definition
Section titled “Definition”Represents a button that can be toggled on/off within a group of other buttons.
[DataContract]public class CheckBox : ToggleButtonBaseInheritance object → ControlBase → ButtonBase → ToggleButtonBase
Constructors
Section titled “Constructors”CheckBox(int, int)
Section titled “CheckBox(int, int)”Creates a new checkbox control with the specified width and height.
public CheckBox(int width, int height)Parameters
Section titled “Parameters”width int
The width of the control.
height int
The height of the control.
CheckBox(string)
Section titled “CheckBox(string)”Creates an auto sizing checkbox control with the specified text.
public CheckBox(string text)Parameters
Section titled “Parameters”text string
Properties
Section titled “Properties”LeftBracketGlyph
Section titled “LeftBracketGlyph”The glyph for the left-side bracket of the icon.
[DataMember]public int LeftBracketGlyph { get; set; }RightBracketGlyph
Section titled “RightBracketGlyph”The glyph for the right-side bracket of the icon.
[DataMember]public int RightBracketGlyph { get; set; }CheckedIconGlyph
Section titled “CheckedIconGlyph”The glyph of the icon when checked.
[DataMember]public int CheckedIconGlyph { get; set; }UncheckedIconGlyph
Section titled “UncheckedIconGlyph”The glyph of the icon when unchecked.
[DataMember]public int UncheckedIconGlyph { get; set; }CheckedIconColor
Section titled “CheckedIconColor”An optional color of the CheckedIconGlyph.
[DataMember]public Color? CheckedIconColor { get; set; }UncheckedIconColor
Section titled “UncheckedIconColor”An optional color of the UncheckedIconGlyph.
[DataMember]public Color? UncheckedIconColor { get; set; }BracketsThemeState
Section titled “BracketsThemeState”The theme state used with the brackets.
public ThemeStates BracketsThemeState { get; protected set; }IconThemeState
Section titled “IconThemeState”The theme state used with the icon of the
public ThemeStates IconThemeState { get; protected set; }Methods
Section titled “Methods”OnClick()
Section titled “OnClick()”Perfroms a click on the base button and also toggles the IsSelected property.
protected override void OnClick()RefreshThemeStateColors(Colors)
Section titled “RefreshThemeStateColors(Colors)”Updates the ThemeState by calling RefreshTheme(Colors) with the provided colors. Override this method to adjust how colors are used by the ThemeState.
protected override void RefreshThemeStateColors(Colors colors)Parameters
Section titled “Parameters”colors Colors
The colors to apply to the theme state.
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.
CreateControlSurface()
Section titled “CreateControlSurface()”Resizes the control surface based on AutoSize or the Width and Height properties.
protected override ICellSurface CreateControlSurface()Returns
Section titled “Returns”ICellSurface
The control’s surface.
EstimateControlSurface()
Section titled “EstimateControlSurface()”protected Rectangle EstimateControlSurface()Returns
Section titled “Returns”SadRogue.Primitives.Rectangle