WPF:更改 RIchTextBox 的行高 属性

WPF: Change LineHeight property of RIchTextBox

首先我必须说我是 .net 和 WPF 的初学者。所以现在我在设置 RichTextBox 的 LineHeight 属性 时遇到问题。但是,如果我在 XAML 文件中写入 LineHeight="10",它会显示:The member "LineHeight" is not recognized or is not accessible. I would like to find a像在 TextBox 中一样设置它的方法。

XAML代码:

<StackPanel Orientation="Vertical">
    <RichTextBox Width="auto" LineHeight="12"  HorizontalAlignment="Left" FontSize="14" Padding="0" Margin="0" Background="Transparent" Name="LabelContent" IsReadOnly="true" BorderThickness="0" IsDocumentEnabled="True" FontFamily="Calibri"/>
    <Label HorizontalAlignment="Right" Padding="0,0,0,0" Name="LabelDate" Margin="0" FontSize="10" Foreground="{Binding TimeTextBrush}" Content="Feb Tue, 12:35" />
</StackPanel>

也许这个锅:

 <RichTextBox Block.LineHeight="2"/>

或者这样:

<RichTextBox>
    <RichTextBox.Resources>
        <Style TargetType="{x:Type Paragraph}">
            <Setter Property="Margin" Value="0,10,0,0"/>
        </Style>
    </RichTextBox.Resources>
</RichTextBox>

或者这样:

RichTextBox rtb = new RichTextBox();
rtb.SetValue(Paragraph.LineHeightProperty, 1.0);