Class CheckboxBuilder
- Namespace
- SharpConsoleUI.Builders
- Assembly
- SharpConsoleUI.dll
Fluent builder for checkbox controls
public sealed class CheckboxBuilder
- Inheritance
-
CheckboxBuilder
- Inherited Members
Methods
Build()
Builds the checkbox control
public CheckboxControl Build()
Returns
Checked(bool)
Sets the checked state
public CheckboxBuilder Checked(bool isChecked = true)
Parameters
isCheckedbool
Returns
OnCheckedChanged(WindowEventHandler<bool>)
Sets the checked changed event handler with window access
public CheckboxBuilder OnCheckedChanged(WindowEventHandler<bool> handler)
Parameters
handlerWindowEventHandler<bool>
Returns
OnCheckedChanged(EventHandler<bool>)
Sets the checked changed event handler
public CheckboxBuilder OnCheckedChanged(EventHandler<bool> handler)
Parameters
handlerEventHandler<bool>
Returns
OnGotFocus(WindowEventHandler<EventArgs>)
Sets the GotFocus event handler with window access
public CheckboxBuilder OnGotFocus(WindowEventHandler<EventArgs> handler)
Parameters
handlerWindowEventHandler<EventArgs>Handler that receives sender, event data, and window
Returns
- CheckboxBuilder
The builder for chaining
OnGotFocus(EventHandler)
Sets the GotFocus event handler
public CheckboxBuilder OnGotFocus(EventHandler handler)
Parameters
handlerEventHandlerThe event handler to invoke when the checkbox receives focus
Returns
- CheckboxBuilder
The builder for chaining
OnLostFocus(WindowEventHandler<EventArgs>)
Sets the LostFocus event handler with window access
public CheckboxBuilder OnLostFocus(WindowEventHandler<EventArgs> handler)
Parameters
handlerWindowEventHandler<EventArgs>Handler that receives sender, event data, and window
Returns
- CheckboxBuilder
The builder for chaining
OnLostFocus(EventHandler)
Sets the LostFocus event handler
public CheckboxBuilder OnLostFocus(EventHandler handler)
Parameters
handlerEventHandlerThe event handler to invoke when the checkbox loses focus
Returns
- CheckboxBuilder
The builder for chaining
StickyBottom()
Makes the control stick to the bottom of the window
public CheckboxBuilder StickyBottom()
Returns
StickyTop()
Makes the control stick to the top of the window
public CheckboxBuilder StickyTop()
Returns
Visible(bool)
Sets the visibility
public CheckboxBuilder Visible(bool visible = true)
Parameters
visiblebool
Returns
WithAlignment(HorizontalAlignment)
Sets the horizontal alignment
public CheckboxBuilder WithAlignment(HorizontalAlignment alignment)
Parameters
alignmentHorizontalAlignment
Returns
WithLabel(string)
Sets the checkbox label
public CheckboxBuilder WithLabel(string label)
Parameters
labelstring
Returns
WithMargin(int)
Sets uniform margin
public CheckboxBuilder WithMargin(int margin)
Parameters
marginint
Returns
WithMargin(int, int, int, int)
Sets the margin
public CheckboxBuilder WithMargin(int left, int top, int right, int bottom)
Parameters
Returns
WithName(string)
Sets the control name for lookup
public CheckboxBuilder WithName(string name)
Parameters
namestring
Returns
WithStickyPosition(StickyPosition)
Sets the sticky position
public CheckboxBuilder WithStickyPosition(StickyPosition position)
Parameters
positionStickyPosition
Returns
WithTag(object)
Sets a tag object
public CheckboxBuilder WithTag(object tag)
Parameters
tagobject
Returns
WithVerticalAlignment(VerticalAlignment)
Sets the vertical alignment
public CheckboxBuilder WithVerticalAlignment(VerticalAlignment alignment)
Parameters
alignmentVerticalAlignment
Returns
WithWidth(int)
Sets the width
public CheckboxBuilder WithWidth(int width)
Parameters
widthint
Returns
Operators
implicit operator CheckboxControl(CheckboxBuilder)
Implicit conversion to CheckboxControl
public static implicit operator CheckboxControl(CheckboxBuilder builder)
Parameters
builderCheckboxBuilder