开发者

WPF MVVM DialogService close modal dialog?

I use the MVVM-pattern in my WPF-application. Now I show a dialog with my dialogService:

_dialogService.ShowDialog(Me, settingsViewModel)

The mapping (which view should be shown to this ViewModel) was set in the WindowViewModelMappings class.

My question is now: How can I close the dialog from the开发者_开发知识库 settingsViewModel?

Thank you..


Without knowing more about the implementation, I'd recommend you to return a token (guid, ...), that represents that dialog. And then you have a call to close the dialog where you pass in that token.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜