簡體   English   中英

如何從另一個頁面導航到指定的全景項目

[英]How to navigate to specified panorama item from another page

我有MainPage.xamlPanoramaPage1.xaml

如何從MainPage導航到PanoramaPage Item1Item2

例如: Button1->Item1Button2->Item2

您可以使用標准的navitaion:

this.NavigationService.Navigate(new Uri("PanoramaPage1.xaml?buttonid=button1",UriKind.Relative));

在對象變量中傳遞您的目標,然后在panomarama頁面中處理:

protected override void OnNavigatedTo(NavigationEventArgs e)
{
  if ( this.NavigationContext.QueryString.ContainsKey( "buttonid" ) 
  {
      string buttonid = this.NavigationContext.QueryString[ "buttonid" ];
  }
}

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM