This is a migrated thread and some comments may be shown as answers.

RadDocking with Prism framework not working

5 Answers 171 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Arpit
Top achievements
Rank 1
Arpit asked on 11 Mar 2011, 12:52 PM
Hi,

I am facing the foll problems :

PROBLEM – 1

 

Scenario :  

        Issue Regarding Telerik Docking > RadDocking.DocumentHost  

        

       Here we want to activate view from specific region.  Please go through the following steps -

    

 

  1. First I register view ModuleAMainPageView with MyMainRegion by using following line :

 

regionManager.RegisterViewWithRegion("MyMainRegion", () => unityContainer.Resolve<ModuleAMainPageView>());

 

2.    Then I have added two views in same page as ModuleAMainPageView contain TabControl.

 

regionManager.RegisterViewWithRegion("MainTabRegion", () => unityContainer.Resolve<TabAView>());

regionManager.RegisterViewWithRegion("MainTabRegion", () => unityContainer.Resolve<TabBView>());

 

3.   But after this we have requirement that we have to activate ModuleAMainPageView View, so I have write code as :

 

string moduleAMainPageView = "ModuleA.Views.ModuleAMainPageView";

ActivateView(moduleAMainPageView, regionManager.Regions["MyMainRegion"])

 

4.   Where ActivateView() is function with following code

 

public void ActivateView(string viewName, IRegion currentRegion)

        {

            foreach (var v in currentRegion.Views)

            {

                var viewType = v.GetType();

                if (viewType.FullName != viewName) continue;

                currentRegion.Activate(v);

                break;

            }

 

        }

 

 

5.   Please have look at code for region.

<!--<telerik:RadDocking.DocumentHost>-->
            <telerik:RadSplitContainer x:Name="MainPageContainer"  >
                <telerik:RadPaneGroup x:Name="Group5">
                    <telerik:RadPane x:Name="EverestMainRegion"   FontSize="10.667" regions:RegionManager.RegionName="MyMainRegion" ScrollViewer.HorizontalScrollBarVisibility="Auto" >                        
                          
                    </telerik:RadPane>
                </telerik:RadPaneGroup>
            </telerik:RadSplitContainer>
            <!--</telerik:RadDocking.DocumentHost>-->

 

 

6.   At point number 5 ,if we comment the code for  <telerik:RadDocking.DocumentHost>, the above code work fine but If we replace same code as point 5 then it gives me following error at point number 3.

ERROR :  “The region manager does not contain the MyMainRegion region.”

 

  • My Question Is : Is there is any other alternate way or another code line which will replace code at point number 3.

 

 

PROBLEM – 2

 

Scenario :  

   As we are using Prsim Approach,  We have defined a Shell  which has a region named ( LoginScreenRegion ). This Region accepts LoginPageView initially and after hitting login button, it accepts LandingPageView.  

   This landingPageView has Telerik Docking inside it.    


Problem:
 

     After cliking login Button – the LandingPageView comes, and then after unpin of Right Panes ( Assignment , Message Notification) , the Whole UI gets truncated to the center of the screen. 

    ( Please see the attached png Image – Collapsed,png)

  This Problem is coming whenever we are using Prism approach. However it works fine if we do it through normal traditional approach ( without prism) .

I have also attached images for my solution Explore, shell, loginPageview 

5 Answers, 1 is accepted

Sort by
0
George
Telerik team
answered on 17 Mar 2011, 09:50 AM
Hi Arpit, 

Straight to your questions:
  1. We are aware of this problem with DocumentHost and PRISM. To work around it, I would suggest you to use the RegionManager.SetRegionManager method to register the pane group in the DocumentHost as region.
  2. Could you please give us more information about this problem? Also, if you send us a sample project that reproduces the problem it would be very helpful to pinpoint the problem.

Greetings,
George
the Telerik team
0
David Gerding
Top achievements
Rank 1
answered on 06 May 2011, 10:56 PM
Any progress with this? I tried adding RadDocking to a Prism region and had a bunch of unusual problems crop up.  Is there any other recommended practice beyond the region registration referenced above?

Thanks,
Dave G

0
George
Telerik team
answered on 11 May 2011, 06:18 PM
Hello David, 


There are two approaches to use the RadDocking control with PRISM:
  1. Use the RadPaneGroups as regions. In this way you could use the RadPanes as views and plug them into the RadPaneGroup region (RadPaneGroup is an ItemsControl). 
  2. Use the RadPanes as regions. In this way the region is a content control and you could register another usercontrols for the regions (RadPane is a ContentControl).

Could you please give us more information about the issues with the RadDocking control and PRISM? I am glad to assist you further.


All the best,
George
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Shane
Top achievements
Rank 1
answered on 27 Jul 2011, 03:28 PM
George,
  I am alittle new to the Docking and Prism. Do you have an example with the Q2 2011 and Prism v4 that demonstrates what you talked about in this article.

Your help is greatly appreciated.
0
George
Telerik team
answered on 02 Aug 2011, 07:48 AM
Hello Shane,

 
Please, refer to the following forum thread where you can find additional information about RadDocking & PRISM 4 framework - http://www.telerik.com/community/forums/silverlight/docking/prism-4-and-telerik-raddocking.aspx

Hope this helps.

All the best,
George
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

Tags
Docking
Asked by
Arpit
Top achievements
Rank 1
Answers by
George
Telerik team
David Gerding
Top achievements
Rank 1
Shane
Top achievements
Rank 1
Share this question
or