0
有3个XAML页面,其中2称之为第三页有不同的参数。我怎样写的OnNavigatedTo()在第三页?参数XAML之间传递的Windows Phone
正在使用NavigationService.Navigate(new Uri("/third.xaml?paramter=xxxx", UriKind.Relative));
有3个XAML页面,其中2称之为第三页有不同的参数。我怎样写的OnNavigatedTo()在第三页?参数XAML之间传递的Windows Phone
正在使用NavigationService.Navigate(new Uri("/third.xaml?paramter=xxxx", UriKind.Relative));
借入和从http://msdn.microsoft.com/en-us/library/windowsphone/develop/ff626521(v=vs.105).aspx适于此代码。
protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
{
base.OnNavigatedTo(e);
string msg = "";
if (NavigationContext.QueryString.TryGetValue("parameter", out msg))
// now your parameter is in the msg variable, and you could do stuff here.
}
的可能重复[如何通过XAML页面之间的值(参数)?](http://stackoverflow.com/questions/12444816/how-to-pass-values-parameters-between-xaml-pages ) –
http://msdn.microsoft.com/en-us/library/windowsphone/develop/ff626521(v=vs.105).aspx –