title: XAML: why is button on top when I clearly said to go on bottom?
body: <p>In XAML, I want the button to go on the BOTTOM of the red rectangle.</p>
  
  <p>I clearly say:</p>
  
  <p>"HorizontalAlignment="Right"<br>
  VerticalAlignment="Bottom"</p>
  
  <p>It goes to the right but stays on the top. Why is that?</p>
  
  <p><a href="http://tanguay.info/web/external/buttonTop.png" rel="nofollow noreferrer">alt text http://tanguay.info/web/external/buttonTop.png</a></p>
  
  <pre><code>&lt;UserControl
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      x:Class="MultiplePages.Page"
      Width="300" Height="150"&gt;
  
      &lt;StackPanel HorizontalAlignment="Stretch" 
          VerticalAlignment="Stretch" Width="300" Height="150" Orientation="Vertical"&gt;
  
          &lt;StackPanel Width="300" Height="100" Background="Blue"&gt;
              &lt;TextBlock x:Name="theTextBlock" Text="This is page one. This is page one. This is page one. This is page one. This is page one. This is page one. This is page one. This is page one. This is page one. This is page one. " 
              TextWrapping="Wrap" Height="100" Width="300" HorizontalAlignment="Left"/&gt;
          &lt;/StackPanel&gt;
  
          &lt;StackPanel Width="300" Height="50" Background="Red"&gt;
  
              &lt;Button Name="Switch" Content="Switch Page" Width="100" Height="20"
              HorizontalAlignment="Right" 
              VerticalAlignment="Bottom"/&gt;
  
          &lt;/StackPanel&gt;
  
      &lt;/StackPanel&gt;
  
  &lt;/UserControl&gt;
  </code></pre>