today i hit a really annoing problem with wpf.
i just want to align Textblock controls(with different fontsize) at the bottom line.
<StackPanel Grid.Row="0" Orientation="Horizontal">
<TextBlock Text="ABC" FontSize="12" VerticalAlignment="Bottom"/>
<TextBlock Text="QWERT" FontSize="24" VerticalAlignment="Bottom"/>
<TextBlock Text="XYZ" FontSize="18" VerticalAlignment="Bottom"/>
</StackPanel>
what do i miss?
found a workaround. i have to use Run inside my TextBlock
<StackPanel Grid.Row="0" Orientation="Horizontal">
<TextBlock VerticalAlignment="Bottom">
<Run FontSize="12">ABC</Run>
<Run FontSize="24">QWERT</Run>
<Run FontSize="18">XYZ</Run>
</TextBlock>
</StackPanel>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With