I have a WPF application in which I want to convert a TextBox into a RichTextBox. I have already written the following lines of code:
<RichTextBox>
<FlowDocument>
<Paragraph>
<Run Text="{Binding GeneralDescription}" />
</Paragraph>
</FlowDocument>
</RichTextBox>
This has the effect that the string GeneralDescription is displayed and I can edit and format it. Now I have the problem that when I mark a part of the text, format it (e.g. make it bold), save the document and re-open the document, only the part of the text until the formatting is displayed. I am not sure if the error lies within the display or within the saving. In either case it's annoying. How can I make it work? Is it a problem that GeneralDescription is of type string?
Thanks in advance.