ReactiveUI 路由和 Windows Phone [英] ReactiveUI routing and Windows Phone

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

问题描述

我正在继续在 Windows Phone 上探索 ReactiveUI,现在我需要在页面之间进行导航.显然,我想用 ReactiveUI 做到这一点.不幸的是,谷歌搜索(和 binging)并没有给出任何样本.我能找到的最有用的东西是 GitHub 上的Play for Windows",它实现了路由.但我认为该技术不适用于 Windows Phone 编程,因为 WP 页面之间的导航与桌面内容非常不同.在 Play 中,据我所知,导航基本上是通过切换不同 UserControls 的可见性来完成的.我认为这不是在 WP 中做事的正确方式.

I'm continuing ReactiveUI explorations on Windows Phone, and have came to a moment where I need to do a navigation between pages. Obviously, I want to do this with the ReactiveUI. Unfortunately, googling (and binging) around didn't give any samples on that. The most useful thing I was able to find is "Play for Windows" on GitHub, which have the routing implemented. But I don't think that technique could apply to the Windows Phone programming, since navigation between WP pages is very different from desktop stuff. In Play, as far as I understand, navigation is basically done by switching visibility of different UserControls. I don't think it's a proper way to do things in WP.

另一方面,查看 ReactiveUI 源代码,我发现 WP7 路由代码确实与桌面路由代码相同.这让我感到困惑.

On the other hand, looking at the ReactiveUI sources, I see that WP7 routing code indeed is the same as the desktop one. This leads me to a confusion.

所以我的问题是,如何在 WP7 上使用 ReactiveUI.Routing?此外,如果能提供一些示例、最佳实践等内容,也很不错.

So my question is, how ReactiveUI.Routing is intended to be used on WP7? Also it would be very nice to have some samples, best practices, whatever, to take a look at.

提前致谢.

推荐答案

对于 WP7 已损坏的基于视图的路由,您必须 使用没有特殊的可供性 - 您必须构建这部分你自己(你不必使用 RxUI.Routing 来使用 ReactiveUI,这是一个可选功能)

There are no special affordances for WP7's broken View-based routing that you have to use - you'll have to build this piece yourself (You don't have to use RxUI.Routing to use ReactiveUI, it's an optional feature)

如果您以可重用的方式构建它并希望将其包含在 ReactiveUI 中,请告诉我!

If you build it in a reusable way though and would like to include it in ReactiveUI, let me know!

这篇关于ReactiveUI 路由和 Windows Phone的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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