I want to add an application bar to multiple pages of my app. So, I\'m defining the application bar as an application resource so that it can be used by multiple pages. Now, the
I found this approach a better one. The RootFrame object is already in the App.xaml.cs file, you just need to call it. Also putting this in a UI thread dispatcher is safer.
Deployment.Current.Dispatcher.BeginInvoke(() =>
{
// change UI here
RootFrame.Navigate(new Uri("/MainPage.xaml", UriKind.Relative));
});