Navigation page doesn't work for me

4 posts, 1 answers
  1. Kamal Mostofi
    Kamal Mostofi avatar
    56 posts
    Member since:
    Jan 2010

    Posted 28 Oct 2010 Link to this post

    I've been trying to navigate from my main page to another page and also using transition. I followed the example and help file but didn't help. I think I am missing something here. Please see my xaml and code behin below.

    <telerik:RadPage  x:Class="greenwavevoice.MainPage" xmlns:telerik=""  
        mc:Ignorable="d" d:DesignWidth="900" d:DesignHeight="500"
        <Grid x:Name="LayoutRoot" Background="#FF4B5358">
                <ColumnDefinition Width="20"></ColumnDefinition>
                <ColumnDefinition Width="120" />
                <ColumnDefinition Width="100*" />
                <ColumnDefinition Width="100*" />
                <ColumnDefinition Width="100*" />
                <ColumnDefinition Width="100*" />
                <ColumnDefinition Width="100*" />
                <ColumnDefinition Width="100*" />
                <RowDefinition Height="146"></RowDefinition>
                <RowDefinition Height="10*"></RowDefinition>
                <RowDefinition Height="10*"></RowDefinition>
                <RowDefinition Height="10*"></RowDefinition>
                <RowDefinition Height="10*"></RowDefinition>
                <RowDefinition Height="10*"></RowDefinition>
                    <Border Background="#FF879D89" Grid.Column="0" Grid.Row="0" Opacity="0.9" Grid.ColumnSpan="8" >
                <telerik:RadRibbonBar Title="Green Wave Voice" >
                    <telerik:RadRibbonTab Header="English">
                        <telerik:RadRibbonGroup Header="Membership" Icon="/Telerik.Windows.Controls.RibbonBar;component/RibbonGroupCollapsedIcon.png">
                            <telerik:RadRibbonButton Content="Become a Member" Click="RadRibbonButton_Click" />
                            <telerik:RadRibbonButton Content="Log in" />
                            <telerik:RadRibbonButton Content="Forgotten Password?" />
                        <telerik:RadRibbonGroup Header="Contact us" Icon="/Telerik.Windows.Controls.RibbonBar;component/RibbonGroupCollapsedIcon.png">
                            <telerik:RadRibbonButton Content="Email" />
                        <telerik:RadRibbonGroup Header="About us" Icon="/Telerik.Windows.Controls.RibbonBar;component/RibbonGroupCollapsedIcon.png">
                            <telerik:RadRibbonButton Content="Who We Are!" />
                            <telerik:RadRibbonButton Content="Our Mission" />
                    <telerik:RadRibbonTab Header="فارسی">
                        <telerik:RadRibbonGroup Header="News" Icon="/Telerik.Windows.Controls.RibbonBar;component/RibbonGroupCollapsedIcon.png" />
                    <!--<StackPanel Margin="0" VerticalAlignment="Stretch" Orientation="Horizontal">
                    <telerik:RadButton x:Name="btnpersian" Content="فارسی" Click="btnpersian_Click" Width="100" >
                    <telerik:RadButton x:Name="btnenglish" Content="English" Width="100" />
            <telerik:RadFrameContainer x:Name="mainframe1" Grid.Column="0" Grid.Row="0" Grid.RowSpan="6" Grid.ColumnSpan="9"  >
                <telerik:RadFrame x:Name="myframe" ></telerik:RadFrame>
    </telerik:RadPage >
    namespace testing
        using System;
        using System.Collections.Generic;
        using System.Linq;
        using System.Net;
        using System.Windows;
        using System.Windows.Controls;
        using System.Windows.Documents;
        using System.Windows.Input;
        using System.Windows.Media;
        using System.Windows.Media.Animation;
        using System.Windows.Shapes;
        using System.Windows.Navigation;
        using Telerik.Windows.Controls.TransitionEffects;
        using Telerik.Windows.Controls;
        public partial class MainPage : Telerik.Windows.Controls.RadPage 
           Telerik.Windows.Controls.NavigationService service;
            public MainPage()
            private void RadRibbonButton_Click(object sender, RoutedEventArgs e)
                Telerik.Windows.Controls.NavigationService service1 = Telerik.Windows.Controls.NavigationService.GetNavigationService();
                service1.Target = this.mainframe1;
                service1.Transition = new Telerik.Windows.Controls.FadeTransition(new TimeSpan(0, 0, 0, 1));
                service1.Navigate(new Persianmenu());

    I hope someone can help me.

    Many thanks,
  2. Answer
    Miro Miroslavov
    Miro Miroslavov avatar
    588 posts

    Posted 03 Nov 2010 Link to this post

    Hi Kamal Mostofi,

     Since Silverlight 3, there is a built-in navigation system and we strongly advice you to use it, instead of ours. Our was built for Silverlight 2 and now could be think of obsolete. You can read more about Silverlight navigation at this msdn article.
    Please let us know, if we can be of further help.

    All the best,
    Miro Miroslavov
    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
  3. Ketaki
    Ketaki avatar
    26 posts
    Member since:
    Apr 2009

    Posted 22 Dec 2010 Link to this post

    I am also facing same problem

    Here is my code

    public void NavigateToPage(string path, object tag ) 
                string typeName = ApplicationHelper.ApplicationRootNamespace + "." + path.Replace('/', '.'); 
                Type pageType = Type.GetType(ApplicationHelper.ApplicationType.AssemblyQualifiedName.Replace(ApplicationHelper.ApplicationType.FullName, typeName)); 
                //RadPage  page = Activator.CreateInstance(pageType) as RadPage; 
                // RadPages are now derived from IPage which internally is derived from RadPage 
                if (iPage != null) 
                IPage page = Activator.CreateInstance(pageType) as IPage; 
                iPage = page; 
                if (iPage != null) 
                page.Tag = tag; 
                NavigationService navigationService = NavigationService.GetNavigationService(); 
                navigationService.Transition = new FadeTransition(TimeSpan.FromMilliseconds(100.0)); 
                radFrameContentRegion.Navigate(page, navigationService.Transition); 

    How can I replace this code with built in navigation system.

    Can anybody help me?
  4. Miro Miroslavov
    Miro Miroslavov avatar
    588 posts

    Posted 27 Dec 2010 Link to this post

    Hi Kamal Mostofi,

     You can read this Blog post to get more information on how to migrate to the new Silverlight navigation framework.
    If you still have problems or issues migrating the code, please let us know.

    Miro Miroslavov
    the Telerik team
    Browse the videos here>> to help you get started with RadControls for Silverlight
Back to Top