Table of Contents

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

CheckboxControl

Checked(bool)

Sets the checked state

public CheckboxBuilder Checked(bool isChecked = true)

Parameters

isChecked bool

Returns

CheckboxBuilder

OnCheckedChanged(WindowEventHandler<bool>)

Sets the checked changed event handler with window access

public CheckboxBuilder OnCheckedChanged(WindowEventHandler<bool> handler)

Parameters

handler WindowEventHandler<bool>

Returns

CheckboxBuilder

OnCheckedChanged(EventHandler<bool>)

Sets the checked changed event handler

public CheckboxBuilder OnCheckedChanged(EventHandler<bool> handler)

Parameters

handler EventHandler<bool>

Returns

CheckboxBuilder

OnGotFocus(WindowEventHandler<EventArgs>)

Sets the GotFocus event handler with window access

public CheckboxBuilder OnGotFocus(WindowEventHandler<EventArgs> handler)

Parameters

handler WindowEventHandler<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

handler EventHandler

The 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

handler WindowEventHandler<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

handler EventHandler

The 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

CheckboxBuilder

StickyTop()

Makes the control stick to the top of the window

public CheckboxBuilder StickyTop()

Returns

CheckboxBuilder

Visible(bool)

Sets the visibility

public CheckboxBuilder Visible(bool visible = true)

Parameters

visible bool

Returns

CheckboxBuilder

WithAlignment(HorizontalAlignment)

Sets the horizontal alignment

public CheckboxBuilder WithAlignment(HorizontalAlignment alignment)

Parameters

alignment HorizontalAlignment

Returns

CheckboxBuilder

WithLabel(string)

Sets the checkbox label

public CheckboxBuilder WithLabel(string label)

Parameters

label string

Returns

CheckboxBuilder

WithMargin(int)

Sets uniform margin

public CheckboxBuilder WithMargin(int margin)

Parameters

margin int

Returns

CheckboxBuilder

WithMargin(int, int, int, int)

Sets the margin

public CheckboxBuilder WithMargin(int left, int top, int right, int bottom)

Parameters

left int
top int
right int
bottom int

Returns

CheckboxBuilder

WithName(string)

Sets the control name for lookup

public CheckboxBuilder WithName(string name)

Parameters

name string

Returns

CheckboxBuilder

WithStickyPosition(StickyPosition)

Sets the sticky position

public CheckboxBuilder WithStickyPosition(StickyPosition position)

Parameters

position StickyPosition

Returns

CheckboxBuilder

WithTag(object)

Sets a tag object

public CheckboxBuilder WithTag(object tag)

Parameters

tag object

Returns

CheckboxBuilder

WithVerticalAlignment(VerticalAlignment)

Sets the vertical alignment

public CheckboxBuilder WithVerticalAlignment(VerticalAlignment alignment)

Parameters

alignment VerticalAlignment

Returns

CheckboxBuilder

WithWidth(int)

Sets the width

public CheckboxBuilder WithWidth(int width)

Parameters

width int

Returns

CheckboxBuilder

Operators

implicit operator CheckboxControl(CheckboxBuilder)

Implicit conversion to CheckboxControl

public static implicit operator CheckboxControl(CheckboxBuilder builder)

Parameters

builder CheckboxBuilder

Returns

CheckboxControl