有没有办法在 Windows 8 Metro Apps 中获得滚动功能? [英] Is there a way to get push to scroll functionality in Windows 8 metro Apps?

查看:40
本文介绍了有没有办法在 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.

有没有办法让它工作?

推荐答案

Paul Gusmorino,UI 平台的首席项目经理.

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天全站免登陆