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.
我有两个 View 课程。一个是 DayView,另一个是 CustomView。两者都有列表框。但是我想当我在 CustomView 的列表框项中输入数据并单击保存按钮时,它应该保存在 DayView 列表框中。可能吗?如果是,如何?
将两个视图元素(您希望彼此“连接”的元素)绑定到同一个ViewModel集合。因此,如果一个人在文本框中写入内容,则更改会传播到ViewModel集合,因此通知会在订阅者之间传播,也会传播到另一个视图。