Tutorial by Examples

A Frame is created like any other controls: <Frame x:Name="contentRoot" Navigated="OnNavigated" Navigating="OnNavigating" /> The navigated/navigating events can then be intercepted to cancel the navigation or show/hide the back button. private...
To navigate to a newest page, we can use the Navigate() method from the frame. contentRoot.Navigate(typeof(MyPage), parameter); where contentRoot is the Frame instance and MyPage a control inheriting from Page In MyPage, the OnNavigatedTo() method will be called once the navigation will complet...
private bool navigateFlag = false; protected async override void OnNavigatingFrom(NavigatingCancelEventArgs e) { base.OnNavigatingFrom(e); if (!navigateFlag) { e.Cancel = true; var dialog = new MessageDialog("Navigate away?", Confir,); ...

Page 1 of 1