Skip to content

CheckboxState

Namespace: Hex1b.Widgets

Assembly: Hex1b.dll

Mutable state object for a . Wraps a single field so the state can be lifted into a composite parent via and routed into the widget with .

csharp
public sealed class CheckboxState

Inheritance

ObjectCheckboxState

Constructors

CheckboxState(CheckboxValue)

Creates a new state instance with the supplied value (defaults to ).

Parameters:

csharp
public CheckboxState(CheckboxValue value = CheckboxValue.Unchecked)

Properties

Checked

Convenience factory that returns a fresh with set to .

Returns: CheckboxState

csharp
public static CheckboxState Checked { get; }

Indeterminate

Convenience factory that returns a fresh with set to .

Returns: CheckboxState

csharp
public static CheckboxState Indeterminate { get; }

IsChecked

True if the checkbox value is .

Returns: Boolean

csharp
public bool IsChecked { get; }

IsIndeterminate

True if the checkbox value is .

Returns: Boolean

csharp
public bool IsIndeterminate { get; }

Unchecked

Convenience factory that returns a fresh with set to .

Returns: CheckboxState

csharp
public static CheckboxState Unchecked { get; }

Value

The current value of the checkbox.

Returns: CheckboxValue

csharp
public CheckboxValue Value { get; set; }

Remarks

When the parent owns the state, toggle gestures (Enter, Spacebar, mouse click) mutate in place — the parent observes the change immediately without an shadow-sync.

The static , , and properties are convenience factories that allocate a fresh instance with the corresponding value. They are NOT shared singletons — each access returns a new instance, so callers cannot accidentally mutate one another's state.

Released under the MIT License.