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.
我只是想知道是否可以创建从一个视图模型到另一个视图模型的触发事件。如果是这样,如何实现?
从技术上讲,这是可能的——例如,您可以使用事件。但另一个问题——这真的是你需要的吗?
ViewModel 与 View 或 Views 一起工作。下一阶段是 ViewModel 和 Model 等之间的通信。
回答您的问题 - 是的,这是可能的,但很可能这不是软件开发的最佳实践。