Dialog Service for MVVM Apps


/ Published in: C#
Save to your folder(s)

In MVVM, where there should be little or no code behind with strong separation of concerns, one might wonder how to create dialogs. If you show a dialog using `new SaveFileDialog()`, when Unit Testing, a dialog will show, halting the unit test. With a service class such as this, one might provide a service implementing `IDialogService` that provides the ViewModel with the required information

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.