private void ForwardRequested(ref bool handled) { // Get a hold of the current MyFrame so that we can inspect the app back stack. if (AppMyFrame == null) { return; } // Check to see if this is the top-most page on the app back stack. if (AppMyFrame.CanGoForward && !handled) { // If not, set the event to handled and go back to the previous page in the app. handled = true; AppMyFrame.GoForward(); } }
/// <summary> /// Navigate to the Page for the selected <paramref name="listViewItem" />. /// </summary> /// <param name="sender"></param> /// <param name="listViewItem"></param> private void NavMenuList_ItemInvoked(object sender, ListViewItem listViewItem) { var item = (NavMenuItem)((NavMenuListView)sender).ItemFromContainer(listViewItem); if (item?.DestPage != null && item.DestPage != AppMyFrame.CurrentSourcePageType) { AppMyFrame.Navigate(item.DestPage, item.Arguments); } //reset the bottom or top section depending on which section the user clicked if (sender.Equals(NavMenuListTop)) { NavMenuListBottom.SetSelectedItem(null); } else { NavMenuListTop.SetSelectedItem(null); } }