How to create Modal Dialog with MVVM Light -
what correct way open modal dialog in wpf using latest version of mvvm light framework. want able pass values viewmodel of window used modal dialog.
i cannot find samples on mvvm light site.
you should use dialogservice abstracts visual representation of view can "show" within view model (and later possibly/hopefully) mock testing.
more info on dialogservice here.
-edit- wrong, alan rutter (op) points out idialogservice simple message boxes. don't think mvvm light here can build similar service (e.g. icustomdialogservice?). custom dialogs can register available service, , interface provides calls allow invoke specific dialog name (string or enum perhaps) , pass parameters want.
dialogs can register service in few different ways - can happen type in static constructors (that somehow have force) or more explicitly through attributes in assemblies. possibly using class attributes. depends on startup sequence , general infrastructure.
Comments
Post a Comment