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

HTML Email viewer

1 Answer 661 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Marcel asked on 20 Aug 2016, 01:24 PM


I am trying to create a email message viewer like Outlook using the RichTextbox.

Is this the right control to use for this scenario?

The viewer should be able to display plain-text emails and HTML emails.


I implemented it partially but I cant get the scrollbar visiblewhen the message is longer then what can be contained in the richtextbox.

<ContentControl Grid.Row="6" Grid.Column="0" Grid.ColumnSpan="3">
        <telerikHtml:HtmlDataProvider Html="{Binding BodyText, Mode=TwoWay}"
                                        RichTextBox="{Binding ElementName=rtbHtmlEmail}" x:Name="htmlDataProvider" />
        <ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
            <telerik:RadRichTextBox x:Name="rtbHtmlEmail" Padding="15"
                                    MinWidth="800" MinHeight="650"

1 Answer, 1 is accepted

Sort by
Telerik team
answered on 24 Aug 2016, 03:08 PM
Hi Marcel,

RadRichTextBox is intended exactly for showing/modifying flow documents from different file formats and I believe it could fit your scenario.

The ScrollViewer measures its children with Infinity, thus, the RadRichTextBox instance doesn't receive a particular size in which it should fit. This leads to stretching the control, the document receives enough space to load its whole content and the scroll bars aren't activated. If you change the container you are using to a different one that sets a size to its children (for example, Grid), you should be able to use the scrolling of the control.

In addition, we usually advise against measuring RadRichTextBox in Infinity as this will disable the UI Virtualization of the control and could lead to performance diminishments or unexpected behavior.

In regards to the export functionalities, you could refer to our Import/Export section that describes the supported in RadRichTextBox formats and how to use them.

Hope this helps.

Telerik by Progress
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
Asked by
Top achievements
Rank 1
Answers by
Telerik team
Share this question