How do I change RichTextBox paragraph spacing?

前端 未结 8 1996
暖寄归人
暖寄归人 2020-12-02 16:21

I am using a RichTextBox in WPF, and am trying to set the default paragraph spacing to 0 (so that there is no paragraph spacing). While I could do this in XAML, I would lik

相关标签:
8条回答
  • 2020-12-02 17:22

    I know this question was posted before I even started coding but I found that simply setting ShowSelectedMargin to true did the trick

    0 讨论(0)
  • 2020-12-02 17:23

    For me on VS2017 in WPF works this:

     <RichTextBox HorizontalAlignment="Left" Height="126" Margin="10,280,0,0" VerticalAlignment="Top" Width="343" FontSize="14" Block.LineHeight="2"/>
    

    The key is Block.LineHeight="2"

    You can found this also in Properties view but you can't change below 6px from there.

    0 讨论(0)
提交回复
热议问题