文档查看器中滚动查看器上的工具提示
我有一个文档查看器,在我的 wpf 项目中使用它来显示大约 600 页的 xps 文档报告,效果很好。但从用户的角度来看,我喜欢在滚动查看器上显示当前页码作为工具提示,同时拖动滚动条说明视图中的当前页码。有点像这样的 PDF 文件 -
我正在寻找一些如何实现这一点的想法。如果无法显示缩略图,那么仅当前页码对我来说就足够了。 文档查看器中是否有对此功能的内置支持?
感谢您的帮助..
I have a documentviewer which i used in my wpf project to show xps document reports of having around 600 pages which is working great. But from user point of view i like to show the current page number as a tooltip on my scrollviewer while dragging the scroll stating the current page number in view. Somewhat like in a PDF file like this -
I was looking out for some ideas how to implement this. Just a current page number if not possible to show a thumbnail image would be good enough for me.
Is there any in-built support in documentviewer for this functionality??
Thanks for any help..
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我找不到像
IsScrolling
这样的东西,所以我会像这样处理它:滚动文档时应该显示弹出窗口,然后在一段时间后它应该淡出。这是在处理程序中完成的:
编辑: 该事件也会在通过鼠标滚轮等完成的滚动上触发。您可以将处理程序中的所有内容包装在
if (Mouse.LeftButton == MouseButtonState.Pressed )
,不是 100% 准确,但谁在左键单击时使用 MouseWheel 滚动?I cannot find anything like
IsScrolling
so i would approach it like this:The popup should be displayed when the document is scrolled, then it should fade out after some time. This is done in the handler:
Edit: The event fires also on scrolls done via mouse-wheel etc. you could wrap everything in the handler in
if (Mouse.LeftButton == MouseButtonState.Pressed)
, not 100% accurate but who scrolls with the MouseWheel while left-clicking?