WPF 中的 Windows Phone/Windows 8 风格水平滚动?
我正在用 C# WPF 编写一个应用程序,希望实现 Windows 8 中突出的类似基于触摸的水平滚动功能。 目前我正在使用 ScrollViewer 及其内容。就滚动而言,这工作得很好,但在与其中的控件(例如滑块)交互时会产生问题。
由于我有限的编程知识(一个月前我做的最多的事情就是在 Photoshop 中创建一个模型:P),我认为这是因为触摸首先击中了 ScrollViewer?有什么办法可以扭转这个局面吗?即使您必须点击空白区域才能滚动,我也会很高兴,我只需要用户能够轻松地与内部控件进行交互,而不会意外地滚动到各处 ^_^
不幸的是,我不能只需针对 Windows 8 编写代码,因为这是专门针对一堆支持触摸的 Windows 7 机器的。
I'm writing an app in C# WPF and I'm hoping to implement a similar kind of touch-based horizontal scrolling that's featured prominently in Windows 8.
At the moment I'm using ScrollViewer with content inside it. This works fine as far as the scrolling is concerned, but it creates problems when interacting with controls inside of it (for example, sliders).
With my limited programming knowledge (a month ago the most I'd done was create a mockup in Photoshop :P), I'd assume this was because the touch hits the ScrollViewer first? Is there some way of flipping this around? I would be happy even if you had to hit a white space to be able to scroll, I just need the user to be able to interact with the controls inside easily without accidentally scrolling all over the place ^_^
Unfortunately, I can't just code for Windows 8 as this is specifically for a bunch of touch-enabled Windows 7 machines.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在这里查找 Metro 主题,您可能会在这里找到一些可以修改和使用的有用样式。
您也可以请查看此网站,了解有关 WPF 上的 Metro UI 的信息和指南
Look for the Metro theme here you might find some usful style here that you can modify and use..
Also you can check this website for information and guidelines on Metro UI on WPF