Windows Phone 8中的侧边菜单 [英] Side menu in Windows Phone 8

查看:81
本文介绍了Windows Phone 8中的侧边菜单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

各位大家好。我从iOS dev迁移到了WIndows Phone dev,我偶然发现了一个问题。

Hello everybody. I'm migrated from iOS dev to WIndows Phone dev and I have stumbled upon a problem.

我需要实现一个侧面菜单,看起来像ios中facebook应用程序中的那个。它从左到右滑动。它应该包含大约10个按钮(ListView)。预设按钮应该导致查看视图(导航到其他xaml文件)

I need to implement a side menu, that looks like the one in facebook app in ios. It shpuld slide from left to right. It should contain about 10 buttons (ListView). Presign the button should cause chaning the view (navigate to other xaml file)

由于Windows Phone控件和iOS控件之间的巨大差异,我想询问有关如何更好地实现此类控件的建议菜单。我听说过使用Panorama的方法。但它看起来很漂亮吗?

Because of the huge difference between Windows Phone controls and iOS controls I want to ask an advice on how to better implement such menu. I've heard about aproach using Panorama. But would it look pretty?

我的意思是我将有10个不同的XAML文件,内容不同。在每个中我都要添加Panorama控件并添加菜单。当我导航到其他XAML时它看起来不错吗?因为它会在没有任何动画的情况下关闭菜单。

I mean I'll have 10 different XAML files with different content. In each of them I'd have to add Panorama control and add the menu. And when I navigate to other XAML would it look nice? because it would close menu without any animation.

所以请告诉我什么是更好的方法来阻止我想要的东西?以及如何在不丢失菜单动画的情况下在所有XAML之间正确导航。当然,如何避免在所有XAML中复制代码?我猜XAML文件
无法继承。 当然我需要它来支持WIndows Phone 8和8.1。

So please tell me what is the better approach in impelementing what I want? And how to navigate properly between all the XAMLs without loosing the animation of the menu. And of course how to avoid duplicating code in all the XAMLs? I guess XAML files could not be inherited. And of course I need it to support both WIndows Phone 8 and 8.1.

非常感谢你的参与!

推荐答案

嘿,

我为Silverlight写了一些东西,你可以在这里找到:  https://github.com/frostieDE/wp-sidebar。

I wrote something for Silverlight, which you can find here: https://github.com/frostieDE/wp-sidebar.

随意浏览和使用代码 - 您可以将代码迁移到Windows运行时。您可以尝试将Frame设置为侧边栏控件的内容并在此框架内导航。

Feel free to browse and use the code - you might be able to migrate the code to Windows Runtime. You can try to set a Frame as a content for the sidebar control and navigate within this frame.

我知道这不是一个合适的解决方案,但它可能是一个开始; - )

I know this is not a proper solution, but it might be a start ;-)

Marcel


这篇关于Windows Phone 8中的侧边菜单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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