Link to home
Start Free TrialLog in
Avatar of OFGemini
OFGemini

asked on

WPF - Virtual Textbox to load large text file

Hello Experts,

I'm loading a large text file (5mb) into a richtextbox.  However it is very slow to load.  The line below is taking too long.

              TextRange range = new TextRange(PART_RichTextBox1.Document.ContentStart, PART_RichTextBox1.Document.ContentEnd);                            
range.Load(textStream, GetFileDataFormat(this.ViewModel.GetFileType()));  


How can I the improve performance?  

Thanks,
Steve
ASKER CERTIFIED SOLUTION
Avatar of cubaman_24
cubaman_24
Flag of Spain image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of OFGemini
OFGemini

ASKER

Thanks.  I'll try to implement this
Where you successful in this implementation? I have similar challenges in my application. Please help.