I need to create a document viewer in WPF.
- The document is read-only. This is not an editor.
- The document usually is very long and not paginated (meaning it is a long scrolling document).
- The document should be scrolled smoothly, even if it is large.
- The document control should not hang (unresponsive) while loading a large document (at least show "loading...", instead of freezing).
- The document needs to be word-wrapped when the user resize the window.
- The document may contain images and push buttons and hypertext links.
- It need to support folding like the Visual Studio editor.
First I tried to use the FlowDocument in .NET, but the performance was not so good when the document was long. If I create a document viewer control myself, is there any article or approach that I can refer to? I am thinking about drawing everything using Visuals on a custom control. Is this a good approach?