How to convert RTF to HTML using your RichTextBox control?

Posted by: saf_itpro on 16 March 2019, 6:10 am EST

    • Post Options:
    • Link

    Posted 16 March 2019, 6:10 am EST

    The Read and Write Rich Text Format Documents section of your online article reads: “you can use it to convert RTF to HTML and vice versa.”

    I went through your API document but could not figure out how to do it.

    Question: Could you please provide (or link to an online sample) for converting RTF to HTML in you RichTextBox control? I’m using C# but VB code also be fine.

    NOTE: Before I buy your UWP edition, I must ensure that I can convert RTF to HTML as described in your online document referenced above.


  • Posted 17 March 2019, 10:28 pm EST


    The Word for UWP API uses C1WordDocument for creating a document which can be used for Docx, RTF and Txt formats. However, C1RichTextBox can be used for converting RTF to HTML or vice versa.

    You can verify this by using the “RTFFilter” part of the attached sample ( Alternatively, you can install the ControlExplorer UWP app from “” and have a look into the RichTextBox samples under Input and Editing section.

    Also, you can refer “” in order to understand how C1RichTextBox.Html property works.

    Thanks & Regards,


  • Posted 25 March 2019, 4:48 am EST

    Thanks for the response. I opened your RichTextBoxSamples project in Visual Studio 2017 - from the zip file you have provided above . And, when I tried to add your C1.Xaml.UWP package via Nuget, it gave me the following error. Without the C1.UWP package the app does not compile:

    Failed to add reference to ‘C1.UWP.Design’.

    The project targets ‘.NETCore’ while the file reference targets ‘.NETFramework’. This is not a supported scenario.

    What Nuget packages are required for the sample project you have provided in your previous response? Please advise. Thank you.

  • Posted 25 March 2019, 11:35 pm EST - Updated 30 September 2022, 12:09 am EST


    For adding Nuget packages, you have to first remove the references for all C1 libraries from main project and then add the corresponding Nuget packages in the main project references. Following Image shows the added Nuget packages:

    Also, I have modified the sample for using Nuget packages and would request you to verify with the attached modified sample (

    Thanks & Regards,


  • Posted 26 March 2019, 11:09 am EST

    New sample file you attached above worked (thank you). -Saf

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels