FlowDocumentPageViewer默认跳转到最后一页
本文关键字:最后 一页 默认 FlowDocumentPageViewer | 更新日期: 2023-09-27 18:27:03
我有一个FlowDocument,它已经填充了一堆表。然后我会的,
DocumentReader = doc;
(DocumentReader是FlowDocumentPageViewer,doc是FlowDocument)
当我这样做时,控件会跳到最后一页。我尝试了DocumentReader.FirstPage()
,但后来发现PageCount是1。(FlowDocument真的很长;我在控件中看到了数百页。除了加载它时,我看到了344页中的344页)。
如何跳到第一页?
尝试使用此-
this.DocumentReader.GoToPage(1);
我也计算过这个东西。在检查了flowdocumentReader的查看模式后,我发现将查看模式从滚动切换到页面将始终将第一个pgae设置为当前页面。事实上,您可以设置flowdocumentreader的直到内容插入完成,以获得良好的UI转换。
this.docReader.ViewingMode=FlowDocumentReaderViewingMode.Scrolthis.docReader.ViewingMode=FlowDocumentReaderViewingMode.Page;
祝你好运!