1
我有MainPage.xaml
和PanoramaPage1.xaml
。如何从另一页导航到指定的全景项目
如何从MainPage
导航到Item1
或Item2
在PanoramaPage
?
例如: Button1->Item1
和Button2->Item2
我有MainPage.xaml
和PanoramaPage1.xaml
。如何从另一页导航到指定的全景项目
如何从MainPage
导航到Item1
或Item2
在PanoramaPage
?
例如: Button1->Item1
和Button2->Item2
您可以使用标准的navitaion:
this.NavigationService.Navigate(new Uri("PanoramaPage1.xaml?buttonid=button1",UriKind.Relative));
通过你的目标对象varible然后在panomarama页面处理:
protected override void OnNavigatedTo(NavigationEventArgs e)
{
if (this.NavigationContext.QueryString.ContainsKey("buttonid")
{
string buttonid = this.NavigationContext.QueryString[ "buttonid" ];
}
}
错误:方法'导航'没有超载需要2个参数 – Quak
请给我一些工作代码,我不明白是:( – Quak
好吧,所以我现在有我的参数,我可以使用'if(parameter.Equals(“1”)NAVIGATE_TO_ITEM1;其他NAVIGATE_TO_ITEM2;'但我如何导航到全景物品? – Quak