Serialize with comments

2 posts, 1 answers
  1. Axelle
    Axelle avatar
    13 posts
    Member since:
    Mar 2014

    Posted 21 Mar 2014 Link to this post


    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.


  2. Answer
    Boby avatar
    636 posts

    Posted 25 Mar 2014 Link to this post

    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.


    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.

Back to Top