Adding Region Problem

Topics: Prism v2 - Silverlight 2
Jun 21, 2009 at 10:22 PM
Edited Jun 21, 2009 at 10:26 PM


I'm having a problem with adding a region to a telerik docking control.  I have left a post on their forums but I suspect it might be a prism thing.  The telerik post can be found at:

Basically, I'm adding a region to a docking control using the following xaml:

                <tcn:RadTabControl regions:RegionManager.RegionName="MainRegion"
                        infRegions:RadTabControlRegionAdapter.ItemContainerStyle="{StaticResource MainRegionTabControlItemStyle}"

Unfortunately the region is never added to the regionmanager and I'm unable to add a view.  As described in the above post, I don't think the problem is with the tabcontrol and associated region adapter as I've used this elsewhere in my app with success.  I have also tried the following with the same result:

   <ContentControl regions:RegionManager.RegionName="MainRegion"/>  

So why doesn't the region get added to the region manager?  I have tried calling the RegionManager.SetRegionName() method in the code behind by referencing the framework element but again with the same result.  For some reason prism doesn't like the raddocking.documenthost.  Note that I can add a radtabcontrol without the region and it works fine so there isn't something foundamental with adding content to documenthost.  My first thought was that I had to write a custom region adapter for the docking control however I'm not loading content into the actual docking control but rather the child control i.e. the region I want will be hosted in either a content or items control (or slight derivatives).

Can anyone please advise why the MainRegion isn't being added to the RegionManager.  Also, I would appreciate if anyone could let me know if there is a work around.

Thanks in advance.



Jun 22, 2009 at 10:04 PM

I think the problem is that the mainregion is deactivated shortly after creation.  See updated post on the telerik forums.  Anyone know what causes a region to deactivate or what causes it to be removed from the regionmanager.regions collection (SingleActiveRegion)?  The only work around for the telerik docking control is to somehow force and keep the region active.

Thanks in advance




Aug 14, 2009 at 3:16 PM


Did you find a solution to your problem? I am facing the same issue. The working solutions posted by Telerik are made on ViewDiscovery whereas we are using ViewInjection.

I have four regions in my solution. Three of them work fine, because they are bound to the region at compile time. Our main ContentRegion finds the views at runtime depending on the user actions in menu.

Will highly appreciate if you could share your thoughts.