You are right, replacing the words at document changed does not work either, because the document that is created is still not measured when the event is fired. This leaves you to the following options:
- Use Dispatcher to assure that the document is measured before invoking the replace function like this:
sender, EventArgs e)
- Invoke Measure on the imported document manually before proceeding:
RadDocument document = LoadXamlFile();
.radRichTextBox.Document = document;
If these solutions do not work, we would greatly appreciate a sample project illustrating the problem you are observing.
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat
for a walk through all the exciting stuff we ship with the new release!