WP 7 页面跳转

页面跳转

WP7中页面的跳转不再是Show这种方式,而是页面Navigation跳转,类似于网页:this.NavigationService.Navigate(new Uri("/Page1.xaml",UriKind.Relative));

this.NavigationService.GoBack();

this.NavigationService.GoForward();


跳转的时候还可以填值:

this.NavigationService.Navigate(new Uri("/Page1.xaml?name=tome",UriKind.Relative));
页面中获取值:this.NavigationContext.QueryString["name"];

 

可以override OnNavigatedFrom、OnNavigatedTo、OnNavigatingFrom几个方法进行导航的响应

posted @ 2012-07-20 10:59  书奎  阅读(282)  评论(0编辑  收藏  举报