指向给定的运行流程文档wpf

发布于 2024-08-03 14:28:58 字数 231 浏览 1 评论 0原文

我有一个带有动态内容的 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

著墨染雨君画夕 2024-08-10 14:28:58

我刚刚找到了解决方案,一旦您获得指向 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文