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 .
public sealed class CheckboxStateInheritance
Object → CheckboxState
Constructors
CheckboxState(CheckboxValue)
Creates a new state instance with the supplied value (defaults to ).
Parameters:
value(CheckboxValue):
public CheckboxState(CheckboxValue value = CheckboxValue.Unchecked)Properties
Checked
Convenience factory that returns a fresh with set to .
Returns: CheckboxState
public static CheckboxState Checked { get; }Indeterminate
Convenience factory that returns a fresh with set to .
Returns: CheckboxState
public static CheckboxState Indeterminate { get; }IsChecked
True if the checkbox value is .
Returns: Boolean
public bool IsChecked { get; }IsIndeterminate
True if the checkbox value is .
Returns: Boolean
public bool IsIndeterminate { get; }Unchecked
Convenience factory that returns a fresh with set to .
Returns: CheckboxState
public static CheckboxState Unchecked { get; }Value
The current value of the checkbox.
Returns: CheckboxValue
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.