CheckBox class Core

A labelled checkbox over the shared ArionIcons glyph. Inherent: it toggles on release-over (sliding off cancels) and on Space/Enter — the SAME endpoint — announces its new state to a focused screen-reader user, and its focus ring wraps the whole row.

Styling. From the style sheets (Select.Type<CheckBox>()): the caption's colour, size, weight and family, a box behind the whole row (background, border, corner radius), the opacity, the colour of the box and its check mark (ArionStyle.AccentColor) and the focus ring (ArionStyle.FocusRingColor and its siblings), in every state. The box's glyph is the icon set's (ArionIcons.CheckBox), drawn in the accent colour.

public sealed class CheckBox : Control
Namespace
ArionUI.Presentation.Controls
Package
ArionUI.Presentation · dotnet add package ArionUI.Presentation --prerelease
Inherits
Control

Constructors

CheckBox

public CheckBox();

Properties

Cursor

public override GridCursor Cursor { get; }

DrawsOwnFocus

public override bool DrawsOwnFocus { get; }

The control shows its focus itself (accent border, hover row, ring parameter). False = the host draws the shared default ring around Control.Bounds.

Focusable

public override bool Focusable { get; }

Can this KIND of control hold the keyboard focus? Combined with the live probes in Control.CanTakeFocus.

Role

public override ControlRole Role { get; }

What KIND of part this is for assistive technology — the automation peers translate it into their host's control type.

Text

public required Func<string> Text { get; init; }

Toggle

public required Action Toggle { get; init; }

ToggleState

public override bool? ToggleState { get; }

The checked state of a toggle part; null when the part does not toggle.

Value

public required Func<bool> Value { get; init; }

Methods

Invoke

public override bool Invoke();

The click/Space endpoint. Fire announces only while focused — a peer toggling an unfocused box raises its own state-changed event instead.

Measure

public override LogSize Measure(LogSize available);

Box, gap and caption; the caption measured with the host's measure when the tree has one, otherwise the available width.

OnKey

public override bool OnKey(ArionKey key, ArionModifiers mods);

Keys while focused. Return false to let the pane's fallback see the key.

OnPointerReleased

public override void OnPointerReleased(LogPoint p);

Render

public override void Render(IRenderSurface s, ControlFrame frame);

SpokenLabel

public override string? SpokenLabel();

What a screen reader speaks when this control receives the focus. A control that cannot take the focus but answers here is READ: it becomes a text part.