Silverlight helix代码隐藏页面导航

Silverlight helix代码隐藏页面导航,silverlight,navigation,Silverlight,Navigation,我是silverlight的新手,从我收集的信息来看,没有任何关于分页的直接功能,所以我从下载了helix项目。我发现它相当有用,但没有找到一种方法(使用helix)通过代码隐藏来导航页面。我之所以需要它,是因为如果一个方法成功执行,我想导航到另一个页面。在RootPage.xaml.cs的onload事件中,您可以看到以下代码: this.rootFrame.Navigate( new Uri( "Page1.xaml", UriKind.Relative ) ); 当RootPage通过调

我是silverlight的新手,从我收集的信息来看,没有任何关于分页的直接功能,所以我从下载了helix项目。我发现它相当有用,但没有找到一种方法(使用helix)通过代码隐藏来导航页面。我之所以需要它,是因为如果一个方法成功执行,我想导航到另一个页面。

在RootPage.xaml.cs的onload事件中,您可以看到以下代码:

this.rootFrame.Navigate( new Uri( "Page1.xaml", UriKind.Relative ) );
当RootPage通过调用RootPage.xaml中定义的框架控件实例的Navigate方法进行加载时,它会以编程方式导航到Page1.xaml(它实现NavigationPage):

<h:Frame x:Name="rootFrame" Grid.Row="0" Grid.Column="1"
         NavigationUIVisibility="Visible" Margin="4" />

请注意,targetName是“rootFrame”,它是最终执行导航的父框架对象。

这不是以问题的形式表达的。问题是“如何通过代码隐藏在helix中的页面之间导航?”。下面我甚至接受了一个答案。
private void TestButton_Click(object sender, RoutedEventArgs e)
{
    this.RaiseEvent(NavigationLink.RequestNavigateEvent,
        new RequestNavigateEventArgs(new Uri("Page3.xaml", UriKind.Relative),
        "rootFrame"));
}