Using a RadFrame inside a RadPane

3 posts, 1 answers
  1. John
    John avatar
    19 posts
    Member since:
    May 2009

    Posted 27 May 2009 Link to this post

    Greetings! I am trying to simply display a RadFrame (named NavigationFrame in the code snippet below) inside of a RadPane. I can't seem to get the RadFrame's content to show up at all when I perform the navigatation by setting the RadFrame.Source property. Is this even possible? If so, do you have any idea of what I could be doing wrong? I am fairly new at Silverlight/Telerik controls, so any help would be appreciated. Thanks!

    <telerikDocking:RadDocking x:Name="Docking" Margin="10" > 
     
                    <telerikDocking:RadSplitContainer InitialPosition="DockedLeft"
                        <telerikDocking:RadPaneGroup> 
                            <telerikDocking:RadPane Header="StackStudio Explorer" CanDockInDocumentHost="False"
                             
                                <telerikNavigation:RadPanelBar x:Name="NavigationBar" Margin="10" Selected="NavigationBar_Selected" ExpandMode="Multiple"
                                 
                                    <telerikNavigation:RadPanelBarItem Header="Plants" x:Name="Plants" /> 
                                    <telerikNavigation:RadPanelBarItem Header="Sources" x:Name="Sources" /> 
                                    <telerikNavigation:RadPanelBarItem Header="Parameters" x:Name="Parameters" /> 
                                    <telerikNavigation:RadPanelBarItem Header="Controllers" x:Name="Controllers" /> 
                                     
                                </telerikNavigation:RadPanelBar> 
     
                            </telerikDocking:RadPane> 
                        </telerikDocking:RadPaneGroup> 
                         
                    </telerikDocking:RadSplitContainer> 
                     
                    <telerikDocking:RadDocking.DocumentHost> 
     
                        <telerikDocking:RadSplitContainer> 
                            <telerikDocking:RadPaneGroup> 
                                <telerikDocking:RadPane> 
                                    <telerikControls:RadFrameContainer> 
                                        <telerikControls:RadFrame x:Name="NavigationFrame" /> 
                                    </telerikControls:RadFrameContainer> 
                                </telerikDocking:RadPane> 
                            </telerikDocking:RadPaneGroup> 
                        </telerikDocking:RadSplitContainer> 
     
                    </telerikDocking:RadDocking.DocumentHost> 
     
                </telerikDocking:RadDocking> 

  2. Answer
    Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 30 May 2009 Link to this post

    Hi John,

    I would suggest you to use the NavigationService class instead of the RadFrame class. Take a look at the following code:
    <telerikDocking:RadPaneGroup> 
        <telerikDocking:RadPane> 
            <telerikControls:RadFrameContainer Grid.Row="0" x:Name="FramContainer"
            </telerikControls:RadFrameContainer> 
        </telerikDocking:RadPane> 
    </telerikDocking:RadPaneGroup> 
     
    And in the code-behind:
    public partial class Page 
        public Page() 
        { 
            InitializeComponent(); 
            var service = NavigationService.GetNavigationService(); 
            service.Target = this.FramContainer; 
            service.RootPanel = this.FramContainer; 
            service.Navigate(new TestPage()); 
        } 
     
        private void Button_Click(object sender, RoutedEventArgs e) 
        { 
            NavigationService.GetNavigationService().Navigate(new OtherTestPage()); 
        } 
     
    Notice that your pages must implement the IFrame interface to make this work.

    Hope this helps.

    Regards,
    Miroslav Nedyalkov
    the Telerik team

    Instantly find answers to your questions on the newTelerik Support Portal.
    Check out the tipsfor optimizing your support resource searches.
  3. John
    John avatar
    19 posts
    Member since:
    May 2009

    Posted 01 Jun 2009 Link to this post

    Cool. It worked! I appreciate your assistance.
Back to Top