Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我试图在 ShowViewModel 调用期间将参数传递给我的 ViewModel,但遇到了麻烦。所有示例似乎都很旧,因为它们使用 v3 中不再存在的 RequestNavigate ?当我尝试构建我的参数 MvxBundle 时,我不确定要放入什么,以便 IOC 正确构建视图模型。我总是可以在我的自定义 ViewModelLocator 中自己处理这个问题,但我认为系统会使用 ShowViewModel 的 paramterBundle 参数为我做这件事。
此处讨论了视图模型生命周期的重新设计
Afaik,从那时起唯一改变的是 ShowViewModel 而不是 RequestNavigate 的引入
此页面上有一个关于导航的 N+1 视频
这里有一个导航演示应用程序
我的错误是试图在我的视图模型的构造函数中接受参数,而不是依赖 InitFromBundle 方法。观看 Collect-A-Bull 系列有助于了解这一点。