# Xui.ToolKit.UI.Widgets

Assembly: **Xui.ToolKit.UI** · [C# declarations](index.cs) · [Assembly overview](../index.md)

## Types

- [`class Button`](#api-2d95d71ac24f815b)
- [`class ButtonGroup`](#api-4a77c0db709dc809)
- [`class ButtonGroupItem`](#api-3838489d23584be9)
- [`enum ButtonVariant`](#api-4ec023eb57a2fb05)
- [`class Card`](#api-e42fa9ad7492e469)
- [`class Checkbox`](#api-fca86ebf113d3911)
- [`enum ColorRole`](#api-6e5771639b08017b)
- [`class Expander`](#api-a0eb20fc370b9f26)
- [`class ListView`](#api-2767b9f0076fcb20)
- [`class ListViewItem`](#api-41c1466f311cfbd6)
- [`class RadioButton`](#api-14f7e23605988fee)
- [`class TextInput`](#api-66f980692384383f)
- [`class Toggle`](#api-5989adeb838856d5)

<a id="api-2d95d71ac24f815b"></a>

## `class Button`

A button that consumes design system tokens for colors, shape, and typography. Supports [`Xui.ToolKit.UI.Widgets.ButtonVariant`](../xui-toolkit-ui-widgets/index.md#api-4ec023eb57a2fb05) (Filled, Outline, Text) and hover/pressed states.

```csharp
public partial class Button
{
    protected override void OnActivate();
    protected override void AnimateCore(TimeSpan previous, TimeSpan current);
}
public partial class Button : View, IDesignSystemChangeNotifications
{
    public Button();
    public string Text { get; set; }
    public nfloat? FontSize { get; set; }
    public CornerRadius? CornerRadius { get; set; }
    public ColorRole Role { get; set; }
    public ButtonVariant Variant { get; set; }
    public TextAlign LabelTextAlign { get; set; }
    public Action? Clicked { get; set; }

    public event Action? ClickMaybe;
    public event Action? ClickFarFetch;
    public event Action? Click;
    public bool WaitForPressFeedback { get; set; }
    public override int Count { get; }

    public override View this[int index] { get; }

    public void OnDesignTokenChange(DesignSystemChange changes);
    protected override void OnDeactivate();
    protected override Size MeasureCore(Size available, IMeasureContext context);
    protected override void RenderCore(IContext context);
    protected virtual Rect LabelBounds { get; }

    public override void OnPointerEvent(ref PointerEventRef e, EventPhase phase);
}
```

<a id="api-96694ec9e2822ed1"></a>

### [`Button.Button()`](#api-96694ec9e2822ed1)


```csharp
public Button();
```

Creates a new button with content-sized alignment.

<a id="api-1f1ab14e6d6a098d"></a>

### [`void Button.AnimateCore(TimeSpan previous, TimeSpan current)`](#api-1f1ab14e6d6a098d)


```csharp
protected override void AnimateCore(TimeSpan previous, TimeSpan current);
```

Override to animate this view and its children.

<a id="api-d702d7339cb7f912"></a>

### [`event Action? Button.Click`](#api-d702d7339cb7f912)


```csharp
public event Action? Click;
```

Raised when the committed click executes, before the compatibility Clicked callback.

<a id="api-9b467eeac281b970"></a>

### [`event Action? Button.ClickFarFetch`](#api-9b467eeac281b970)


```csharp
public event Action? ClickFarFetch;
```

Raised on a valid release, before Click. Start nonblocking preparation here.

<a id="api-e9b11bd97a1d2be2"></a>

### [`event Action? Button.ClickMaybe`](#api-e9b11bd97a1d2be2)


```csharp
public event Action? ClickMaybe;
```

Raised once when press recognition allows the highlight to appear. The gesture may still cancel.

<a id="api-ff3e7a4ae9d3f3b1"></a>

### [`Action? Button.Clicked`](#api-ff3e7a4ae9d3f3b1)


```csharp
public Action? Clicked { get; set; }
```

Invoked when the button is clicked.

<a id="api-f75b3f6f82ffe785"></a>

### [`CornerRadius? Button.CornerRadius`](#api-f75b3f6f82ffe785)


```csharp
public CornerRadius? CornerRadius { get; set; }
```

Optional shape override; otherwise uses the design system.

<a id="api-e5dcd77893ff3375"></a>

### [`int Button.Count`](#api-e5dcd77893ff3375)


```csharp
public override int Count { get; }
```

Returns the number of child views. Used by layout containers and traversal logic. Leaf views should return 0.

<a id="api-f360cbc0387507c9"></a>

### [`NFloat? Button.FontSize`](#api-f360cbc0387507c9)


```csharp
public nfloat? FontSize { get; set; }
```

Optional label size override; otherwise uses the design system.

<a id="api-24c510e178d2e77a"></a>

### [`View Button.this[int index]`](#api-24c510e178d2e77a)


```csharp
public override View this[int index] { get; }
```

Indexer to access child views by index. Layout containers should implement this to expose their children.

<a id="api-8c17756b5b6ecbaf"></a>

### [`Rect Button.LabelBounds`](#api-8c17756b5b6ecbaf)


```csharp
protected virtual Rect LabelBounds { get; }
```

The area available to the label, before applying the design system&#39;s padding.

<a id="api-44d857e4cba38a42"></a>

### [`TextAlign Button.LabelTextAlign`](#api-44d857e4cba38a42)


```csharp
public TextAlign LabelTextAlign { get; set; }
```

Horizontal alignment of the button label. Default is centered.

<a id="api-ad077933eb2f90a6"></a>

### [`Size Button.MeasureCore(Size available, IMeasureContext context)`](#api-ad077933eb2f90a6)


```csharp
protected override Size MeasureCore(Size available, IMeasureContext context);
```

Override to compute the desired border-edge size.

<a id="api-eb75971b10c4c9e9"></a>

### [`void Button.OnActivate()`](#api-eb75971b10c4c9e9)


```csharp
protected override void OnActivate();
```

Called when this view becomes active — it will receive events, render, and animate. Override this to start animations, subscribe to data sources, or acquire resources.

<a id="api-618c51ec81580102"></a>

### [`void Button.OnDeactivate()`](#api-618c51ec81580102)


```csharp
protected override void OnDeactivate();
```

Called when this view becomes dormant — it should stop animations, timers, and event subscriptions. The view may remain in the tree (e.g., in a virtualizing panel&#39;s recycle pool).

<a id="api-2e626526c9f8455c"></a>

### [`void Button.OnDesignTokenChange(DesignSystemChange changes)`](#api-2e626526c9f8455c)


```csharp
public void OnDesignTokenChange(DesignSystemChange changes);
```

Responds to the changed token groups without duplicating theme state on the view.

<a id="api-2728ff57fcd6dde9"></a>

### [`void Button.OnPointerEvent(ref PointerEventRef e, EventPhase phase)`](#api-2728ff57fcd6dde9)


```csharp
public override void OnPointerEvent(ref PointerEventRef e, EventPhase phase);
```

Called during event dispatch to handle a pointer event in a specific event phase.

<a id="api-05cbb72c080c4cd1"></a>

### [`void Button.RenderCore(IContext context)`](#api-05cbb72c080c4cd1)


```csharp
protected override void RenderCore(IContext context);
```

Override to render this view and its children.

<a id="api-b19017f1ba52cfb5"></a>

### [`ColorRole Button.Role`](#api-b19017f1ba52cfb5)


```csharp
public ColorRole Role { get; set; }
```

Which color group to use. Default is Primary.

<a id="api-bc01725f1bb4cbc5"></a>

### [`string Button.Text`](#api-bc01725f1bb4cbc5)


```csharp
public string Text { get; set; }
```

The button label text.

<a id="api-160521bbb73c8420"></a>

### [`ButtonVariant Button.Variant`](#api-160521bbb73c8420)


```csharp
public ButtonVariant Variant { get; set; }
```

Visual weight of the button. Default is Filled.

<a id="api-c7a2dcaa19a23cfb"></a>

### [`bool Button.WaitForPressFeedback`](#api-c7a2dcaa19a23cfb)


```csharp
public bool WaitForPressFeedback { get; set; }
```

Waits for a highlighted render and the following animation tick before executing a quick click.


<a id="api-4a77c0db709dc809"></a>

## `class ButtonGroup`

A horizontal group of buttons that share a continuous border. Supports [`Xui.ToolKit.UI.Widgets.ButtonVariant`](../xui-toolkit-ui-widgets/index.md#api-4ec023eb57a2fb05) (Filled, Outline, Text) and single selection.

```csharp
public class ButtonGroup : ViewCollection, IDesignSystemChangeNotifications
{
    public int SelectedIndex { get; set; }
    public Action<int>? SelectionChanged { get; set; }
    public ColorRole Role { get; set; }
    public ButtonVariant Variant { get; set; }

    public void OnDesignTokenChange(DesignSystemChange changes);
    protected override void OnDeactivate();
    protected override Size MeasureCore(Size available, IMeasureContext context);
    protected override void ArrangeCore(Rect rect, IMeasureContext context);
    protected override void RenderCore(IContext context);
}
```

<a id="api-32c832bca4ce8ed9"></a>

### [`void ButtonGroup.ArrangeCore(Rect rect, IMeasureContext context)`](#api-32c832bca4ce8ed9)


```csharp
protected override void ArrangeCore(Rect rect, IMeasureContext context);
```

Override to arrange children within this view&#39;s final frame.

<a id="api-d5ef0cb24ae86b6a"></a>

### [`Size ButtonGroup.MeasureCore(Size available, IMeasureContext context)`](#api-d5ef0cb24ae86b6a)


```csharp
protected override Size MeasureCore(Size available, IMeasureContext context);
```

Override to compute the desired border-edge size.

<a id="api-c59afa18f19abc43"></a>

### [`void ButtonGroup.OnDeactivate()`](#api-c59afa18f19abc43)


```csharp
protected override void OnDeactivate();
```

Called when this view becomes dormant — it should stop animations, timers, and event subscriptions. The view may remain in the tree (e.g., in a virtualizing panel&#39;s recycle pool).

<a id="api-8accf511b37f29c3"></a>

### [`void ButtonGroup.OnDesignTokenChange(DesignSystemChange changes)`](#api-8accf511b37f29c3)


```csharp
public void OnDesignTokenChange(DesignSystemChange changes);
```

Responds to the changed token groups without duplicating theme state on the view.

<a id="api-ce4559f0e1c2a96b"></a>

### [`void ButtonGroup.RenderCore(IContext context)`](#api-ce4559f0e1c2a96b)


```csharp
protected override void RenderCore(IContext context);
```

Override to render this view and its children.

<a id="api-56580570b725abfc"></a>

### [`ColorRole ButtonGroup.Role`](#api-56580570b725abfc)


```csharp
public ColorRole Role { get; set; }
```

Which color group to use. Default is Primary.

<a id="api-0ce462de8429fd89"></a>

### [`int ButtonGroup.SelectedIndex`](#api-0ce462de8429fd89)


```csharp
public int SelectedIndex { get; set; }
```

Gets or sets the selected button index (0-based).

<a id="api-a25eea58df9d8484"></a>

### [`Action<int>? ButtonGroup.SelectionChanged`](#api-a25eea58df9d8484)


```csharp
public Action<int>? SelectionChanged { get; set; }
```

Invoked when the selection changes.

<a id="api-27c0a1a55e002ec1"></a>

### [`ButtonVariant ButtonGroup.Variant`](#api-27c0a1a55e002ec1)


```csharp
public ButtonVariant Variant { get; set; }
```

Visual style. Default is Outline.


<a id="api-3838489d23584be9"></a>

## `class ButtonGroupItem`

A single item inside a [`Xui.ToolKit.UI.Widgets.ButtonGroup`](../xui-toolkit-ui-widgets/index.md#api-4a77c0db709dc809). Renders only text — the group draws backgrounds.

```csharp
public class ButtonGroupItem : View, IDesignSystemChangeNotifications
{
    public string Text { get; set; }
    public override int Count { get; }

    public override View this[int index] { get; }

    public void OnDesignTokenChange(DesignSystemChange changes);
    protected override void OnDeactivate();
    protected override Size MeasureCore(Size available, IMeasureContext context);
    protected override void RenderCore(IContext context);
    public override void OnPointerEvent(ref PointerEventRef e, EventPhase phase);
}
```

<a id="api-579c6e835bf07315"></a>

### [`int ButtonGroupItem.Count`](#api-579c6e835bf07315)


```csharp
public override int Count { get; }
```

Returns the number of child views. Used by layout containers and traversal logic. Leaf views should return 0.

<a id="api-88099d57a044d8c7"></a>

### [`View ButtonGroupItem.this[int index]`](#api-88099d57a044d8c7)


```csharp
public override View this[int index] { get; }
```

Indexer to access child views by index. Layout containers should implement this to expose their children.

<a id="api-83311fec0f1e2d4e"></a>

### [`Size ButtonGroupItem.MeasureCore(Size available, IMeasureContext context)`](#api-83311fec0f1e2d4e)


```csharp
protected override Size MeasureCore(Size available, IMeasureContext context);
```

Override to compute the desired border-edge size.

<a id="api-60398719b675ad6c"></a>

### [`void ButtonGroupItem.OnDeactivate()`](#api-60398719b675ad6c)


```csharp
protected override void OnDeactivate();
```

Called when this view becomes dormant — it should stop animations, timers, and event subscriptions. The view may remain in the tree (e.g., in a virtualizing panel&#39;s recycle pool).

<a id="api-1f8b356db8e538eb"></a>

### [`void ButtonGroupItem.OnDesignTokenChange(DesignSystemChange changes)`](#api-1f8b356db8e538eb)


```csharp
public void OnDesignTokenChange(DesignSystemChange changes);
```

Responds to the changed token groups without duplicating theme state on the view.

<a id="api-3cfe96c6b349047e"></a>

### [`void ButtonGroupItem.OnPointerEvent(ref PointerEventRef e, EventPhase phase)`](#api-3cfe96c6b349047e)


```csharp
public override void OnPointerEvent(ref PointerEventRef e, EventPhase phase);
```

Called during event dispatch to handle a pointer event in a specific event phase.

<a id="api-141b3b2574013c1e"></a>

### [`void ButtonGroupItem.RenderCore(IContext context)`](#api-141b3b2574013c1e)


```csharp
protected override void RenderCore(IContext context);
```

Override to render this view and its children.

<a id="api-18ce86777bd152c4"></a>

### [`string ButtonGroupItem.Text`](#api-18ce86777bd152c4)


```csharp
public string Text { get; set; }
```

The item label.


<a id="api-4ec023eb57a2fb05"></a>

## `enum ButtonVariant`

Controls the visual weight of a button.

```csharp
public enum ButtonVariant
{
    Filled,
    Outline,
    Text,
}
```

<a id="api-092be3a9caa214bf"></a>

### [`ButtonVariant.Filled`](#api-092be3a9caa214bf)


```csharp
Filled
```

Filled background — highest visual weight. Default for primary actions.

<a id="api-865e361ea448b609"></a>

### [`ButtonVariant.Outline`](#api-865e361ea448b609)


```csharp
Outline
```

Outline border only — medium visual weight. For secondary/grouped actions.

<a id="api-9bea6bd1cfdc61dc"></a>

### [`ButtonVariant.Text`](#api-9bea6bd1cfdc61dc)


```csharp
Text
```

Text only — lowest visual weight. Background appears on hover/press only.


<a id="api-e42fa9ad7492e469"></a>

## `class Card`

A card container that uses design system tokens for background, outline, shape, and padding. By default uses Surface colors. Set [`Xui.ToolKit.UI.Widgets.Card.Role`](../xui-toolkit-ui-widgets/index.md#api-56bd912abdd4a418) to use a specific color group.

```csharp
public class Card : View, IDesignSystemChangeNotifications
{
    public nfloat? Padding { get; set; }
    public bool ClipContent { get; set; }
    public bool UseCompositionGroup { get; set; }
    public nfloat ShadowExtent { get; set; }
    public Color ShadowColor { get; set; }
    public override Rect CullingFrame { get; }
    public View? Content { get; set; }
    public ColorRole? Role { get; set; }
    public override int Count { get; }

    public override View this[int index] { get; }

    public void OnDesignTokenChange(DesignSystemChange changes);
    protected override void OnDeactivate();
    protected override Size MeasureCore(Size available, IMeasureContext context);
    protected override void ArrangeCore(Rect rect, IMeasureContext context);
    protected override void RenderCore(IContext context);
}
```

<a id="api-117680bd6b58d33c"></a>

### [`void Card.ArrangeCore(Rect rect, IMeasureContext context)`](#api-117680bd6b58d33c)


```csharp
protected override void ArrangeCore(Rect rect, IMeasureContext context);
```

Override to arrange children within this view&#39;s final frame.

<a id="api-8eb3050f88b6e9b5"></a>

### [`bool Card.ClipContent`](#api-8eb3050f88b6e9b5)


```csharp
public bool ClipContent { get; set; }
```

Clips content to the rounded card outline, useful for content that reaches the edges.

<a id="api-65a3b61571eb95a8"></a>

### [`View? Card.Content`](#api-65a3b61571eb95a8)


```csharp
public View? Content { get; set; }
```

The content view inside the card.

<a id="api-f7cc765501c1e861"></a>

### [`int Card.Count`](#api-f7cc765501c1e861)


```csharp
public override int Count { get; }
```

Returns the number of child views. Used by layout containers and traversal logic. Leaf views should return 0.

<a id="api-6f322e658bbd4cf6"></a>

### [`Rect Card.CullingFrame`](#api-6f322e658bbd4cf6)


```csharp
public override Rect CullingFrame { get; }
```

Gets this view&#39;s conservative bounds in its parent coordinate space for render culling.

A container may override this when its rendered geometry differs from its layout frame. Computing the union of descendant culling frames is deliberately deferred: it can be more expensive than rendering for small subtrees.

<a id="api-7e2e81ed51694db6"></a>

### [`View Card.this[int index]`](#api-7e2e81ed51694db6)


```csharp
public override View this[int index] { get; }
```

Indexer to access child views by index. Layout containers should implement this to expose their children.

<a id="api-f6bbee16bcb3aadf"></a>

### [`Size Card.MeasureCore(Size available, IMeasureContext context)`](#api-f6bbee16bcb3aadf)


```csharp
protected override Size MeasureCore(Size available, IMeasureContext context);
```

Override to compute the desired border-edge size.

<a id="api-dc20220a6a2b6b8d"></a>

### [`void Card.OnDeactivate()`](#api-dc20220a6a2b6b8d)


```csharp
protected override void OnDeactivate();
```

Called when this view becomes dormant — it should stop animations, timers, and event subscriptions. The view may remain in the tree (e.g., in a virtualizing panel&#39;s recycle pool).

<a id="api-6c87666eefc28cf5"></a>

### [`void Card.OnDesignTokenChange(DesignSystemChange changes)`](#api-6c87666eefc28cf5)


```csharp
public void OnDesignTokenChange(DesignSystemChange changes);
```

Responds to the changed token groups without duplicating theme state on the view.

<a id="api-6ca7ed2870db0bb6"></a>

### [`NFloat? Card.Padding`](#api-6ca7ed2870db0bb6)


```csharp
public nfloat? Padding { get; set; }
```

Content inset. Null uses the design system spacing; zero allows content to reach the card edges.

<a id="api-26ef6dbe93f10077"></a>

### [`void Card.RenderCore(IContext context)`](#api-26ef6dbe93f10077)


```csharp
protected override void RenderCore(IContext context);
```

Override to render this view and its children.

<a id="api-56bd912abdd4a418"></a>

### [`ColorRole? Card.Role`](#api-56bd912abdd4a418)


```csharp
public ColorRole? Role { get; set; }
```

When null, the card uses Surface colors. When set, uses the specified color group&#39;s Container/OnContainer as background/foreground.

<a id="api-0d7892b4a4b74e5b"></a>

### [`Color Card.ShadowColor`](#api-0d7892b4a4b74e5b)


```csharp
public Color ShadowColor { get; set; }
```

Color and opacity at the shadow&#39;s inner edge.

<a id="api-a194cf9a5b3de207"></a>

### [`NFloat Card.ShadowExtent`](#api-a194cf9a5b3de207)


```csharp
public nfloat ShadowExtent { get; set; }
```

Outer shadow fade distance. Zero disables the shadow; layout size is unchanged.

<a id="api-511c024f1573e51e"></a>

### [`bool Card.UseCompositionGroup`](#api-511c024f1573e51e)


```csharp
public bool UseCompositionGroup { get; set; }
```

Use a keyed native surface for this card&#39;s outline, shadow, and content.


<a id="api-fca86ebf113d3911"></a>

## `class Checkbox`

A checkbox with a checkmark drawn via path commands. Consumes design system tokens for colors, shape, and sizing.

```csharp
public class Checkbox : View, IDesignSystemChangeNotifications
{
    public bool IsChecked { get; set; }
    public Action<bool>? Changed { get; set; }

    public Checkbox();
    public override int Count { get; }

    public override View this[int index] { get; }

    public void OnDesignTokenChange(DesignSystemChange changes);
    protected override void OnDeactivate();
    protected override Size MeasureCore(Size available, IMeasureContext context);
    protected override void RenderCore(IContext context);
    public override void OnPointerEvent(ref PointerEventRef e, EventPhase phase);
}
```

<a id="api-81acfc1d509aa9e4"></a>

### [`Checkbox.Checkbox()`](#api-81acfc1d509aa9e4)


```csharp
public Checkbox();
```

Creates a checkbox with content-sized alignment.

<a id="api-e6856c1972c25176"></a>

### [`Action<bool>? Checkbox.Changed`](#api-e6856c1972c25176)


```csharp
public Action<bool>? Changed { get; set; }
```

Invoked when the checked state changes.

<a id="api-f63f163bd3214504"></a>

### [`int Checkbox.Count`](#api-f63f163bd3214504)


```csharp
public override int Count { get; }
```

Gets the number of child views, which is always zero.

<a id="api-8f319f77d0aee68e"></a>

### [`bool Checkbox.IsChecked`](#api-8f319f77d0aee68e)


```csharp
public bool IsChecked { get; set; }
```

Gets or sets whether the checkbox is checked.

<a id="api-1703a3de62917bd2"></a>

### [`View Checkbox.this[int index]`](#api-1703a3de62917bd2)


```csharp
public override View this[int index] { get; }
```

Gets a child view by index.

**Throws** `Always thrown because a checkbox has no child views.`: Always thrown because a checkbox has no child views.

<a id="api-282ee088416d903f"></a>

### [`Size Checkbox.MeasureCore(Size available, IMeasureContext context)`](#api-282ee088416d903f)


```csharp
protected override Size MeasureCore(Size available, IMeasureContext context);
```

Measures the checkbox using its design-system-defined square size.

<a id="api-cac50ee84d4af9a5"></a>

### [`void Checkbox.OnDeactivate()`](#api-cac50ee84d4af9a5)


```csharp
protected override void OnDeactivate();
```

Called when this view becomes dormant — it should stop animations, timers, and event subscriptions. The view may remain in the tree (e.g., in a virtualizing panel&#39;s recycle pool).

<a id="api-6863ea0d52788ae0"></a>

### [`void Checkbox.OnDesignTokenChange(DesignSystemChange changes)`](#api-6863ea0d52788ae0)


```csharp
public void OnDesignTokenChange(DesignSystemChange changes);
```

Responds to the changed token groups without duplicating theme state on the view.

<a id="api-a4e605cf79379451"></a>

### [`void Checkbox.OnPointerEvent(ref PointerEventRef e, EventPhase phase)`](#api-a4e605cf79379451)


```csharp
public override void OnPointerEvent(ref PointerEventRef e, EventPhase phase);
```

Updates pointer feedback and toggles the checked state on a completed tap.

<a id="api-84596e1d7b1b27b5"></a>

### [`void Checkbox.RenderCore(IContext context)`](#api-84596e1d7b1b27b5)


```csharp
protected override void RenderCore(IContext context);
```

Renders the checkbox box, border, and optional checkmark.


<a id="api-6e5771639b08017b"></a>

## `enum ColorRole`

Selects which color group from the design system a widget should use.

```csharp
public enum ColorRole
{
    Primary,
    Secondary,
    Tertiary,
    Warning,
    Error,
    Neutral,
}
```

<a id="api-a44e3d74a3e972b6"></a>

### [`ColorRole.Error`](#api-a44e3d74a3e972b6)


```csharp
Error
```

Error / destructive state colors.

<a id="api-12b2357de6435028"></a>

### [`ColorRole.Neutral`](#api-12b2357de6435028)


```csharp
Neutral
```

Low-contrast neutral colors for quiet buttons, toolbars, etc.

<a id="api-047dd128f3b269d5"></a>

### [`ColorRole.Primary`](#api-047dd128f3b269d5)


```csharp
Primary
```

Brand / primary action colors.

<a id="api-8fbe8d004e4428f0"></a>

### [`ColorRole.Secondary`](#api-8fbe8d004e4428f0)


```csharp
Secondary
```

Supporting / secondary action colors.

<a id="api-e8c4aaf6bf5a3f22"></a>

### [`ColorRole.Tertiary`](#api-e8c4aaf6bf5a3f22)


```csharp
Tertiary
```

Tertiary highlight / accent colors.

<a id="api-a61a969f994597c7"></a>

### [`ColorRole.Warning`](#api-a61a969f994597c7)


```csharp
Warning
```

Warning / caution state colors.


<a id="api-a0eb20fc370b9f26"></a>

## `class Expander`

A card-like container with a clickable title that expands/collapses its content with an animated transition. Consumes motion tokens from the design system.

```csharp
public class Expander : View, IDesignSystemChangeNotifications
{
    public string Title { get; set; }
    public bool IsExpanded { get; set; }
    public View? Content { get; set; }
    public override int Count { get; }

    public override View this[int index] { get; }

    protected override void OnActivate();
    public void OnDesignTokenChange(DesignSystemChange changes);
    protected override void OnDeactivate();
    protected override void AnimateCore(TimeSpan previousTime, TimeSpan currentTime);
    protected override Size MeasureCore(Size available, IMeasureContext context);
    protected override void ArrangeCore(Rect rect, IMeasureContext context);
    protected override void RenderCore(IContext context);
    public override void OnPointerEvent(ref PointerEventRef e, EventPhase phase);
}
```

<a id="api-296fc76acaf9db67"></a>

### [`void Expander.AnimateCore(TimeSpan previousTime, TimeSpan currentTime)`](#api-296fc76acaf9db67)


```csharp
protected override void AnimateCore(TimeSpan previousTime, TimeSpan currentTime);
```

Override to animate this view and its children.

<a id="api-97336cb069692ec1"></a>

### [`void Expander.ArrangeCore(Rect rect, IMeasureContext context)`](#api-97336cb069692ec1)


```csharp
protected override void ArrangeCore(Rect rect, IMeasureContext context);
```

Override to arrange children within this view&#39;s final frame.

<a id="api-cc0f511cba04ef89"></a>

### [`View? Expander.Content`](#api-cc0f511cba04ef89)


```csharp
public View? Content { get; set; }
```

The content view shown when expanded.

<a id="api-037104dee7a0cf02"></a>

### [`int Expander.Count`](#api-037104dee7a0cf02)


```csharp
public override int Count { get; }
```

Returns the number of child views. Used by layout containers and traversal logic. Leaf views should return 0.

<a id="api-c689bc835f9c6969"></a>

### [`bool Expander.IsExpanded`](#api-c689bc835f9c6969)


```csharp
public bool IsExpanded { get; set; }
```

Gets or sets whether the expander is expanded.

<a id="api-c546dd41bdec7547"></a>

### [`View Expander.this[int index]`](#api-c546dd41bdec7547)


```csharp
public override View this[int index] { get; }
```

Indexer to access child views by index. Layout containers should implement this to expose their children.

<a id="api-d21406124c3dc067"></a>

### [`Size Expander.MeasureCore(Size available, IMeasureContext context)`](#api-d21406124c3dc067)


```csharp
protected override Size MeasureCore(Size available, IMeasureContext context);
```

Override to compute the desired border-edge size.

<a id="api-5f26160afdb5a27f"></a>

### [`void Expander.OnActivate()`](#api-5f26160afdb5a27f)


```csharp
protected override void OnActivate();
```

Called when this view becomes active — it will receive events, render, and animate. Override this to start animations, subscribe to data sources, or acquire resources.

<a id="api-4f51fd174dd93999"></a>

### [`void Expander.OnDeactivate()`](#api-4f51fd174dd93999)


```csharp
protected override void OnDeactivate();
```

Called when this view becomes dormant — it should stop animations, timers, and event subscriptions. The view may remain in the tree (e.g., in a virtualizing panel&#39;s recycle pool).

<a id="api-09987ccbcea8cfea"></a>

### [`void Expander.OnDesignTokenChange(DesignSystemChange changes)`](#api-09987ccbcea8cfea)


```csharp
public void OnDesignTokenChange(DesignSystemChange changes);
```

Responds to the changed token groups without duplicating theme state on the view.

<a id="api-60ba539ca5b8f691"></a>

### [`void Expander.OnPointerEvent(ref PointerEventRef e, EventPhase phase)`](#api-60ba539ca5b8f691)


```csharp
public override void OnPointerEvent(ref PointerEventRef e, EventPhase phase);
```

Called during event dispatch to handle a pointer event in a specific event phase.

<a id="api-3525f5577cd681c4"></a>

### [`void Expander.RenderCore(IContext context)`](#api-3525f5577cd681c4)


```csharp
protected override void RenderCore(IContext context);
```

Override to render this view and its children.

<a id="api-aac1d07848a4c3e7"></a>

### [`string Expander.Title`](#api-aac1d07848a4c3e7)


```csharp
public string Title { get; set; }
```

The title text shown in the header.


<a id="api-2767b9f0076fcb20"></a>

## `class ListView`

A vertical list with selectable items, internally scrollable. Each [`Xui.ToolKit.UI.Widgets.ListViewItem`](../xui-toolkit-ui-widgets/index.md#api-41c1466f311cfbd6) supports hover and selection states using design system tokens.

```csharp
public class ListView : View, IDesignSystemChangeNotifications
{
    public int SelectedIndex { get; set; }
    public Action<int>? SelectionChanged { get; set; }
    public ColorRole Role { get; set; }

    public ListView();
    public ReadOnlySpan<View> Content { init; }
    public override int Count { get; }

    public override View this[int index] { get; }

    public void OnDesignTokenChange(DesignSystemChange changes);
    protected override void OnDeactivate();
    protected override Size MeasureCore(Size available, IMeasureContext context);
    protected override void ArrangeCore(Rect rect, IMeasureContext context);
    protected override void RenderCore(IContext context);
}
```

<a id="api-4363bc7c3df751d4"></a>

### [`ListView.ListView()`](#api-4363bc7c3df751d4)


```csharp
public ListView();
```

Initializes a list view with an internal scrollable content container.

<a id="api-e3b9470ee6dc2948"></a>

### [`void ListView.ArrangeCore(Rect rect, IMeasureContext context)`](#api-e3b9470ee6dc2948)


```csharp
protected override void ArrangeCore(Rect rect, IMeasureContext context);
```

Override to arrange children within this view&#39;s final frame.

<a id="api-181233ff3c69fa4a"></a>

### [`ReadOnlySpan<View> ListView.Content`](#api-181233ff3c69fa4a)


```csharp
public ReadOnlySpan<View> Content { init; }
```

The items to display. Set via collection initializer.

<a id="api-f9fe69e98e3ab3ad"></a>

### [`int ListView.Count`](#api-f9fe69e98e3ab3ad)


```csharp
public override int Count { get; }
```

Returns the number of child views. Used by layout containers and traversal logic. Leaf views should return 0.

<a id="api-e938e42359d985b6"></a>

### [`View ListView.this[int index]`](#api-e938e42359d985b6)


```csharp
public override View this[int index] { get; }
```

Indexer to access child views by index. Layout containers should implement this to expose their children.

<a id="api-bd9162e4e1691dbc"></a>

### [`Size ListView.MeasureCore(Size available, IMeasureContext context)`](#api-bd9162e4e1691dbc)


```csharp
protected override Size MeasureCore(Size available, IMeasureContext context);
```

Override to compute the desired border-edge size.

<a id="api-505e17b67f415b69"></a>

### [`void ListView.OnDeactivate()`](#api-505e17b67f415b69)


```csharp
protected override void OnDeactivate();
```

Called when this view becomes dormant — it should stop animations, timers, and event subscriptions. The view may remain in the tree (e.g., in a virtualizing panel&#39;s recycle pool).

<a id="api-81da88fc0f82cd37"></a>

### [`void ListView.OnDesignTokenChange(DesignSystemChange changes)`](#api-81da88fc0f82cd37)


```csharp
public void OnDesignTokenChange(DesignSystemChange changes);
```

Responds to the changed token groups without duplicating theme state on the view.

<a id="api-9c87b1e558c22633"></a>

### [`void ListView.RenderCore(IContext context)`](#api-9c87b1e558c22633)


```csharp
protected override void RenderCore(IContext context);
```

Override to render this view and its children.

<a id="api-d68e50a701cb0e41"></a>

### [`ColorRole ListView.Role`](#api-d68e50a701cb0e41)


```csharp
public ColorRole Role { get; set; }
```

Which color group to use for selection. Default is Primary.

<a id="api-7174c69f817869ed"></a>

### [`int ListView.SelectedIndex`](#api-7174c69f817869ed)


```csharp
public int SelectedIndex { get; set; }
```

Gets or sets the selected item index (-1 for no selection).

<a id="api-964dd5c3128143f4"></a>

### [`Action<int>? ListView.SelectionChanged`](#api-964dd5c3128143f4)


```csharp
public Action<int>? SelectionChanged { get; set; }
```

Invoked when the selection changes.


<a id="api-41c1466f311cfbd6"></a>

## `class ListViewItem`

A single selectable item inside a [`Xui.ToolKit.UI.Widgets.ListView`](../xui-toolkit-ui-widgets/index.md#api-2767b9f0076fcb20). Renders hover/selection backgrounds and hosts a content view.

```csharp
public class ListViewItem : View, IDesignSystemChangeNotifications
{
    public View? ItemContent { get; set; }
    public override int Count { get; }

    public override View this[int index] { get; }

    public void OnDesignTokenChange(DesignSystemChange changes);
    protected override void OnDeactivate();
    protected override Size MeasureCore(Size available, IMeasureContext context);
    protected override void ArrangeCore(Rect rect, IMeasureContext context);
    protected override void RenderCore(IContext context);
    public override void OnPointerEvent(ref PointerEventRef e, EventPhase phase);
}
```

<a id="api-3137a871cc193ccb"></a>

### [`void ListViewItem.ArrangeCore(Rect rect, IMeasureContext context)`](#api-3137a871cc193ccb)


```csharp
protected override void ArrangeCore(Rect rect, IMeasureContext context);
```

Override to arrange children within this view&#39;s final frame.

<a id="api-9d1090b20ec75ae8"></a>

### [`int ListViewItem.Count`](#api-9d1090b20ec75ae8)


```csharp
public override int Count { get; }
```

Returns the number of child views. Used by layout containers and traversal logic. Leaf views should return 0.

<a id="api-ef309f7d3f066bcd"></a>

### [`View ListViewItem.this[int index]`](#api-ef309f7d3f066bcd)


```csharp
public override View this[int index] { get; }
```

Indexer to access child views by index. Layout containers should implement this to expose their children.

<a id="api-7b8541610f4d9447"></a>

### [`View? ListViewItem.ItemContent`](#api-7b8541610f4d9447)


```csharp
public View? ItemContent { get; set; }
```

The content view displayed inside this item.

<a id="api-9e3891f28d0ba862"></a>

### [`Size ListViewItem.MeasureCore(Size available, IMeasureContext context)`](#api-9e3891f28d0ba862)


```csharp
protected override Size MeasureCore(Size available, IMeasureContext context);
```

Override to compute the desired border-edge size.

<a id="api-8e97c2ced0a6cfc4"></a>

### [`void ListViewItem.OnDeactivate()`](#api-8e97c2ced0a6cfc4)


```csharp
protected override void OnDeactivate();
```

Called when this view becomes dormant — it should stop animations, timers, and event subscriptions. The view may remain in the tree (e.g., in a virtualizing panel&#39;s recycle pool).

<a id="api-6776e3724769b1b6"></a>

### [`void ListViewItem.OnDesignTokenChange(DesignSystemChange changes)`](#api-6776e3724769b1b6)


```csharp
public void OnDesignTokenChange(DesignSystemChange changes);
```

Responds to the changed token groups without duplicating theme state on the view.

<a id="api-bd2f239a15e488d0"></a>

### [`void ListViewItem.OnPointerEvent(ref PointerEventRef e, EventPhase phase)`](#api-bd2f239a15e488d0)


```csharp
public override void OnPointerEvent(ref PointerEventRef e, EventPhase phase);
```

Called during event dispatch to handle a pointer event in a specific event phase.

<a id="api-2e626773ebcaf8d4"></a>

### [`void ListViewItem.RenderCore(IContext context)`](#api-2e626773ebcaf8d4)


```csharp
protected override void RenderCore(IContext context);
```

Override to render this view and its children.


<a id="api-14f7e23605988fee"></a>

## `class RadioButton`

A radio button (circle with filled dot when selected). Consumes design system tokens for colors and sizing.

```csharp
public class RadioButton : View, IDesignSystemChangeNotifications
{
    public bool IsSelected { get; set; }
    public Action<bool>? Changed { get; set; }

    public RadioButton();
    public override int Count { get; }

    public override View this[int index] { get; }

    public void OnDesignTokenChange(DesignSystemChange changes);
    protected override void OnDeactivate();
    protected override Size MeasureCore(Size available, IMeasureContext context);
    protected override void RenderCore(IContext context);
    public override void OnPointerEvent(ref PointerEventRef e, EventPhase phase);
}
```

<a id="api-4d7a7796a3aac078"></a>

### [`RadioButton.RadioButton()`](#api-4d7a7796a3aac078)


```csharp
public RadioButton();
```

Creates a radio button with content-sized alignment.

<a id="api-b0596a0dedaa08f7"></a>

### [`Action<bool>? RadioButton.Changed`](#api-b0596a0dedaa08f7)


```csharp
public Action<bool>? Changed { get; set; }
```

Invoked when the selection state changes.

<a id="api-b0382fd42b5fa666"></a>

### [`int RadioButton.Count`](#api-b0382fd42b5fa666)


```csharp
public override int Count { get; }
```

Gets the number of child views, which is always zero.

<a id="api-fbef518ee6e979d4"></a>

### [`bool RadioButton.IsSelected`](#api-fbef518ee6e979d4)


```csharp
public bool IsSelected { get; set; }
```

Gets or sets whether the radio button is selected.

<a id="api-f3f8b9d4a3dc94ad"></a>

### [`View RadioButton.this[int index]`](#api-f3f8b9d4a3dc94ad)


```csharp
public override View this[int index] { get; }
```

Gets a child view by index.

**Throws** `Always thrown because a radio button has no child views.`: Always thrown because a radio button has no child views.

<a id="api-4ddd02366634ef1f"></a>

### [`Size RadioButton.MeasureCore(Size available, IMeasureContext context)`](#api-4ddd02366634ef1f)


```csharp
protected override Size MeasureCore(Size available, IMeasureContext context);
```

Measures the radio button using its design-system-defined diameter.

<a id="api-9fef71cdfd2ea019"></a>

### [`void RadioButton.OnDeactivate()`](#api-9fef71cdfd2ea019)


```csharp
protected override void OnDeactivate();
```

Called when this view becomes dormant — it should stop animations, timers, and event subscriptions. The view may remain in the tree (e.g., in a virtualizing panel&#39;s recycle pool).

<a id="api-611c9893e0c7d0a6"></a>

### [`void RadioButton.OnDesignTokenChange(DesignSystemChange changes)`](#api-611c9893e0c7d0a6)


```csharp
public void OnDesignTokenChange(DesignSystemChange changes);
```

Responds to the changed token groups without duplicating theme state on the view.

<a id="api-1b2aec75209b6b98"></a>

### [`void RadioButton.OnPointerEvent(ref PointerEventRef e, EventPhase phase)`](#api-1b2aec75209b6b98)


```csharp
public override void OnPointerEvent(ref PointerEventRef e, EventPhase phase);
```

Updates pointer feedback and selects the button on a completed tap.

<a id="api-13230dd1fe689570"></a>

### [`void RadioButton.RenderCore(IContext context)`](#api-13230dd1fe689570)


```csharp
protected override void RenderCore(IContext context);
```

Renders the selected or unselected radio-button indicator.


<a id="api-66f980692384383f"></a>

## `class TextInput`

A design-system-aware text input. Uses the same `Xui.Core.UI.Layer.FocusBorderLayer`2` + `Xui.Core.UI.Layer.TextInputLayer` layer stack as `Xui.Core.UI.TextBox`, but fills all visual properties from [`Xui.ToolKit.UI.Design.IDesignSystem`](../xui-toolkit-ui-design/index.md#api-bf180554dd1b76ae) tokens instead of exposing them individually.

```csharp
public class TextInput : LayerView<View, FocusBorderLayer<View, TextInputLayer>>, IDesignSystemChangeNotifications, ITextEditingClient
{
    public TextInput();
    public override bool Focusable { get; }
    public TextInputOptions InputOptions { get; set; }

    public bool CanPerformInputAction(TextInputAction action);
    public void PerformInputAction(TextInputAction action);
    public Xui.Core.UI.Input.TextEditingState Editor { get; }
    public bool NativeSelection { get; set; }
    public Rect InputBounds { get; }

    public Rect GetCaretRect(int offset, ITextMeasureContext measure);
    public int GetTextPosition(Point point, ITextMeasureContext measure);
    public bool HasText { get; }
    public string Text { get; set; }
    public bool IsPassword { get; set; }

    protected override Size MeasureCore(Size availableSize, IMeasureContext context);
    protected override void RenderCore(IContext context);
    public void OnDesignTokenChange(DesignSystemChange changes);
    protected override void OnDeactivate();
}
```

<a id="api-60db9b9843e9baa9"></a>

### [`TextInput.TextInput()`](#api-60db9b9843e9baa9)


```csharp
public TextInput();
```

Creates a text input with shared native editing state.

<a id="api-1243b416d4746653"></a>

### [`bool TextInput.CanPerformInputAction(TextInputAction action)`](#api-1243b416d4746653)


```csharp
public bool CanPerformInputAction(TextInputAction action);
```

Whether a keyboard action is currently available.

<a id="api-6b4ab072c731b6f5"></a>

### [`TextEditingState TextInput.Editor`](#api-6b4ab072c731b6f5)


```csharp
public Xui.Core.UI.Input.TextEditingState Editor { get; }
```

The document and selection shared with the native input system.

<a id="api-00c878527780a0e0"></a>

### [`bool TextInput.Focusable`](#api-00c878527780a0e0)


```csharp
public override bool Focusable { get; }
```

Gets whether this view can receive keyboard focus via Tab navigation.

<a id="api-89623eaba2dfe65f"></a>

### [`Rect TextInput.GetCaretRect(int offset, ITextMeasureContext measure)`](#api-89623eaba2dfe65f)


```csharp
public Rect GetCaretRect(int offset, ITextMeasureContext measure);
```

Returns the caret rectangle for a UTF-16 offset, in logical window coordinates.

<a id="api-4ea97ccebcd0fc20"></a>

### [`int TextInput.GetTextPosition(Point point, ITextMeasureContext measure)`](#api-4ea97ccebcd0fc20)


```csharp
public int GetTextPosition(Point point, ITextMeasureContext measure);
```

Hit-tests a logical window point, returning a UTF-16 grapheme boundary.

<a id="api-8193cc727df5e47f"></a>

### [`bool TextInput.HasText`](#api-8193cc727df5e47f)


```csharp
public bool HasText { get; }
```

Whether the input contains any text.

<a id="api-bf697f333f249ad3"></a>

### [`Rect TextInput.InputBounds`](#api-bf697f333f249ad3)


```csharp
public Rect InputBounds { get; }
```

The input&#39;s hit-test bounds, in logical window coordinates.

<a id="api-99235157d1f451c1"></a>

### [`TextInputOptions TextInput.InputOptions`](#api-99235157d1f451c1)


```csharp
public TextInputOptions InputOptions { get; set; }
```

Keyboard hints, applied when this field receives focus.

<a id="api-629a27e42ab856ea"></a>

### [`bool TextInput.IsPassword`](#api-629a27e42ab856ea)


```csharp
public bool IsPassword { get; set; }
```

Gets or sets whether input is masked as a password.

<a id="api-25ca332304c79572"></a>

### [`Size TextInput.MeasureCore(Size availableSize, IMeasureContext context)`](#api-25ca332304c79572)


```csharp
protected override Size MeasureCore(Size availableSize, IMeasureContext context);
```

Override to compute the desired border-edge size.

<a id="api-1ef5c582743dd694"></a>

### [`bool TextInput.NativeSelection`](#api-1ef5c582743dd694)


```csharp
public bool NativeSelection { get; set; }
```

Whether a native interaction owns caret, selection handles, and touch selection.

<a id="api-68db12b9c1d242f0"></a>

### [`void TextInput.OnDeactivate()`](#api-68db12b9c1d242f0)


```csharp
protected override void OnDeactivate();
```

Called when this view becomes dormant — it should stop animations, timers, and event subscriptions. The view may remain in the tree (e.g., in a virtualizing panel&#39;s recycle pool).

<a id="api-c8990bc0e25b6e0e"></a>

### [`void TextInput.OnDesignTokenChange(DesignSystemChange changes)`](#api-c8990bc0e25b6e0e)


```csharp
public void OnDesignTokenChange(DesignSystemChange changes);
```

Responds to the changed token groups without duplicating theme state on the view.

<a id="api-fe69d87b867532aa"></a>

### [`void TextInput.PerformInputAction(TextInputAction action)`](#api-fe69d87b867532aa)


```csharp
public void PerformInputAction(TextInputAction action);
```

Handles a keyboard action, including focus navigation or finishing editing.

<a id="api-180823447ef324a6"></a>

### [`void TextInput.RenderCore(IContext context)`](#api-180823447ef324a6)


```csharp
protected override void RenderCore(IContext context);
```

Override to render this view and its children.

<a id="api-315d48325250dc6f"></a>

### [`string TextInput.Text`](#api-315d48325250dc6f)


```csharp
public string Text { get; set; }
```

Gets or sets the text content.


<a id="api-5989adeb838856d5"></a>

## `class Toggle`

A toggle switch that slides a thumb circle between on/off positions. Consumes design system tokens for colors, shape, and sizing.

```csharp
public class Toggle : View, IDesignSystemChangeNotifications
{
    public bool IsOn { get; set; }
    public Action<bool>? Changed { get; set; }

    public Toggle();
    public override int Count { get; }

    public override View this[int index] { get; }

    public void OnDesignTokenChange(DesignSystemChange changes);
    protected override void OnDeactivate();
    protected override Size MeasureCore(Size available, IMeasureContext context);
    protected override void RenderCore(IContext context);
    public override void OnPointerEvent(ref PointerEventRef e, EventPhase phase);
}
```

<a id="api-785e2070f91eaf81"></a>

### [`Toggle.Toggle()`](#api-785e2070f91eaf81)


```csharp
public Toggle();
```

Creates a toggle with content-sized alignment.

<a id="api-273e6d69ce677cbe"></a>

### [`Action<bool>? Toggle.Changed`](#api-273e6d69ce677cbe)


```csharp
public Action<bool>? Changed { get; set; }
```

Invoked when the toggle value changes.

<a id="api-0ee669cf8bb65d90"></a>

### [`int Toggle.Count`](#api-0ee669cf8bb65d90)


```csharp
public override int Count { get; }
```

Gets the number of child views, which is always zero.

<a id="api-f19f7bd9c670fb81"></a>

### [`bool Toggle.IsOn`](#api-f19f7bd9c670fb81)


```csharp
public bool IsOn { get; set; }
```

Gets or sets whether the toggle is on.

<a id="api-aaff2f57e12622b4"></a>

### [`View Toggle.this[int index]`](#api-aaff2f57e12622b4)


```csharp
public override View this[int index] { get; }
```

Gets a child view by index.

**Throws** `Always thrown because a toggle has no child views.`: Always thrown because a toggle has no child views.

<a id="api-3f4ff3327b8ae941"></a>

### [`Size Toggle.MeasureCore(Size available, IMeasureContext context)`](#api-3f4ff3327b8ae941)


```csharp
protected override Size MeasureCore(Size available, IMeasureContext context);
```

Measures the toggle using its design-system-defined track dimensions.

<a id="api-ddf846a4d88ec1a4"></a>

### [`void Toggle.OnDeactivate()`](#api-ddf846a4d88ec1a4)


```csharp
protected override void OnDeactivate();
```

Called when this view becomes dormant — it should stop animations, timers, and event subscriptions. The view may remain in the tree (e.g., in a virtualizing panel&#39;s recycle pool).

<a id="api-4c0e8928ca858abd"></a>

### [`void Toggle.OnDesignTokenChange(DesignSystemChange changes)`](#api-4c0e8928ca858abd)


```csharp
public void OnDesignTokenChange(DesignSystemChange changes);
```

Responds to the changed token groups without duplicating theme state on the view.

<a id="api-3594f180b3304b74"></a>

### [`void Toggle.OnPointerEvent(ref PointerEventRef e, EventPhase phase)`](#api-3594f180b3304b74)


```csharp
public override void OnPointerEvent(ref PointerEventRef e, EventPhase phase);
```

Updates pointer feedback and changes the toggle value on a completed tap.

<a id="api-a5ee170fde8d784a"></a>

### [`void Toggle.RenderCore(IContext context)`](#api-a5ee170fde8d784a)


```csharp
protected override void RenderCore(IContext context);
```

Renders the toggle track and thumb for its current state.

