c# - How to pass data from CustomMessageBox to the page which called it? -


i have page call 1 xaml layout page custommessagebox displays country list. displaying country list of longlistselector. after selecting country , want close custommessagebox , go selected country page called custommessagebox. how achieve this? here following code snippet :

firstpage :

  countryselectiondialog countryselecteddialog = new countryselectiondialog();   custommessagebox cmd = new custommessagebox()   {         content = countryselecteddialog,         opacity = 0.9   }; 

secondpage i.e countryselectiondialog page :

  private void on_country_selection(object sender, selectionchangedeventargs e)     {         if(e.addeditems.count>0)         {             country = e.addeditems[0] country;              // how go selected country original page?          }     } 

in selection change event of long list selector use code.

lls_selectionchange(....)  { string s= lls.selecteditem; messagebox.close(); navigationservice.navigate(new uri("/yourpage.xaml?country="+s),urikind.relativeorabsolute); } 

and country in page using query string.


Comments