使用 Windows 7 Surface Toolkit 实现两指滚动 - 需要一些想法!
我正在使用 Surface Toolkit,并且愿意为包含 FlowDocumentScrollViewer 的 Scatterviews 编写基本的两指滚动算法,但我不太确定如何执行此操作。
如果考虑到旋转的 ScatterView 也应该是可滚动的,那么数学是如何完成的?我还需要考虑什么?
令我困扰的一件事是 TouchMove 一次只能触发一根手指,因此您无法真正检查两根手指是否都按下了。
我的目标不是实现完美的实现(还),但它至少应该是可用的。
I'm working with the Surface Toolkit and am willing to code a basic two-finger scroll algorithm for Scatterviews which contain FlowDocumentScrollViewer , but I'm not exactly sure how to do this.
How is the math done if you take into consideration that even rotated ScatterViews should be scrollable? What else do I need to take into consideration?
One thing that bothers me is that TouchMove is fired one finger at a time so you can't really check if both fingers are down.
Its not my aim to make a perfect implementation (yet) but it should be at least useable.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我通过使用 SurfaceScrollViewer 包围 FlowDocumentScrollviewer 来做到这一点。
这并不理想,因为默认行为意味着您可以在中间滚动并在外部执行其他所有操作。
Josh Santangelo 修改了该行为,因此它可以同时执行这两项操作(查看此处),但它仅现在可与 Surface SDK SP1(适用于 Surface 设备的那个)配合使用,但不适用于 Windows Touch Beta 的 Surface SDK(适用于 Windows 7 的那个)。
I did this by surrounding the FlowDocumentScrollviewer with a SurfaceScrollViewer.
This isn't ideal since the default-behavior means you can scroll in the middle and do everything else on the outside.
Josh Santangelo modified the behaviour so it can do both (look here) but it only works with Surface SDK SP1 now (the one for the Surface Device) but not Surface SDK for Windows Touch Beta (the Windows 7 one).