Xamarin.Forms Platform specific visual adjustments Idiom adjustments


Idiom specific adjustments can be done from C# code, for example for changing the layout orientation whether the view is shown or a phone or a tablet.

if (Device.Idiom == TargetIdiom.Phone) 
    this.panel.Orientation = StackOrientation.Vertical;
    this.panel.Orientation = StackOrientation.Horizontal;

Those functionalities are also available directly from XAML code :

<StackLayout x:Name="panel">
    <OnIdiom x:TypeArguments="StackOrientation">