I want to use a Wpf RichTextBox to edit data and resave it to SQL field.
I need of course the text to be saved as rich text, not just simple text of course.
- What data-type should be best for storing in SQL server (2005 – forget about file stream)?
- How do I save/retrieve it?
You can save the document to a XAML string using
XamlWriter:You can then save the XAML string to a the database like any other text.
To reload it from a XAML string, use
XamlReader: