title: WPF Expander - Horizontal Alignment set to Right, but jumps to left on when expanded
body: <p>I've got a WPF Expander that is right aligned.  That bit shows correctly on the screen, but when you expand it the expander and the text "show/hide historic data" jumps to the left of the screen.  Close the expander and it returns to the correct (right) alignment.</p>
  
  <p>I've tried various approaches but am unable to find why this is happening or more importantly how to keep an expanded expander right aligned</p>
  
  <pre><code>  &lt;Grid Grid.Row="1"                    
      HorizontalAlignment="Stretch"&gt;
       &lt;Grid.RowDefinitions&gt;
        &lt;RowDefinition Height="auto"/&gt;
        &lt;RowDefinition Height="auto"/&gt;                               
       &lt;/Grid.RowDefinitions&gt;
       &lt;Grid.ColumnDefinitions&gt;
         &lt;ColumnDefinition Width="*" /&gt;
       &lt;/Grid.ColumnDefinitions&gt;
  
        &lt;StackPanel Grid.Row="0"  &gt;
              &lt;TextBlock Style="{StaticResource SubHeader}" Text="Historic Data Sets" /&gt;                                               
             &lt;Rectangle Style="{StaticResource HeaderLine}"/&gt;
        &lt;/StackPanel&gt;
  
         &lt;Expander Header="show/hide historic data"
                   Grid.Column="1"
                   IsEnabled="True" 
                   VerticalAlignment="Center" 
                   HorizontalAlignment="Right" 
                   ExpandDirection="Down"&gt;       
  
     &lt;!-- some other stuff in the second row such as grid... --&gt;
  &lt;/Expander&gt;
  </code></pre>