Recently I got a chance to write a guest blog post on Telerik’s official site and the topic was “How to Export content from RadRichTextBox to a variety of formats in WPF or Silverlight”. Thanks to the Telerik XAML Team who gave me this opportunity.
The article covers the simple steps to export the rich text content of the Telerik RadRichTextBox control. This could be an additional benefit to the end users who are using Silverlight or WPF app.
Telerik’s RadRichTextBox control allows you to display rich text content in your Silverlight application. It can hold formatted text, images, tables, hyperlinks etc. to provide a visual look like Microsoft Word document. To use a simple RadRichTextBox control, you will need reference to the following Telerik assemblies: Telerik.Windows.Controls, Telerik.Windows.Data and Telerik.Windows.Documents in your WPF/Silverlight project.
The control library not only allows you to display rich text content, but also helps you to export the same to different file formats so that you can save it to file or database. The library already exposed different APIs to handle different file formats in order to export the content. In this article I covered how the Telerik’s RadRichTextBox will help you to export the content added by user to a file of various formats like HTML, PDF, RTF, DOCX, XAML and TXT.
The complete article is available in Telerik Blogs: How to Export content from RadRichTextBox to a variety of formats in WPF or Silverlight where you will find the following points:
- Introduction to Format Providers – Here you will understand the basics about the API code, different format providers and their respective DLL assemblies.
- Export using RichTextCommand – This point will describe you the way to use the RichTextCommand and the CommandParameter to easily export the content of the Telerik’s RadRichTextBox control.
- Export using Explicit Code – In case you don’t want to use the command bindings, you can write additional lines with some complex codes to do the same operation. This point describes it step-by-step.