textblock的LineHeight的调整

 <TextBlock Width="113.594" Height="73.667" Text="Some text" LineHeight="1" TextWrapping="Wrap" Foreground="#FFFFFFFF" FontSize="24"  />

 

在上面的 textblock控件中允许huanhang,也就是说some 和 text将分行显示,会发现some和text的行距,会很宽,要调整他们之间的行距,即便是设置 LineHeight为50,发现调整的幅度也是很小,也无法缩小行距。

 

如果设置LineStackingStrategy的值为BlockLineHeight,就发现some和Text就重叠在一起,然后在设置LineHeight的值,就可以随意跳行两行之间的行距了。

 <TextBlock Width="113.594" Height="73.667" Text="Some text" LineHeight="20"  LineStackingStrategy="BlockLineHeight" TextWrapping="Wrap" Foreground="#FFFFFFFF" FontSize="24"  />

posted @ 2008-07-22 16:42  Amanda2007  阅读(2125)  评论(0编辑  收藏  举报