SectionHeader class Core

The overline caption above a section of a panel - "ROWS", "VALUES": small, uppercase, in the dim text colour, with an optional icon before it. Read by assistive technology as text; it takes no input.

Styling. From the style sheets (Select.Type<SectionHeader>()): the text's colour, size, weight and family, and the padding. The theme draws it 11 units, semibold, in Tokens.TextDim; the icon takes the text's colour.

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

Constructors

SectionHeader

public SectionHeader();

Properties

Height

public double Height { get; init; }

The height the header asks for.

Icon

public Action<IRenderSurface, LogRect, Rgba>? Icon { get; init; }

A small icon before the caption, drawn in the text's colour; null for none.

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; }

The caption, asked each time it is drawn and shown in capitals.

Methods

HitTest

public override Control? HitTest(LogPoint p);

The control under an ABSOLUTE point, or null. Containers recurse; leaves answer for themselves. Same bounds the render pass used.

Measure

public override LogSize Measure(LogSize available);

Desired size given the space available (layout containers sum this).

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.