| title | Switch |
|---|
Switch is a compact on/off toggle with a thumb and label.
var enabled = new State<bool>(true);
new Switch("Enabled").IsOn(enabled);- Default alignment:
HorizontalAlignment = Align.Start,VerticalAlignment = Align.Start
SwitchStyle controls:
- left/right segment colors
- thumb glyphs (
ThumbGlyphOn/ThumbGlyphOff) - background/foreground for normal/hover/pressed/disabled
Space/Enter: toggle when focused.- Mouse click: toggle.
