标签:
1,Making the Back button appear requires just one line of code:
SystemNavigationManager.GetForCurrentView().AppViewBackButtonVisibility = AppViewBackButtonVisibility.Visible;
2,Responding to clicks of the Back button is a simple matter of wiring up a handler for SystemNavigationManager.BackRequested events:
SystemNavigationManager.GetForCurrentView().BackRequested += (s, e) => { // TODO: Go back to the previous page };
3,手机端back的事件处理:
if (Windows.Foundation.Metadata.ApiInformation.IsTypePresent("Windows.Phone.UI.Input.HardwareButtons")) { BackButton.Visibility = Visibility.Collapsed; Windows.Phone.UI.Input.HardwareButtons.BackPressed += OnHardwareBackButtonPressed; }
附: http://www.wintellect.com/devcenter/jprosise/handling-the-back-button-in-windows-10-uwp-apps
标签:
原文地址:http://www.cnblogs.com/wlqsmiling/p/5035971.html