Switch

Bind a native on-or-off control to boolean settings.

Switch represents one independent boolean choice. Pair it with a nearby label that states what the on state means.

var notifications = new Switch
{
    OnColor = Colors.Green,
    IsOn = Bind(vm => vm.NotificationsEnabled)
        .TwoWay((vm, val) => vm.NotificationsEnabled = val)
};

IsOn is bindable and defaults to false. Toggled receives the new value when the user changes it:

notifications.Toggled = enabled =>
{
    status.Text = enabled ? "Notifications on" : "Notifications off";
};

OnColor customizes the active track and ThumbColor customizes the thumb. Leaving either unset preserves the native system appearance, including accessibility and appearance changes.

Do not use a switch for an action that happens once, such as sending or deleting; use a button. A switch should describe persistent state and normally take effect immediately rather than requiring a separate Save button.