ReactiveUI 路由和 Windows Phone

编程入门 行业动态 更新时间:2024-10-28 18:22:27
本文介绍了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

本文发布于:2023-11-12 18:01:02,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1582159.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:路由   ReactiveUI   Phone   Windows

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!