views:

107

answers:

2

What is the best way to get an event from a child or grandchild module up to the parent Shell?

For instance, if I have a view in a module that is actually 2 levels away from the Shell, and I have a Window behavior. Is the eventaggregator really the best way to do this? it seems like overkill. I just want my MainShell to watch for a change in the IsDialogOpen Property on the ViewModels in all my child modules. I feel like I am missing the trees for the forest...

A: 

Can I ask why your shell would care? That may change the way you handle this scenario.

Garry Clark
because as according to the article I linked, the behavior causes the mainwindow to blur(or go dark or some action to focus on the dialog) But in order to do that it has to know when a dialog is open. the behavior is on the main window, not the views themselves... Maybe I just need another option, but I cant think of any at the moment..this whole composite app is really new to me..
ecathell
A: 

I actually achieved this with wpf 4 and visualStateManager.

ecathell