2017-12-14 17 views
0

固定高さを使用するときに、上から下の代わりにテキストを下から上にスタックする方法を教えてください。ここで私が何を意味するかの例です:テキストブロックまたはラベルのテキストの垂直方向のスタックを下から上へ

二行

***********    My Text is 
My Text is instead of bigger **** 
bigger ****    *********** 

Textblock 1行で

***********    My Text *** 
*********** instead of *********** 
My Text ***    *********** 

Textblockこれを達成するためにどのような方法がありますか?

答えて

1

VerticalAlignmentプロパティをBottomに設定するのは簡単ですか?あなたが実際のテキストを囲んで何かを持っている場合は、例えばGridまたはBorderTextBlockを配置し、この1の高さを設定できます。

<Border Background="Yellow" Height="300"> 
    <TextBlock VerticalAlignment="Bottom">one line at the bottom</TextBlock> 
</Border>