none
How is the back button handled on Windows 10 IoT Core? RRS feed

  • Question

  • Hi,

    I am porting a 8.1 App Store app to Windows 10 UWP. I am removing my custom back buttons and replacing with the platform provided back button.

    On the desktop, the back button is part of the window frame, on the phone it is a hardware key.

    How is the back-button handled on IoT, eg running IoT Core on a Raspberry Pi 2 gives no cue for a back button.

    Regards,

    Roger

    Saturday, August 22, 2015 6:32 AM

Answers

  • On Windows Phone the UWP back button support already caters for both software and hardware back buttons so no special case required.

         SystemNavigationManager.GetForCurrentView().BackRequested += OnBackRequested;

         SystemNavigationManager.GetForCurrentView().AppViewBackButtonVisibility = rootFrame.CanGoBack ?AppViewBackButtonVisibility.Visible : AppViewBackButtonVisibility.Collapsed;

    My solution now is to put the back button on a CommandBar only if device family is "Windows.IoT".

    Thursday, September 3, 2015 11:09 AM

All replies

  • AFAIK, No back-button is supported in IoT Core. you can find UWP samples in the below link

    https://github.com/Microsoft/Windows-universal-samples

    There are checking the availability of hardware buttons and handled the code according to that. A snippet for a sample UWP is shown below

    if (ApiInformation.IsTypePresent("Windows.Phone.UI.Input.HardwareButtons"))

    {

    HardwareButtons.CameraPressed += HardwareButtons_CameraPressed;

    }


    Please mark as answer, if it is correct.
    Please vote,if it is helpful post.
    Vinoth.R

    http://vinoth-vinothblog.blogspot.com
    http://www.e-consystems.com/windowsce.asp

    Tuesday, August 25, 2015 11:54 AM
  • On Windows Phone the UWP back button support already caters for both software and hardware back buttons so no special case required.

         SystemNavigationManager.GetForCurrentView().BackRequested += OnBackRequested;

         SystemNavigationManager.GetForCurrentView().AppViewBackButtonVisibility = rootFrame.CanGoBack ?AppViewBackButtonVisibility.Visible : AppViewBackButtonVisibility.Collapsed;

    My solution now is to put the back button on a CommandBar only if device family is "Windows.IoT".

    Thursday, September 3, 2015 11:09 AM