I just want to Know, how can I navigate between different panorama items in wp7 through c# code.
Thank you.
I just want to Know, how can I navigate between different panorama items in wp7 through c# code.
Thank you.
Try this
Panorama.SetValue(Panorama.SelectedItemProperty, selectedItem);
This might solve the issue.
Just set the default item to which item u want to load for the user's view..
panSOS.DefaultItem = panSOS.Items[1];
I haven't tried this out, but it should work.
Loop through Panorama.Items
and remove every item except for the one you want to focus on. Use a for
loop instead of foreach
to do this since you can't modify the collection while iterating using the latter.
Call Panorama.UpdateLayout
to force the panorama to redraw itself and switch to item you want to display.
Add the items you removed in step 1.
If you're panorama control is called PanoramaControl1 then you should be able to use:
PanoramaControl1.SelectedIndex = 0
Where 0 is the first panorama page.