J
J
Jaguar_sea2015-07-28 04:47:44
WPF
Jaguar_sea, 2015-07-28 04:47:44

What are the pros and cons of the various dialog box approaches in WPF MVVM?

As far as I know, there are 3 approaches for working with dialog boxes in MVVM: Messenger, Service Dialog, Dependency Injection. What are their pros and cons? Which approach is better for a small application, which one for a large one? Which one is easier to use? Well, etc. If there are other options, please describe the same.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Grekhov, 2015-08-06
@Sterk

What makes you think that these are approaches for working with dialogs?
Messenger - a pattern for passing messages (events) from one view model to another.
Service Dialog - a service that creates different dialog boxes?
Dependency Injection is one of the implementations of the Inversion of Control principle. For example your MainViewModel needs to use Messenger and ServiceDialog. Then you do dependency injection, for example through a constructor.
The IoC container will substitute the dependencies itself.
This is how I define what you said. Now the question is - what prevents you from using it all together?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question