Skip to content

Instantly share code, notes, and snippets.

@eternaltung
Created September 1, 2013 16:17
Show Gist options
  • Save eternaltung/6405455 to your computer and use it in GitHub Desktop.
Save eternaltung/6405455 to your computer and use it in GitHub Desktop.
using System.Windows.Controls;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Shell;
namespace AppBar
{
public partial class PivotPage1 : PhoneApplicationPage
{
public PivotPage1()
{
InitializeComponent();
Testpivot.SelectionChanged += Testpivot_SelectionChanged;
}
void Testpivot_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
switch ((sender as Pivot).SelectedIndex)
{
case 0:
ApplicationBar = ((ApplicationBar)this.Resources["Appbar1"]);
break;
case 1:
ApplicationBar = ((ApplicationBar)this.Resources["Appbar2"]);
break;
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment