查询在WPF MVVM模式? [英] Query on MVVM pattern in WPF?

查看:165
本文介绍了查询在WPF MVVM模式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的WPF应用程序实现MVVM模式。

I am implementing a MVVM pattern in my WPF application.

我的应用程序的主窗口分为四个部分:

My application main window is divided into four parts:


  1. 主菜单的顶部

  2. 在左Outlook导航控制。

  3. 在中东的列表视图。

  4. 在底部的另一个列表视图。

导航控件显示不同的设置(配置)控制在Tab项目。

The Navigation control shows different setting (configuration) controls in the Tab items.

所有的四个以上是它们放置在主窗口用户控件

All the four above are user controls which are placed in the main window.

和对应于每一个用户控件有它为界,在每个控件的XAML视图模型分开视图模型,但模型类仍然是所有视图模型之间的相同。

And corresponding to each user control there is separate view model which is bounded with a view model in the XAML of each control, however the model class remain the same between all the view model.

和一个主窗口有这也与在每个控制的XAML视图模型界的一个单独的视图模型。

And a MainWindow has a seperate View Model which is also bounded with a view model in the XAML of each control.

请帮我在取景设计,其中所有的控制每个视图模型上面会互相影响。

Please help me out in framing a design in which each view models of all the controls above will interact with each other.

请让我知道如果我的问题是不清楚你!

Please let me know if my question is not clear to you!!

推荐答案

您理想的模型的变化应该触发改变的ViewModels。如果我没有理解你的问题,你的不该需要的ViewModels直接与对方进行互动,并可能已经在这里找到答案:

Ideally your changes to the model should trigger the changes to the ViewModels. If I understand your question correctly you shouldn't need the ViewModels to interact directly with each other and might already have been answered here:

<一个href=\"http://stackoverflow.com/questions/1798600/mvvm-what-is-the-ideal-way-for-usercontrols-to-talk-to-each-other\">http://stackoverflow.com/questions/1798600/mvvm-what-is-the-ideal-way-for-usercontrols-to-talk-to-each-other

这篇关于查询在WPF MVVM模式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆