0

I'm looking for basically fastest way to display non-editable FlowDocument with continuous, variously decorated text. I know RichTextBox and usually use FlowDowcumentScrollViewer that can display FlowDocument content. I know TextBlock can (kind of) be fed Inlines in code, but doens't support Paragraphs etc.

But did anybody measure which of the former two are faster with different occasions (scrolling / non scrolling, long / shorter document etc.) ?

Or is there some other, more effective solution ?

Some people claim that FlowDowcumentScrollViewer is actually slower because it supports more (advanced) formatting scenarios. Not sure if thats true. On the other hand RichTextBox has all the editing functionality etc. that drags its speed down.

As Im currently writing a RichText heavy application, I would be glad for any tips on this

Riva
  • 637
  • 6
  • 14
  • [DirectWrite](http://msdn.microsoft.com/en-us/library/windows/desktop/dd368038%28v=vs.85%29.aspx) is much faster than RichTextBox for non-editable text. But I strongly suggest you get your program working using RichTextBox before trying to use DirectWrite. Profile your program with real-world data before you try to optimize, not after. – Dour High Arch Oct 07 '14 at 16:19
  • @DourHighArch Thanks for a tip, but I want to stay with WPF. DirectX for text rendering is a bit of a big leap from WPF. – Riva Oct 11 '14 at 01:07

0 Answers0