title: Xamarin forms relative layout position stacklayout at bottom
body: <p>I would like to position a Stacklayout at the bottom on top of an image using a relative layout using Xamarin forms using xaml only. The xaml pretty much looks like this.</p>
  
  <pre><code>&lt;RelativeLayout&gt;
      &lt;Image /&gt;
      &lt;StackLayout Orientation="Horizontal"&gt;
          &lt;Label Text="Dark Mode" /&gt;
          &lt;Switch /&gt;
          &lt;Label Text="Light Mode" /&gt;
      &lt;/StackLayout&gt;
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>What X and Y constraints should my StackLayout have so that it is positioned on top of the image and at the bottom of it.Also added an image which describes the result i expect.</p>
  
  <p><strong>Expected :</strong>
  <a href="https://i.stack.imgur.com/j0Z9Y.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/j0Z9Y.png" alt="RelativeLayout"></a></p>
  
  <p>I did try to give <strong>RelativeLayout.XConstraints</strong> and <strong>RelativeLayout.YConstraints</strong> to both the image and the stacklayout , but not able to figure out what values to use to get the desired result.</p>