Dimm a window when showing a modal window

Topics: Questions
Feb 2, 2013 at 12:17 PM
Hello.
I have a LogOnView that must be shown before MainView. My question is how can i dimm the MainView when the LogOnView is showing and then (after log on) Undimm again the MainView.

my code for showing LogOnView before MainView is like below:
public MainViewModel()
{
     var viewModel = new LogOnViewModel();
     var uiService = GetService<IUIVisualizerService>();
     if (uiService.ShowDialog(viewModel) == false)
     {
          Application.Current.Shutdown();
     }
            
     InstantiateCommands();
}
Coordinator
Feb 3, 2013 at 6:25 PM
Use the EffectsHelper class. It has such methods.
Feb 4, 2013 at 9:14 AM
Ok, Thanks.
But it should be used in Views code behind. how can i use EffectsHelper in ViewModel?
Coordinator
Feb 4, 2013 at 1:40 PM
Use the MessageMediator to communicate this to the view, or use the ViewToViewModel attribute in the view to get updates from inside the view model. Another option is to override the OnViewModelPropertyChanged in the view. There you can dimm stuff based on your own properties in an MVVM manner.