Standard Approach of Launching Dialogs/Child Windows from a WPF Application using MVVM

前端 未结 6 411
南旧
南旧 2020-12-30 08:41

All, I would like to know the recognised best approach/industry standard of launching [child] dialogs/windows from an WPF using the MVVM pattern. I have come across the foll

6条回答
  •  一向
    一向 (楼主)
    2020-12-30 09:05

    i simply use a dialogservice, see here

    within your viewmodel you just have to do:

    var result = this.uiDialogService.ShowDialog("Dialogwindow title goes here", dialogwindowVM);
    
    ... do anything with the dialog result...
    

提交回复
热议问题