简体   繁体   中英

Right Aligned TextBlock with TextWrapping wraps at Left Side

I am trying to have a TextBlock align text where multiple lines are on the right side. Currently, the behavior is that the text is aligned to the right for the first line, however the second line starts on the left side. Is there a way to have wrapped lines also align to the right?

<TextBlock HorizontalAlignment="Right" x:Name="txtLeft" Text="the key for the value is two lines+" VerticalAlignment="Top" TextWrapping="Wrap" Margin="0,2,0,0" Grid.Column="0" Grid.Row="0" />

我相信您正在寻找TextAlignment属性。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM