navigation - How to put something extra while navigate another page in windows phone -
i created listpage , when click in general button in main page have navigate page listpage , put while navigating in order understand page going list, otherwise have create lots of listpages every category
private void btn_general_click(object sender, routedeventargs e) { navigationservice.navigate(new uri("/listpage.xaml", urikind.relative)); }
you can use page uri put contextual data:
navigationservice.navigate(new uri("/listpage.xaml?list=list1", urikind.relative));
in listpage
, can retrieve data looking navigationcontext.querystring
property:
protected override void onnavigatedto(navigationeventargs e) { if (navigationcontext.querystring.containskey("list")) { string list = navigationcontext.querystring["list"]; // whatever } }
Comments
Post a Comment