跳过一个页面转向

已知: Page1  Page2  Page3

question:  Page1——>Page2   then   Page2——(跳过Page1)——>Page3  How???

answer: 

Class Page1:PhoneApplicationPage

{

  private void NavigateMethod()

  {

    NavigationService.Navigate(new Uri("/Page2.xaml",Urikind.Relactive));

  }

}

 

Class Page2:PhoneApplicationPage

{

  private void NavigateMethod()

  {

    NavigationService.Navigated+=Navigation.NavigatedEventHandler(NavigationService_Navigated);

    NavigationService.GoBack();

  }

 void NavigationService_Navigated(object sender, System.Windows.Navigation.NavigationEventArgs e) 

     {

   NavigationService.Navigate(new Uri("/Page3.xaml",Urikind.Relactive));

  }

}

 

Class Page1:PhoneApplicationPage

{

  private void NavigateMethod()

  {

    NavigationService.GoBack();

  }

}

 

posted on 2011-12-29 14:28  Games  阅读(221)  评论(0编辑  收藏  举报