Add UserControl to Region defined in a Sibling View

Jan 11, 2009 at 12:42 AM
Hi all,

I am building my first CWPF application and have run into something that I have to believe is very simple (it just escapes me right now).  Here is the situation...

I have a Shell that defines two regions.  In one of those regions "MainWorkArea" I am loading a module that contains a view that defines two additional regions in XAML.  When I initialize the new module I attempt to add a usercontrol (defined in the same module) to one of those newly defined regions.  An exception is thrown because the RegionManager does not have these new regions in its collection yet.  Can somebody point me in the right direction as to how I can get these new regions registered so I can load my usercontrol.

At what point in the startup process does the XAML get parsed and the regions added to the RegionManager?

Thanks for your help!
Jan 11, 2009 at 5:42 AM
Perhaps the following may help you out - there are a number of other blogs that might be of interest to you:

http://www.global-webnet.net/blogengine/post/2008/12/18/Silverlight-CompositeWPF-Prism-regions.aspx 
Jan 11, 2009 at 4:54 PM
Thank you for the prompt reply.  I will look into this in a bit more detail but so far it looks like exactly what I was looking for!