The RtfFormatProvider class whose Import() method returns an instance of type RadFlowDocument is related to our RadWordsProcessing library
. From the description, it seems like there is a wrong reference or namespace added. In order to use the RtfFormatProvider of RadRichTextBox, you will need to add a reference to the Telerik.Windows.Documents.FormatProviders.Rtf
assembly and a using directive to the Telerik.Windows.Documents.FormatProviders.Rtf namespace
. Most probably you cannot import an RTF document due to missing required reference. Please, check the Getting Started topic
that lists all the necessary references for the control to work properly.
Here is how I changed the first code snippet you shared in order to import a document in RadRichTextBox:
Telerik.Windows.Documents.FormatProviders.Rtf.RtfFormatProvider provider =
(FileStream stream =
.radRichTextBox.Document = provider.Import(stream);
If you need more information on the import/export functionality of RadRichTextBox, you could refer to the related documentation section
As to the second approach you tried, we strongly recommend using the methods of the RadDocumentEditor class
instead the direct model of RadRichTextBox when modifying a document that is already shown in the control. The editor will trigger important updates and will ensure that the modifications will be correctly respected.
I noticed that you have tried to achieve the goal using the DocumentFragment class. It is usually used when you need to insert a document into another document. More information about its usage is available in the Formatting API article
Hope this helps.
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer
and share your thoughts.