1

I have a FlowDocument that has been populated with a bunch of tables. Then I do,

DocumentReader = doc;

(DocumentReader is a FlowDocumentPageViewer and doc is FlowDocument)

When I do this, the control jumps to the last page. I tried DocumentReader.FirstPage() but then realized that the PageCount is 1. (The FlowDocument is really long; I see hundreds of pages in the control. Except when it is loaded I see page 344 of 344).

How can I jump to the first page?

Ram
  • 13
  • 3

2 Answers2

0

I also have encounted this thing.After checking the viewingmode of the flowdocumnetreader,i find that switching the viewmode from scroll to the page will always set the first pgae as the current page .In fact, u can set flowdocumentreader's visibility to visible until content inserting is completed to gain a decent UI transition.

this.docReader.ViewingMode = FlowDocumentReaderViewingMode.Scrol this.docReader.ViewingMode = FlowDocumentReaderViewingMode.Page;

good luck!

Neil
  • 1
0

Try using this -

this.DocumentReader.GoToPage(1);
Rohit Vats
  • 79,502
  • 12
  • 161
  • 185
  • Tried that. The thing is, that after I do `DocumentReader.Document = Doc`, DocumentReader.PageCount is 1 for some reason. Why would this be? Something fundamental about the FlowDocumentPageViewer methinks. – Ram Mar 08 '12 at 11:29