Dimm a window when showing a modal window

Topics: Questions
Feb 2, 2013 at 1:17 PM
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)
Feb 3, 2013 at 7:25 PM
Use the EffectsHelper class. It has such methods.
Feb 4, 2013 at 10:14 AM
Ok, Thanks.
But it should be used in Views code behind. how can i use EffectsHelper in ViewModel?
Feb 4, 2013 at 2: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.