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

Loading Document Locks App

2 Answers 79 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Sandra
Top achievements
Rank 1
Sandra asked on 25 Feb 2014, 05:58 PM
I have created a simple WPF application that has a button and a RadRichTextBox using most recent 2013 build. The text box is hidden by default (not sure if that has any bearing but it's how the main app works so I'm being consistent). 

When the user presses the button the app reads XAML from a text file (~900k) and converts to a RadDocument using the XamlFormatProvider. Total elapsed time is < 2s.

I then set the document of the text box to the resultant document and make the text box visible. The entire UI of the app freezes for about 2 minutes until the text box creates the initial rendering of the document and then freezes for an additional 2 minutes until the scrolling is finished.

I'm happy to share code and data if need be.

How do I work around this?

rjsjr

2 Answers, 1 is accepted

Sort by
0
Accepted
Petya
Telerik team
answered on 26 Feb 2014, 02:28 PM
Hi rjsjr,

Like I said in the ticket you opened on the topic, placing RadRichTextBox in containers which measure their children with infinity is known to cause performance issues as it disables the UI virtualization.

Should you encounter any other issues do not hesitate to contact us again.

Regards,
Petya
Telerik
0
Sandra
Top achievements
Rank 1
answered on 26 Feb 2014, 04:22 PM
Based on your reply on the ticket I removed the enclosing ScrollViewer and enabled vertical scrolling on the RadRichTextBox. With only those changes the rendering of the document dropped from 300s to 3s.

Thank you!

rjsjr
Tags
RichTextBox
Asked by
Sandra
Top achievements
Rank 1
Answers by
Petya
Telerik team
Sandra
Top achievements
Rank 1
Share this question
or