在 Windows Phone 7 Silverlight 应用程序中,我使用以下方法调用一个新页面:
NavigationService.Navigate(new Uri("/View/SecondPage.xaml", UriKind.Relative));
现在我想要向新页面传递参数。我知道可以使用以下方式传递一个简单的参数:
NavigationService.Navigate(new Uri("/View/TilgungsratePage.xaml?id=4711", UriKind.Relative));
使用以下方法在新页面中阅读:
protected override void OnNavigatedTo(Microsoft.Phone.Navigation.PhoneNavigationEventArgs e)
{
base.OnNavigatedTo(e);
String id = NavigationContext.QueryString["id"];
}
对于简单的参数,这样做是可以的,但是如何传递一个列表?
复杂对象?
除了简单值之外的任何东西?