Vixen
02b45cc4
csharp
public sealed class Switch

A switch: a track, and a knob that slides along it.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

⚠ Not a checkbox with a different skin, and the difference is what it means rather than how it looks. A checkbox is a value in a form that is applied when the form is; a switch takes effect the moment it is flipped. A control set that makes them interchangeable produces dialogs with a switch beside an OK button, where nobody can tell whether Cancel undoes it.

Fields and properties (3)

  • protected override string TagName

    The element name this type answers to when a caller does not choose one.

  • public UiElement Track

    The track the knob slides along.

  • public UiElement Knob

    The knob.

Methods (1)

  • protected override void OnCreated()

    Builds whatever this element is made of, once, as it joins a document.

Used by (5)

  • ShellHelloUi
  • ButtonTestsVixen.Ui.Controls.Tests
  • ControlVisualTestsVixen.Ui.Controls.Tests
  • ToggleInteractionTestsVixen.Ui.Controls.Tests
  • MarkupBindingVixen.Editor.Inspector