Windows Phone 8.1 使用字符串而不是类型进行导航 [英] Windows Phone 8.1 navigate using string instead of a type

查看:26
本文介绍了Windows Phone 8.1 使用字符串而不是类型进行导航的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 Windows Phone 8.1 中,有没有办法使用字符串而不是类型从一个页面导航到另一个页面?

In Windows Phone 8.1 there is any way to navigate from one page to another using an string instead of a Type?

没有反射,Frame.Navigate 只接受类型.

There is no reflection and Frame.Navigate only accepts type.

谢谢.

推荐答案

我同意 Kai Brummund 的观点.您应该编写一个 NavigationService.导航服务的一个很好的例子是 MVVM 轻型导航服务.在这里你可以找到源代码.

I agree with Kai Brummund. You should write a NavigationService. A good example of a navigation service is the MVVM light navigation service. Here you can find the source code.

这篇关于Windows Phone 8.1 使用字符串而不是类型进行导航的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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