title: Pivot-Page SelectionChanged doesn't react
body: <p>I wrote a selectionChanged event handler into my MainPage.cs, but it does not react when I change the pivot page:</p>
  
  <pre><code> private void MainPage_SelectionChanged(object sender, SelectionChangedEventArgs e)
  {
      Debug.WriteLine("Pivot selection changed");
      switch (((Pivot)sender).SelectedIndex)
      {
          case 0:
              Debug.WriteLine("LoginAppBar launched");
              ApplicationBar = ((ApplicationBar)Application.Current.Resources["LoginAppBar"]);
              break;
  
          case 1:
              Debug.WriteLine("DefaultAppBar launched");
              ApplicationBar = ((ApplicationBar)Application.Current.Resources["AppBar"]);
              break;
  
          case 2:
              Debug.WriteLine("DefaultAppBar launched");
              ApplicationBar = ((ApplicationBar)Application.Current.Resources["AppBar"]);
              break;
      }
  }
  </code></pre>
  
  <p>Why does this event handler not work? Is it the name of the method? I tried to change the method-header to private void <code>myNameSpaceHere_SelectionChanged(object sender, SelectionChangedEventArgs e)</code></p>
  
  <p>but it still doesn't catch the event.</p>
  
  <p>Any tips?</p>