Decrease line spacing in a TextBlock / FlowDocument Decrease line spacing in a TextBlock / FlowDocument wpf wpf

Decrease line spacing in a TextBlock / FlowDocument


Set the LineHeight like before, but change the LineStackingStrategy to BlockLineHeight


To exemplify @Joel's answer (which is still very useful 5 years later :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>


See this question.

There are several different ways to fix the height. The one that worked for me is this which sets the margin to 0.