0

I have written a text editor in WPF based on the WPF RichTextBox. Everything works well. With BOLD, ITALIC etc., FontSize, FontFamily, TextAlignment and Indentation there are no problems. But: LineSpacing does not work! I can set the LineSpacing with Paragraph.LineHeight. When I save the text file in RTF format and load it again, the LineSpacing disappears. When loading, the corresponding RTF statement '\slnnn' is deleted.

If I load an RTF file from another text editor, the LineSpacing disappears also.

I know that I don't have the problem if I save the content of the RichTextBox as an XAML package and load it again. But then I am no longer compatible with other TextEditors.

Does anyone know a solution?

  • 1
    Does it answer your questions? https://stackoverflow.com/questions/325075/how-do-i-change-richtextbox-paragraph-spacing – Tony Stark May 02 '21 at 10:41
  • Unfortunately not. I know this thread. But my problem is that I cannot load a file in rtf format without the information about line-spacing disappearing. – Lucillo May 03 '21 at 11:18

0 Answers0