How to dynamically reshape Regions?

Jul 14, 2008 at 10:36 PM
Consider an application like MSN Live Messenger. I would define a 'MainRegion' in the shell where I will show the Logon view. If a logon is successful, I need to hide or destroy the Logon view, and show the Live Messenger UI. How then would I dynamically replace the 'MainRegion' to adding new regions like 'Status', 'Contact List', 'Toolbars' in shell.xaml?

Sure, I can create a module with local regions and display it inside the MainRegion, but I would like to make 'Status', 'Contact List', 'Toolbars' into separate modules, I don't think it's possible to display a view from a module to a local region defined in another module, is it? Thanks for any suggestions.
Jul 16, 2008 at 4:54 PM
You could do the following:

Create a login module that hosts the login view with a login service to handle the login logic.
Once login is succesful remove the login view and publish the LoginSuccessFulEvent from the login module.
In each module have a subscription on the LoginSuccessFulEvent and show the view required by that module.

Hope this helps