This is a migrated thread and some comments may be shown as answers.
Navigation page doesn't work for me
3 Answers 85 Views
This is a migrated thread and some comments may be shown as answers.
Kamal Mostofi
Top achievements
Rank 1
Kamal Mostofi asked on 28 Oct 2010, 11:23 PM

Hi,
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="http://schemas.telerik.com/2008/xaml/presentation"  
              xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation" 
  xmlns:uriMapper="clr-namespace:System.Windows.Navigation;assembly=System.Windows.Controls.Navigation"
  xmlns:dataControls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data.DataForm.Toolkit" 
    mc:Ignorable="d" d:DesignWidth="900" d:DesignHeight="500"
              xmlns:transitions="clr-namespace:Telerik.Windows.Controls.TransitionEffects;assembly=Telerik.Windows.Controls"
    xmlns:navigatio="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
             xmlns:telerikNavigation="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation"
    >
    <Grid x:Name="LayoutRoot" Background="#FF4B5358">
        <Grid.ColumnDefinitions>
            <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*" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="146"></RowDefinition>
            <RowDefinition Height="10*"></RowDefinition>
            <RowDefinition Height="10*"></RowDefinition>
            <RowDefinition Height="10*"></RowDefinition>
            <RowDefinition Height="10*"></RowDefinition>
            <RowDefinition Height="10*"></RowDefinition>
        </Grid.RowDefinitions>
  
                <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>
                    <telerik:RadRibbonGroup Header="Contact us" Icon="/Telerik.Windows.Controls.RibbonBar;component/RibbonGroupCollapsedIcon.png">
                        <telerik:RadRibbonButton Content="Email" />
                    </telerik:RadRibbonGroup>
                    <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:RadRibbonGroup>
                </telerik:RadRibbonTab>
                <telerik:RadRibbonTab Header="فارسی">
                    <telerik:RadRibbonGroup Header="News" Icon="/Telerik.Windows.Controls.RibbonBar;component/RibbonGroupCollapsedIcon.png" />
                </telerik:RadRibbonTab>
            </telerik:RadRibbonBar>
                <!--<StackPanel Margin="0" VerticalAlignment="Stretch" Orientation="Horizontal">
                <telerik:RadButton x:Name="btnpersian" Content="فارسی" Click="btnpersian_Click" Width="100" >
                </telerik:RadButton>
                <telerik:RadButton x:Name="btnenglish" Content="English" Width="100" />
                  
            </StackPanel>-->
            </Border>
        <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:RadFrameContainer>
  
              
    </Grid>
</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()
        {
            InitializeComponent();
        }
   
        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,
Kamal

3 Answers, 1 is accepted

Sort by
0
Accepted
Miro Miroslavov
Telerik team
answered on 03 Nov 2010, 02:24 PM
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
0
Ketaki
Top achievements
Rank 1
answered on 22 Dec 2010, 08:26 AM
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.UnloadPage(); 
            
            IPage page = Activator.CreateInstance(pageType) as IPage; 
            iPage = page; 
            if (iPage != null) 
            
                iPage.LoadPage(); 
            
    
            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?
0
Miro Miroslavov
Telerik team
answered on 27 Dec 2010, 09:33 AM
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.

Greetings,
Miro Miroslavov
the Telerik team
Browse the videos here>> to help you get started with RadControls for Silverlight
Asked by
Kamal Mostofi
Top achievements
Rank 1
Answers by
Miro Miroslavov
Telerik team
Ketaki
Top achievements
Rank 1
Share this question
or