Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

David Ballesteros reddvid

🎯
Focusing
Block or report user

Report or block reddvid

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View mouse-snip (Methods).cs
private void OnNavigated(object sender, NavigationEventArgs e)
{
// Each time a navigation event occurs, update the Back button's visibility
SystemNavigationManager.GetForCurrentView ().AppViewBackButtonVisibility =
((Frame)sender).CanGoBack ?
AppViewBackButtonVisibility.Visible :
AppViewBackButtonVisibility.Collapsed;
}
private void RootFrame_PointerPressed(object sender, PointerRoutedEventArgs e)
View mouse-snips.cs
rootFrame.PointerPressed += RootFrame_PointerPressed;
SystemNavigationManager.GetForCurrentView().BackRequested += OnBackRequested;
// Optional code to show back button on title bar
SystemNavigationManager.GetForCurrentView().AppViewBackButtonVisibility =
rootFrame.CanGoBack ?
AppViewBackButtonVisibility.Visible :
AppViewBackButtonVisibility.Collapsed;
View App.xaml.cs
...
if (rootFrame == null)
{
// Create a Frame to act as the navigation context and navigate to the first page
rootFrame = new Frame();
rootFrame.NavigationFailed += OnNavigationFailed;
rootFrame.Navigated += OnNavigated;
You can’t perform that action at this time.