触摸时垂直和水平滚动条行为 [英] Vertical and horizontal scrollbar behavior in touch

查看:160
本文介绍了触摸时垂直和水平滚动条行为的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Windows 10 Tab中,我创建了一个示例应用程序,其中包含带有自定义水平和垂直滚动条的列表控件。在通过触摸滚动垂直滚动条时,有时会生成WM_GESTURE消息。但是在水平滚动条的情况下,问题没有发生。这种行为改变的原因是什么......如果有人在触摸时发现了这种行为。



我尝试了什么:



问题仅发生在垂直滚动条中。水平滚动条没有问题。

In windows 10 Tab, I have created a sample application contains list control with customized horizontal and vertical scroll bar. While scrolling in vertical scroll bar through touch, sometimes WM_GESTURE message become generated. But in the case of horizontal scrollbar, the issue is not occurred. what is the reason for this behavior change... If anybody identified this behavior in touch.

What I have tried:

Issue is only occurred in vertical scroll bar only. Horizontal scroll bar have no issue.

推荐答案

执行垂直滚动的手势称为单指平移。当没有手势支持时,事件将被翻译为滚轮事件。您将只看到垂直事件,因为没有水平滚轮,水平平移被解释为拖动。请参阅 Windows Touch手势概述(Windows) [ ^ ]有关手势和相应鼠标操作的概述。



发送 WM_GESTURE 消息垂直事件,以实现增强的平移,如改善单一 - 手指平移体验(Windows) [ ^ ]。
The gesture that performs vertical scrolling is called single-finger panning. When having no gesture support, the events will be "translated" to scroll wheel events. You will only see vertical events because there is no horizontal scroll wheel and horizontal panning is interpreted as dragging. See Windows Touch Gestures Overview (Windows)[^] for an overview of gestures and the corresponding mouse actions.

The WM_GESTURE messages are send for vertical events to implement enhanced panning as described at Improving the Single-Finger Panning Experience (Windows)[^].


这篇关于触摸时垂直和水平滚动条行为的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆