I'm using prism in my current Silverlight application and I need to add a generic way to implement windows management. I read about how to create a PopupDialogWindow (by adding a PopupDialogActivationBehavior and creating a wrapper around my view) and this
works just fine (just for the record I use a docking component to create floating windows - but this is not the problem).
In the samples that I've seen so far this popup window is closed only using the wrapper close button and handling the event in the behavior to remove the view. I would like to have some suggestion regarding:
1. how can I close the window from the ViewModel? Should I call Close() on the View? (usually a View is added and removed from a region - I don't know how to bring in the close concept)
2. how can I notify the owner (ViewModel) of the window giving that the user can close the window from both the wrapper (close button) and the ViewModel of the window? Should the owner of the window subscribe to events of the View or the ViewModel?
I don't even know if I was able to make it clear, but I'll wait for some answers or some links to read and have a better understanding.