How can I change the distance between text and underline in a WPF TextBlock?
Use element syntax to add an instance of TextDecoration
to the TextBlock.TextDecorations
, then you can adjust the Location
or PenOffset
.
<TextBlock>
<TextBlock.TextDecorations>
<TextDecoration Pen="..." Location="..."/>
</TextBlock.TextDecorations>
</TextBlock>
(You may need to set the Pen
via element syntax as well)