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

后端 未结 12 1518
清歌不尽
清歌不尽 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:41

    I recently came across this problem where I had to replace the MessageBox.Show in the ViewModels with some fully MVVM complaint message box mechanism.

    To achieve this I used InteractionRequest and InteractionRequest along with interaction triggers and wrote my own Views for the message box.

    What I've implemented is published here

提交回复
热议问题