有没有一种方法可以推动Windows 8 Metro Apps中的滚动功能? [英] Is there a way to get push to scroll functionality in Windows 8 metro Apps?

查看:63
本文介绍了有没有一种方法可以推动Windows 8 Metro Apps中的滚动功能?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Windows 8 Consumer Preview中,将鼠标移到开始屏幕的左边缘或右边缘会导致内容滚动.

In the Windows 8 Consumer Preview, moving the mouse towards the left or right edge in the start screen causes the content to scroll.

标准控件(以及当前发布的预览应用)似乎不支持此功能.

The standard controls (and currently released preview apps) does not seem to support this.

有没有办法使这项工作成功?

Is there a way to make this work?

推荐答案

I asked this question at TechEd North America this year, after one of the sessions given by Paul Gusmorino, a lead program manager for the UI platform.

他的回答是不,应用程序无法对边缘滚动. WinJS和WinRT/XAML应用程序甚至都没有获得您自己实现它所需的事件.应用会在鼠标指针级别获得事件,并且一旦鼠标指针触及屏幕边缘,它就不能再移动了,您也不会再获得任何事件. (嗯,它可能会上下摆动一点,但如果碰到某个角落则不会摆动.无论如何,滚动开始"屏幕的方式还不够好.)

His answer was that no, apps can't do push-against-the-edge-to-scroll. WinJS and WinRT/XAML apps don't even get the events you would need to implement it yourself. Apps get events at the level of the mouse pointer, and once the mouse pointer hits the edge of the screen, it can't move any farther and you don't get any more events. (Well, it might wiggle up and down a little bit, but not if it hit a corner. At any rate, it's not good enough to scroll the way the Start screen does.)

他提到,如果您正在编写C ++/DirectX应用程序,则可以自己获得执行此操作所需的原始鼠标输入-您可以得到低级的通过DX,DY移动的设备",而不是而不是高级指针移到X,Y".我想这是开始"屏幕的工作方式,尽管我没想问.

He mentioned that, if you were writing a C++/DirectX app, you would be able to get the raw mouse input you needed to do this yourself -- you can get low-level "device moved by DX,DY" rather than the high-level "pointer moved to X,Y". I'm guessing this is how the Start screen does it, though I didn't think to ask.

但是,不是的,它不是内置的,不是您可以自己实现的东西(除非您使用低级C ++/DirectX编写应用程序),而且听起来好像他们没有计划在Windows 8发行之前添加它.

But no, it's not built-in, it's not something you can implement yourself (unless you write your app in low-level C++/DirectX), and it sounds like they have no plans to add it before Windows 8 ships.

我个人认为,与开始"屏幕相比,让应用感到束手无策是他们的短视之作,但是显然,他们并不关心可用性之类的小事情. </rant>

Personally, I think it's pretty short-sighted of them to have apps feel cripped compared to the Start screen, but evidently they're not concerned about little things like usability. </rant>

这篇关于有没有一种方法可以推动Windows 8 Metro Apps中的滚动功能?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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