title: Xamarin Forms device orientation
body: <p>Im working on a Forms app and Im just wondering if someone could help me with device orientation and rotation.</p>
  
  <p>Basically at the moment i have three rows of image buttons. What i want to do is when the device is rotated to landscape, then all of the buttons will all be displayed on one horizontal line instead of 3 vertical rows. </p>
  
  <p>What would be the best approach for this?
  I know in Android you just create another xml layout file and just reference that, is there a similar way to do that in Xamarin Forms and XAML?</p>
  
  <p>I will provide my <strong>MainPage.xaml</strong> below:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt;
  &lt;ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"            x:Class="MyApp_Crossplatform.Views.MainPage"
               Title="App"
               BackgroundColor="White"&gt;
    &lt;ContentPage.Content&gt;
      &lt;StackLayout Padding="10" VerticalOptions="FillAndExpand" HorizontalOptions="FillAndExpand" Orientation="Vertical"&gt;
        &lt;!--Main container layout--&gt;
        &lt;StackLayout VerticalOptions="Fill" HorizontalOptions="Center" Orientation="Vertical"&gt;
          &lt;!--Layout for each menu component--&gt;
          &lt;StackLayout VerticalOptions="StartAndExpand" HorizontalOptions="CenterAndExpand" Orientation="Horizontal"&gt;
            &lt;Image
              x:Name="btnSocial"
              Source="imgsocial.png"
              WidthRequest="100"
              HeightRequest="100"
              VerticalOptions="CenterAndExpand"
              HorizontalOptions="CenterAndExpand"/&gt;
            &lt;Image
              x:Name="btnCareer"
              Source="imgcareer.png"
              WidthRequest="100"
              HeightRequest="100"
              VerticalOptions="CenterAndExpand"
              HorizontalOptions="CenterAndExpand"/&gt;
          &lt;/StackLayout&gt;
          &lt;StackLayout VerticalOptions="StartAndExpand" HorizontalOptions="CenterAndExpand" Orientation="Horizontal"&gt;
            &lt;Image
              x:Name="btnSchedule"
              Source="imgschedule.png"
              WidthRequest="100"
              HeightRequest="100"
              VerticalOptions="CenterAndExpand"
              HorizontalOptions="CenterAndExpand"/&gt;
            &lt;Image
              x:Name="btnContact"
              Source="contact.png"
              WidthRequest="100"
              HeightRequest="100"
              VerticalOptions="CenterAndExpand"
              HorizontalOptions="CenterAndExpand"/&gt;
          &lt;/StackLayout&gt;
          &lt;StackLayout VerticalOptions="StartAndExpand" HorizontalOptions="CenterAndExpand" Orientation="Horizontal"&gt;
            &lt;Image
              x:Name="btnDetails"
              Source="imgdetails.png"
              WidthRequest="100"
              HeightRequest="100"
              VerticalOptions="CenterAndExpand"
              HorizontalOptions="CenterAndExpand"/&gt;
          &lt;/StackLayout&gt;
        &lt;/StackLayout&gt;
      &lt;/StackLayout&gt;
    &lt;/ContentPage.Content&gt;
  &lt;/ContentPage&gt;
  </code></pre>
  
  <p>If anyone can help that would be great.</p>