c# - Win Phone 8 : Navigating Only One Time -


i'm on windows phone 8 project. doing xaml in visual studio.

i have 4 pivot items in project.

i want navigate home page (my first pivot item) with

menu on bottom of phone;

<shell:applicationbariconbutton iconuri="images/appbar_home.png" text="home" click="applicationbariconbutton_click_2"/> 

and on click event wrote this;

private void applicationbariconbutton_click_2(object sender, eventargs e)         {             navigationservice.navigate(new uri("/mainpage.xaml?pivotmain.selectedindex = 0", urikind.relative));         } 

when run program, works nice, when go other pivot items, , click home button, goes, if walk around again , click button, doesnt work. why ?

i need solve this.

thanks answers.

you having problem because doing wrong.

navigationservice.navigate meant navigate between xaml files, not reload them. phone doesn't reload same page on , over.

what want instead set current selected index first page.

reference:http://msdn.microsoft.com/en-us/library/windowsphone/develop/microsoft.phone.controls.pivot(v=vs.105).aspx

it this

        private void applicationbariconbutton_click_2(object sender, eventargs e)         {             pivotcontrolname.selectedindex = 0;         } 

Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -