XAML Vertically align only top stackpanel <p>I have a view that contains two stackpanels (main ones). The top one is a spinner and "One Moment Please..." that I need centered vertically. The bottom one appears when the top one disappears and I need it stretched so the content appears at the top of the window.</p> <pre><code> &lt;ScrollViewer VerticalScrollBarVisibility="Auto"&gt; &lt;StackPanel HorizontalAlignment="Stretch" VerticalAlignment="Center"&gt; &lt;local:BusyIndicator VerticalAlignment="Center" HorizontalAlignment="Center" Width="50" Height="50" Visibility="{Binding Path=IsBusy, Converter={StaticResource booleanToVisibilityConverter}}"/&gt; &lt;TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" Text="One Moment Please" Visibility="{Binding Path=IsBusy, Converter={StaticResource booleanToVisibilityConverter}}"/&gt; &lt;StackPanel HorizontalAlignment="Center" Visibility="{Binding Path=HasError, Converter={StaticResource booleanToVisibilityConverter}}"&gt; &lt;TextBlock Visibility="{Binding Path=HasError, Converter={StaticResource booleanToVisibilityConverter}}" Text="{Binding Path=ErrorMessage}" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="12" TextWrapping="Wrap"/&gt; &lt;/StackPanel&gt; &lt;StackPanel VerticalAlignment="Stretch" Orientation="Vertical" Visibility="{Binding Path=IsBusy, Converter={StaticResource inverseBooleanToVisibilityConverter}}"&gt; &lt;/Stackpanel&gt; &lt;/ScrollViewer&gt; </code></pre> <p>The issue that keeps happening is that the bottom stackpanel is vertically centered and the content does not move to the top of the window.</p> <p>I apologize but I am not able to show the actual view (NDA). What I am trying to do (Right Image), what is happening (Left Image). NOTE: Only the text or the spinner show up at one time. I am not trying to align the two, just make the spinner center vertically when the text is not displayed.</p> <p><img src="https://i.stack.imgur.com/duFFp.png" alt="enter image description here"></p>