我正在编写一个应用程序,它应该在 2 个显示器上运行,
当然后小显示器显示在大显示器上显示的相同信息的浅色版本时。
使用 MVVM 模型实现这一点的最佳方法是什么?
我想创建一个 View 模型和两个 View ,并将这些 View 的数据上下文设置为 View 模型。这是实现这一点的正确方法吗?
谢谢
最佳答案
I have thought to create one view model and two views, and set the datacontext of those views to be the view model. Is it a right way to implement this ?
作为上面的评论,VM 并不关心它是如何使用的,因此您可以根据需要使用 1 个 VM 作为 View 的 DataContext。
关于WPF MVVM 两种 View ,一种 View 模型,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25589486/