Navigate() function of RadFrame error

2 posts, 0 answers
  1. xuan
    xuan avatar
    7 posts
    Member since:
    Mar 2009

    Posted 17 Mar 2009 Link to this post

    When i use Navigate() function of RadFrame control. I met  an error at Frame.Navigate(navi);:
    "Root visual should be Panel". please helps me to solve that problem!
     public TemplateFrame()
            {
                InitializeComponent();
                NavigatePage navi = new NavigatePage(new Page());
                Frame.Navigate(navi);
            }
    NavigatePage is created like that :

     public partial class NavigatePage : UserControl,IFrame
        {
            public NavigatePage()
            {
                InitializeComponent();
            }
            public NavigatePage(Page nextPage)
            {
                InitializeComponent();
               LayoutRoot.Children.Add(nextPage);
            }

  2. Bobi
    Admin
    Bobi avatar
    513 posts

    Posted 19 Mar 2009 Link to this post

    Hello Xuan,

    Can you please check if the application's RootVisual is set to RadFrameContainer:

    private void Application_Startup(object sender, StartupEventArgs e)
            {
                this.RootVisual = new RadFrameContainer();
                NavigationService service = NavigationService.GetNavigationService();
                if (!NavigationService.LoadDeepLink())
                {
                    service.Navigate(new Page1());
                }
            }
     
    Note:
    It is important that RadFrame must always be placed in RadFrameContainer! You can use RadFrame in this way:

        <telerik:RadFrameContainer>
                    <telerik:RadFrame Source="Page2" Width="500" Height="300"></telerik:RadFrame>               
               </telerik:RadFrameContainer>

    When you use navigation with RadFrame the navigation target is automatically set to the parent RadFrameContainer thet holds the frame.

    For more examples visit:
    http://demos.telerik.com/silverlight/#PageNavigation/FirstLook
    http://www.telerik.com/help/silverlight/navigation-implement-navigation-framework.html

    Please let me know if you have further questions.

    Best wishes,
    Boryana
    the Telerik team


    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top