I have a Windows Phone app with panorama control.
Panorama currently has two pages.
One page should have a visible application bar with buttons, and another one should not.
I use the panorama's SelectionChanged event to chage the IsVisible property of the ApplicationBar.
private void Panorama_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e)
{
ApplicationBar.IsVisible = Panorama.SelectedIndex == 0;
}
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.
What is the best way to avoid this problem?
Should I call the ApplicationBar.IsVisible = Panorama.SelectedIndex == 0;
in a separate thread? Or should I use the item's ManipulationStarted and ManipulationCompleted events to hide the app bar?
Thanks.