Loading Document Locks App

3 posts, 1 answers
  1. Sandra
    Sandra avatar
    16 posts
    Member since:
    Sep 2011

    Posted 25 Feb 2014 Link to this post

    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. Answer
    Petya
    Admin
    Petya avatar
    975 posts

    Posted 26 Feb 2014 Link to this post

    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
  3. UI for WPF is Visual Studio 2017 Ready
  4. Sandra
    Sandra avatar
    16 posts
    Member since:
    Sep 2011

    Posted 26 Feb 2014 in reply to Petya Link to this post

    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
Back to Top