How to save formatted text (which is not in RichTextBox) to the file?

280 Views Asked by At

I'm creating my own, similar to the FlowDocument, object model for representation of formatted text document (it's need me to complete my lab). And I want to have a possibility to save/load my document as/from ".rtf"-file (or file of another common text format). Are there any good ways (without explicit using RTF-code characters) to implement this?

P.S.: The main task is creating a formatted text editor. But there are some constraints: not to use already existing text-controls (RichTextBox, etc.) and also not to use FlowDocument (I should create my own model instead). So I chose to use TextFormatter. And my TextSource-class should be based on my model of text document.

0

There are 0 best solutions below