{"action":"created","issue":{"url":"https://api.github.com/repos/PrismLibrary/Prism/issues/74","labels_url":"https://api.github.com/repos/PrismLibrary/Prism/issues/74/labels{/name}","comments_url":"https://api.github.com/repos/PrismLibrary/Prism/issues/74/comments","events_url":"https://api.github.com/repos/PrismLibrary/Prism/issues/74/events","html_url":"https://github.com/PrismLibrary/Prism/issues/74","id":94383876,"number":74,"title":"[Win10 UAP]Change HardwareButtons.BackPressed to SystemNavigationManager.BackRequested","user":{"login":"runceel","id":79868,"avatar_url":"https://avatars.githubusercontent.com/u/79868?v=3","gravatar_id":"","url":"https://api.github.com/users/runceel","html_url":"https://github.com/runceel","followers_url":"https://api.github.com/users/runceel/followers","following_url":"https://api.github.com/users/runceel/following{/other_user}","gists_url":"https://api.github.com/users/runceel/gists{/gist_id}","starred_url":"https://api.github.com/users/runceel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/runceel/subscriptions","organizations_url":"https://api.github.com/users/runceel/orgs","repos_url":"https://api.github.com/users/runceel/repos","events_url":"https://api.github.com/users/runceel/events{/privacy}","received_events_url":"https://api.github.com/users/runceel/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-07-10T20:19:34Z","updated_at":"2015-07-11T13:47:40Z","closed_at":"2015-07-11T13:47:40Z","body":"Hi.\r\n\r\nI think better way. Change HardwareButtions.BackPressed to SystemNavigationManager.BackRequested at PrismApplication.\r\n\r\n```cs\r\n// Register hardware back button event if present\r\nif (ApiInformation.IsEventPresent(\"Windows.Phone.UI.Input.HardwareButtons\", \"BackPressed\"))\r\n{\r\n    HardwareButtons.BackPressed += HardwareButtonsOnBackPressed;\r\n}\r\n\r\n// event handler\r\nprivate void HardwareButtonsOnBackPressed(object sender, BackPressedEventArgs e)\r\n{\r\n    if (NavigationService.CanGoBack())\r\n    {\r\n        NavigationService.GoBack();\r\n        e.Handled = true;\r\n    }\r\n    else Exit();\r\n}\r\n```\r\n-------------------------------------------------------------\r\n```cs\r\nSystemNavigationManager.GetForCurrentView().BackRequested += App_BackRequested;\r\n\r\n// event handler\r\nprivate void App_BackRequested(object sender, BackRequestedEventArgs e)\r\n{\r\n    if (NavigationService.CanGoBack())\r\n    {\r\n        NavigationService.GoBack();\r\n        e.Handled = true;\r\n    }\r\n    else Exit();    \r\n}\r\n```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/PrismLibrary/Prism/issues/comments/120621019","html_url":"https://github.com/PrismLibrary/Prism/issues/74#issuecomment-120621019","issue_url":"https://api.github.com/repos/PrismLibrary/Prism/issues/74","id":120621019,"user":{"login":"briannoyes","id":4534445,"avatar_url":"https://avatars.githubusercontent.com/u/4534445?v=3","gravatar_id":"","url":"https://api.github.com/users/briannoyes","html_url":"https://github.com/briannoyes","followers_url":"https://api.github.com/users/briannoyes/followers","following_url":"https://api.github.com/users/briannoyes/following{/other_user}","gists_url":"https://api.github.com/users/briannoyes/gists{/gist_id}","starred_url":"https://api.github.com/users/briannoyes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/briannoyes/subscriptions","organizations_url":"https://api.github.com/users/briannoyes/orgs","repos_url":"https://api.github.com/users/briannoyes/repos","events_url":"https://api.github.com/users/briannoyes/events{/privacy}","received_events_url":"https://api.github.com/users/briannoyes/received_events","type":"User","site_admin":false},"created_at":"2015-07-11T13:47:40Z","updated_at":"2015-07-11T13:47:40Z","body":"See my comments on the pull request thread."}}