This is a migrated thread and some comments may be shown as answers.

Serialize with comments

1 Answer 49 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Axelle
Top achievements
Rank 1
Axelle asked on 21 Mar 2014, 03:46 PM
Hi, 

I'm using several rich text boxes to edit different part of a fixed form document, and I'd like to serialize each of them separately (and be able to restore them, obviously), while keeping the comments. What would be the best way to do that ? 

I tried to use formatProviders, but comments seem to be lost. If that's the way, which would be the right format provider ? (I don't care about the format, the serialization is only used to restore the content in another RichTextBox.

Thanks, 

Axelle

1 Answer, 1 is accepted

Sort by
0
Accepted
Boby
Telerik team
answered on 25 Mar 2014, 09:35 AM
Hi Axelle,
Following format providers support comments: XamlFormatProvider, RtfFormatProvider, DocxFormatProvider. I would suggest using XamlFormatProvider (from  Telerik.Windows.Documents.FormatProviders.Xaml.dll assembly) if the format doesn't matter for you, as it is the native format which preserves the document structure most accurately.

If you are losing the comments using one of the mentioned format providers, maybe you are experiencing a bug and we will appreciate if you share more information about the problem.

As a side note: depending on your scenario, it may be appropriate to use one RadRichTextBox with document with protection ranges (meaning only parts of the document are editable for some users) instead of multiple RadRichTextBox-es. You can check our online demo and documentation if this suggestion seems appropriate for you.

Don't hesitate to contact us if you have other questions.


Regards,
Boby
Telerik
 

Build cross-platform mobile apps using Visual Studio and .NET. Register for the online webinar on 03/27/2014, 11:00AM US ET.. Seats are limited.

 
Tags
RichTextBox
Asked by
Axelle
Top achievements
Rank 1
Answers by
Boby
Telerik team
Share this question
or