Question

In my app, i'm using panorama view. But the problem is that i need different buttons for each item, i've decided to use application bar icon button to make it look good! Can i have different icon button for different panorama items in same page??

Was it helpful?

Solution

You can manage panorama SelectionChanged event by adding/removing items to app bar.

Example:-

<controls:Panorama SelectionChanged="PanoramaItemSelectionChanged">    
            <!--Panorama item one-->
            <controls:PanoramaItem Header="what's new" >
                ...
            </controls:PanoramaItem>

             ...
</controls:Panorama>

.CS file

void PanoramaItemSelectionChanged(object sender, SelectionChangedEventArgs e)
{
  int currentIndex = ((PanoramaItem)(((Panorama)sender).SelectedIndex))
  switch(currentIndex){
      ....
  }
}

How to add and remove App bar items and Icon buttons http://msdn.microsoft.com/en-us/library/windowsphone/develop/hh394044%28v=vs.105%29.aspx

https://stackoverflow.com/a/4234875/486119

Or else try with this http://appbarutils.codeplex.com/releases/view/94678

http://allenlooplee.wordpress.com/2012/09/17/how-to-show-different-app-bar-for-different-pivotpano-item/

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top