The easiest way to scroll particular content into view is to change the caret position in the document. This could be achieved similarly to the approach you were previously using - finding the first/ next instance of the string with the Find() method and move the caret to the start position of the result .
As for the performance issue you are observing, UI layers are wired to work only for the currently visible part of the document. For the particular case this means that the number of occurrences in the whole document is not the cause for the delay. So for example, a document with 1300 occurrences which only has the searched string in every other paragraph should work just as fast as a small document with one occurrence of the string.
While I understand that delay of the magnitude you are observing is not desired please note that a document consisting of the very same word a lot of times, for example, is considered a border case. At this point there is not much we could do to improve the performance in such cases.
Other than the document content, the layout mode of the control can also influence the performance. If you change it to Paged in the SDK example, the content that is shown will be reduced which means less occurrences of a particular string will be shown in the viewport even if the document consists of the same word repeated numerous times.
I hope this information is helpful!
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>