Skip to content

SwitchView

Ieuan Walker edited this page Apr 5, 2023 · 5 revisions

The best place to learn how to create a new switch is by looking at the examples.

These are the key things to know -

  • BackgroundContent is used to set the content of the switch
  • KnobContent is used to set the content on the knob. The content on the knob is hidden/shown by utilising the IsClippedToBounds property. So essentially, as the knob moves from one side to the other it is just revealing a different part of the content.
  • The SwitchPanUpdate is used transition from true to false, i.e. color fading etc.

Properties

Property What it does Extra info
IsToggled A bool to indicate the togles status of the switch Default value is false

Events

Event What it does
Toggled Triggered when the switch is toggled

Commands

Command What it does
ToggledCommand Triggered when the switch is toggled

Examples

iOS example

Clone this wiki locally