How have you successfully implemented MessageBox.Show() functionality in MVVM?

后端 未结 12 1538
清歌不尽
清歌不尽 2020-11-28 05:55

I\'ve got a WPF application which calls MessageBox.Show() way back in the ViewModel (to check if the user really wants to delete). This actually works

12条回答
  •  悲哀的现实
    2020-11-28 06:54

    I've made a simple MessageBox wrapper control for us to use in pure MVVM solution and still allowing unit testing capability. The details are in my blog http://geekswithblogs.net/mukapu/archive/2010/03/12/user-prompts-messagebox-with-mvvm.aspx

    mukapu

提交回复
热议问题