RelativeLayout in StackLayout Width Calculation
<p>I've got an odd problem with RelativeLayouts nested in a StackLayout, it appears that the StackLayout calculates the width of its elements should be using the RelativeLayout width and then the RelativeLayout recalculates it again afterwards. This results in the child control being the relative width squared, but the following controls being placed as at relative width.</p>

<p>Is this a bug or am I doing something wrong?</p>

<p>example</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt;
&lt;ContentPage x:Class="MyClass"
             xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             &gt;

  &lt;StackLayout Orientation="Horizontal" BackgroundColor="Blue"&gt;
    &lt;RelativeLayout&gt;
      &lt;ContentView BackgroundColor="Red"

          RelativeLayout.XConstraint=
                "{ConstraintExpression Type=RelativeToParent,
                                      Property=Width,
                                      Factor=0}"
          RelativeLayout.WidthConstraint=
                "{ConstraintExpression Type=RelativeToParent,
                                      Property=Width,
                                      Factor=0.707106}"
          RelativeLayout.YConstraint=
                  "{ConstraintExpression Type=RelativeToParent,
                                        Property=Height,
                                        Factor=0}"
          RelativeLayout.HeightConstraint=
                "{ConstraintExpression Type=RelativeToParent,
                                      Property=Height,
                                      Factor=1}"&gt;

      &lt;/ContentView&gt;

    &lt;/RelativeLayout&gt;
    &lt;RelativeLayout&gt;
      &lt;ContentView BackgroundColor="Green"

          RelativeLayout.XConstraint=
                "{ConstraintExpression Type=RelativeToParent,
                                      Property=Width,
                                      Factor=0}"
          RelativeLayout.WidthConstraint=
                "{ConstraintExpression Type=RelativeToParent,
                                      Property=Width,
                                      Factor=0.5}"
          RelativeLayout.YConstraint=
                  "{ConstraintExpression Type=RelativeToParent,
                                        Property=Height,
                                        Factor=0}"
          RelativeLayout.HeightConstraint=
                "{ConstraintExpression Type=RelativeToParent,
                                      Property=Height,
                                      Factor=1}"&gt;

      &lt;/ContentView&gt;

    &lt;/RelativeLayout&gt;

  &lt;/StackLayout&gt;
&lt;/ContentPage&gt;
</code></pre>

<p><a href="https://i.stack.imgur.com/bNZij.png"><img src="https://i.stack.imgur.com/bNZij.png" alt="Screen shot"></a></p>