title: WP7 Panorama control sliding lagging when hiding Application Bar
body: <p>I have a Windows Phone app with panorama control.</p>
  
  <p>Panorama currently has two pages. </p>
  
  <p>One page should have a visible application bar with buttons, and another one should not.</p>
  
  <p>I use the panorama's SelectionChanged event to chage the IsVisible property of the ApplicationBar.</p>
  
  <pre><code>private void Panorama_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e)
          {
              ApplicationBar.IsVisible = Panorama.SelectedIndex == 0;
          }
  </code></pre>
  
  <p>The functionality I get is as desired, but with such behaviour, I get a terrible lagging (a momentary freeze of sliding animation) of my panorama. This probably happens due to the fact that the UI thread has to operate the very windows phone "native" application bar.</p>
  
  <p>What is the best way to avoid this problem? </p>
  
  <p>Should I call the <code>ApplicationBar.IsVisible = Panorama.SelectedIndex == 0;</code> in a separate thread? Or should I use the item's ManipulationStarted and ManipulationCompleted events to hide the app bar? </p>
  
  <p>Thanks.</p>