简体   繁体   中英

How do I reduce the line spacing in XCeed WPF Extended Toolkit Richtextbox

I am using the WPF Extended Toolkit Richtextbox to display simple text. But the lines are widely separated rather than one after the other. Indentation appears to be working OK. It's just that 5 lines of text takes up a lot of space. I tried setting Margin="0." I cannot find a property to set such as "Line Spacing" to set.

        <tools:RichTextBox Grid.Row="3"
                       Grid.Column="1"
                       Text="{Binding Procedure}"
                       Margin="0"
                       ScrollViewer.VerticalScrollBarVisibility="Auto"
                       BorderBrush="Gray"
                       BorderThickness="2"
                       Padding="0"
                       AcceptsReturn="True"
                       AcceptsTab="True"
                       AllowDrop="True"
                       AutoWordSelection="True"
                       >
        <tools:RichTextBox.TextFormatter>
            <tools:PlainTextFormatter/>
        </tools:RichTextBox.TextFormatter>
    </tools:RichTextBox>

The Document property can not be set with a binding.

Line spacing cannot be formatted using the rtf header with the Text attribute in the extended wpf richtextbox. Use the Block.LineHeight attribute instead. It has to be about 130-150% of the font size to work.

<xctk:RichTextBox Block.LineHeight="20"/>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM