DropDownButton class Core

A dropdown trigger (operator picker, combo openers): a bordered row showing an optional icon, the current value and the shared ⏷ chevron. Inherent behaviour: click, Space, Enter AND Down all open through the SAME endpoint (Down is the native combo-trigger key), the hover fill doubles as the focus visual, plus the shared ring. The opened list itself is a pane (MenuOverlayContent) — this control only triggers it, anchored at its own bounds.

Styling. From the style sheets (Select.Type<DropDownButton>()): background, border colour and width, corner radius, the text's colour, size, weight and family, the accent colour (the open look) and the opacity, in the states hover, focus, pressed and disabled. DropDownButton.Painter replaces all of it.

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

Constructors

DropDownButton

public DropDownButton();

Properties

CornerRadius

public double? CornerRadius { get; init; }

The corner radius it was built with; weighs like a presentational hint (over the theme, under the application's sheets).

Cursor

public override GridCursor Cursor { get; }

DrawIcon

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

Optional icon in the left gutter.

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.

IsOpen

public Func<bool>? IsOpen { get; init; }

True while the list this button opened is on screen: the trigger then shows the open look (accent frame and chevron) instead of the focus ring.

Open

public required Action<LogRect> Open { get; init; }

Opens the list, anchored at the trigger's rect.

Painter

public Action<IRenderSurface, LogRect, bool, bool>? Painter { get; init; }

Replaces the default body painting entirely (bounds, hovered, pressed) — the rule dialog's rows paint through the shared DropDownWidget and its colour row adds a swatch. The focus ring stays with the control.

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 current value, drawn and spoken.

Methods

Invoke

public override bool Invoke();

Act like a click on the part (a button fires, a checkbox flips, a menu row runs, a dropdown opens). False when the part has no action or is disabled.

OnKey

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

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

OnPointerPressed

public override void OnPointerPressed(LogPoint p, ArionModifiers mods, int clickCount);

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.