【发布时间】:2013-08-02 06:46:51
【问题描述】:
有3个xaml页面,其中2个调用带有不同参数的第三个页面。第三页怎么写onNavigatedTo()?
我正在使用NavigationService.Navigate(new Uri("/third.xaml?paramter=xxxx", UriKind.Relative));
【问题讨论】:
标签: c# windows-phone-7
有3个xaml页面,其中2个调用带有不同参数的第三个页面。第三页怎么写onNavigatedTo()?
我正在使用NavigationService.Navigate(new Uri("/third.xaml?paramter=xxxx", UriKind.Relative));
【问题讨论】:
标签: c# windows-phone-7
从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.
}
【讨论】: