指向给定的运行流程文档wpf
我有一个带有动态内容的 FlowDocumentPageViewer 。流文档由段落组成,段落中的每个段落都包含一个单词。我正在尝试导航到给定的运行,因此我得到了将返回我想要的运行的方法。 但是,一旦我得到这个运行,我如何通过自动页面更改导航到它?
例如,我选择页面中的最后一次运行,下一次运行在下一页中。如何从那里导航到下一页? 我查看了 TextPointer,但我不确定这是否有帮助。
感谢您的帮助, 鲍里斯
I've got a FlowDocumentPageViewer with dynamic content. The flow document is made of paragraphs, each run in the paragraph contains a word. I'm trying to navigate to a given run, so I got the method which will return me the run I want.
But once I got this Run how can I navigate to it, with automatic page change?
For example I select the last run in a page, the next run is in the next page. How do I navigate to the next page from there?
I had a look at the TextPointer but I'm not sure this will help here.
Thanks for your help,
Boris
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我刚刚找到了解决方案,一旦您获得指向 FrameworkElement 的指针,您将必须调用 FrmkElement.BringIntoView() ,它将自动更改 PageFlowDocumentViewer 中的页面。
I just found the solution, once you get a pointer to your FrameworkElement, you will have to call
FrmkElement.BringIntoView()
, it will automatically change page in the PageFlowDocumentViewer.