减lessTextBlock / FlowDocument中的行间距

一些字体在字符上方和下方都有大量的空白。 有没有一种方法来纠正这个问题,并加紧WPF中的一个单词包装的段落(在TextBlock或FlowDocument)的行之间的空间? 有点像线之间的负边距?

ParagraphTextBlock上有一个LineHeight属性,但它似乎只是让你增加间距 – 如果你设置的值比默认值小,那么它就被忽略了。

像以前一样设置LineHeight ,但将LineStackingStrategy更改为BlockLineHeight

为了举例说明@ Joel的答案(5年后仍然非常有用:P)

  <StackPanel VerticalAlignment="Center"> <Button Width="137" Height="47.96"> <TextBlock Text="This is a very long text that gets cut because it is so long" TextWrapping="Wrap"/> </Button> <Button Width="137" Height="47.96"> <TextBlock Text="This is a very long text that doesn't cut thanks to @Joel" TextWrapping="Wrap" LineStackingStrategy="BlockLineHeight" LineHeight="13"/> </Button> </StackPanel> 

看到这个问题 。

有几种不同的方法来修复高度。 那个为我工作的是这个边缘设置为0。