Switch

A binary on/off toggle.
public class Switch : Control

Properties

IsOn

Whether the switch is on.

Type: Bindable<bool>

public Bindable<bool> IsOn { get; set; }

OnColor

The fill color while on, or null for the inherited tint.

Type: Color?

public Color? OnColor { get; set; }

ThumbColor

The thumb color, or null for the system default.

Type: Color?

public Color? ThumbColor { get; set; }

Toggled

Invoked with the new value whenever the user toggles the switch.

Type: Action<bool>?

public Action<bool>? Toggled { get; set; }