积极答复者
WPF中如何实现Windows 8 App Store(Metro)风格的AppBar?

问题
-
需要用WPF开发Metro风格的应用,运行在基于Windows 8的平板上。开发环境VS2012
请问,我想在WPF的全屏应用中,实现类似Metro应用中的AppBar,主要是希望通过滑入的方式触发(swipe in from top edge or bottom edge)
在尝试发现基于System.Windows的Window窗口,没有对类似事件的消息响应。Toch_Move, Toch_up等事件,无法在窗口外部按下滑入应用窗口时触发。
我在应用窗口Top和Bottom放置了两个高度为5pix的canvas,当Touch_Down时,拉伸当前对象,再侦听该对象的Touch_Move,和Touch_Up进行处理,这个结果非常糟糕,很难在Touch_Down时捕捉5pix高度的区域,操作起来远不如Metro的顺畅,无法在项目中使用。
我在论坛也看到了一篇类似的问题,但无人响应Swipe from edge gesture in fullscreen WPF app
为什么从视窗区域外Touch后,移入视窗区域无法触发Touch_Up?
是否有其他可以替代的方案,来实现我希望的效果。
麻烦啦!
答案
-
你好,
你可以下载Elysium库来实现在WPF中进行Metro风格的应用程序开发。另外,这里有一个与你类似的问题贴你可以参考一下:http://stackoverflow.com/questions/13030507/how-to-create-windows-8-style-app-bar-in-wpf
Lisa Zhu [MSFT]
MSDN Community Support | Feedback to us
Develop and promote your apps in Windows Store
Please remember to mark the replies as answers if they help and unmark them if they provide no help.- 已标记为答案 Lisa ZhuModerator 2013年3月25日 4:35
-
https://github.com/MahApps/MahApps.Metro/
你可以使用MahApps.Metro,里面有不少metro UI, 它的sample里就有swipe的效果。你可以参考下
- 已标记为答案 Lisa ZhuModerator 2013年3月25日 4:35
全部回复
-
你好,
你可以下载Elysium库来实现在WPF中进行Metro风格的应用程序开发。另外,这里有一个与你类似的问题贴你可以参考一下:http://stackoverflow.com/questions/13030507/how-to-create-windows-8-style-app-bar-in-wpf
Lisa Zhu [MSFT]
MSDN Community Support | Feedback to us
Develop and promote your apps in Windows Store
Please remember to mark the replies as answers if they help and unmark them if they provide no help.- 已标记为答案 Lisa ZhuModerator 2013年3月25日 4:35
-
https://github.com/MahApps/MahApps.Metro/
你可以使用MahApps.Metro,里面有不少metro UI, 它的sample里就有swipe的效果。你可以参考下
- 已标记为答案 Lisa ZhuModerator 2013年3月25日 4:35