您可以将Xamarin.Forms 4.0与Shell和Prism框架一起使用吗 [英] Can you use Xamarin.Forms 4.0 with Shell and Prism framework

查看:127
本文介绍了您可以将Xamarin.Forms 4.0与Shell和Prism框架一起使用吗的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您可以将Xamarin Forms 4.0新Shell与Prism一起使用吗?我正在寻找示例或一些文档

Can you use Xamarin Forms 4.0 new Shell with Prism? I'm looking for examples or some documentation

推荐答案

简而言之,它取决于您要使用的Prism.当然,您可以使用ViewModelLocator来注入ViewModel,但实际上并没有传递参数来初始化任何东西的方法.因此,例如,任何一个导航界面都不起作用,您的页面也不会从PageBehaviorFactory的应用中受益.最终,Shell的初始实现对于每个MVVM框架都是完全无法使用的(即使您自己滚动).

The short answer is sort of and it depends on what from Prism you want to use. You can of course use the ViewModelLocator to inject your ViewModels, but you really don't have a way passing parameters to initialize anything. So none of the Navigation interfaces for example would work, nor would your page get the benefit of the PageBehaviorFactory applying the behaviors that we apply. Ultimately the initial implementation of Shell was completely unusable for every MVVM framework (even if you roll your own).

尽管Forms团队一直在与我们合作,但有一个解决方案正在酝酿之中.我无法说出确切的时间,但是如果您查看 Shell支持,请使用Prism术语 a>问题,您会看到它在Prism 8.0中被标记为支持,而Prism 8.0是当前正在使用的vNext版本.

The Forms team though has been working with us and there is a solution on the horizon. I cannot say when exactly that will land, however in Prism terms if you look at the Shell Support issue, you'll see that it's marked for support in Prism 8.0 which is the current vNext version being worked on.

还请注意,有关此问题的工作已在 https://twitch.tv/dansiegel并可以在YouTube https://youtube.com/dansiegel

Also note that the work on this issue has been live streamed on https://twitch.tv/dansiegel and can be viewed for VOD on YouTube https://youtube.com/dansiegel

这篇关于您可以将Xamarin.Forms 4.0与Shell和Prism框架一起使用吗的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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