Xamarin Forms,一个ViewModel将数据获取到该属性,但在视图中显示不显示

发布于 2025-02-04 15:09:29 字数 404 浏览 5 评论 0原文

我有2个视图和2个视图模型,第一个具有一个针对每个类别的按钮,该按钮将值发送到ViewModel命令,该命令将第二个视图/ViewModel与发送的数据一起按下。

该数据是在第二个ViewModel上收到的,但视图为空。

这有什么问题?

照片来自第二视图/viewModel。

在此处输入图像描述

在此处输入图像描述

I have a 2 Views and 2 ViewModels, the first one has a button for each category that sends a value to the ViewModel Command, which push the second View/ViewModel with the data sent.

That data is received on the second ViewModel but the View is empty.

What could be the problem with that?

The photos are from the second View/ViewModel.

enter image description here

enter image description here

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

等风也等你 2025-02-11 15:09:29

好的,所以@toolmakersteve是对的,问题在于,第二个ViewModel有两个实例,感谢您@ToolMakerSteve :)

Ok, so @ToolmakerSteve was right, the problem was that there was two instances of the second viewmodel, thanks to you @ToolmakerSteve :)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文