I’m currently developing a Windows Phone 7.5 app with a panorama page.
At the panorama page, I’m implementing an appbar to deal with several things in the app, such as displaying phone location in a Bing Map which is located in one of the panorama page items.
Now, I believe I have two options, but I don’t know how they would work (if they even do work…):
- Show only appbar icons relevant to current page/item
- If you’re not at the respective page/item, redirect to the page/item when clicking the appbar icon.
Would any of these actually work? Could I set an ID for each of the panorama items, and then make either 1 or 2 to work?
Thanks 🙂
Both are possible to accomplish.
For showing only the appbar icons relevent to the page you can use the Panorama.SelectionChanged Event:
If you know which panorama item is selected you can set the appbar icon accordingly.
Changing the selected item of a Panorama can be accomplished like this:
Though changing the selected index of a Panorama is possible, I would advise using a Pivot control. With a Pivot control it is easier to keep track of the selected item and you get a nice animation when you programatically switch the selected page.