WindowsStore页面导航
第一个页面:
前台
<Grid Background="{StaticResource ApplicationPageBackgroundThemeBrush}">
<Button Content="第一页面" Margin="69,60,0,0" Click="Button_Click_1"/>
< Grid>
后台
private void Button_Click_1(object Sender,RoutedEventArgs e)
{
Frame.Navigate(typeof(另一页面));
}
另一个页面:
前台
<Grid Background="{StaticResource ApplicationPageBackgroundThemeBrush}">
<TextBlock Text="我是另一页" Margin="69,60,0,0"/>
<Button Content="返回第一页面" Margin="69,60,0,0" Click="Button_Click_1"/>
< Grid>
后台
private void Button_Click_1(object Sender,RoutedEventArgs e)
{
Frame.GoBack();
}
Protected override void OnNavigatedTo(NavigationEventArgs e)
{
MessageDialog mes=new MessageDialog(e.Parameter.ToString());
mes.ShowAsync();
}