Orientation in Xamarin Switch (SfSwitch)

22 Aug 20221 minute to read

The switch control provides options to change the default orientation.

Horizontal

By default, it is displayed horizontally. You can also define the orientation as demonstrated in the following code example.

<syncfusion:SfSwitch Orientation="Horizontal" />
SfSwitch sfSwitch = new SfSwitch();

sfSwitch.Orientation = SwitchOrientation.Horizontal;

switch conrol has horizontal orientation

Vertical

To view the switch control vertically, you can define the vertical orientationas demonstrated in the following code example.

<syncfusion:SfSwitch Orientation="Vertical" />
SfSwitch sfSwitch = new SfSwitch();

sfSwitch.Orientation = SwitchOrientation.Vertical;

switch conrol has vertical orientation