The best approach to create new window in WPF using MVVM

后端 未结 6 1903
無奈伤痛
無奈伤痛 2020-12-04 07:21

In the neighbour post: How should the ViewModel close the form? I\'ve posted my vision how to close windows with MVVM usage. And now I have a question: how to open them.

6条回答
  •  忘掉有多难
    2020-12-04 07:52

    My approach is similar to adrianm’s. However, in my case the Controller never works with the concrete View types. The Controller is completely decoupled of the View - in the same way as the ViewModel.

    How this works can be seen in the ViewModel example of WPF Application Framework (WAF).

    .

    Best Regards,

    jbe

提交回复
热议问题