Say I have a stackpanel with two text blocks, one on top of the other. THey are centred horizontally. But I want to hide one of the text blocks and I want the remaining item to centre vertically according to the remaining space (as if it as the only item). Is this possible?
<StackPanel Grid.Row="0" >
<TextBlock Text="Testing!" HorizontalAlignment="Center" FontSize="35">
</TextBlock>
<TextBlock Text="test" HorizontalAlignment="Center" FontSize="25">
</TextBlock>
</StackPanel>