Phisical Back Key doesn't terminate the app and doesn't go to main page

Hi experts
I'm working in a Windows Phone 8.1 Project and have created it from a WP blank page (XAML and C#). After that added a new blank page and I navigate from main page through a blank page using a button. Now I'm struggling to navigate between pages.
If I'm at main page and press the phisical back key button of my cellphone, my app doesn't terminate, instead it goes to background.
If I'm at blank page and press the phisical back key button of my cellphone, my app doesn't go back to main page, instead it goes to background.
I have tried several methods from internet (most of them using silverlight which is not my case) but I didn't understand how to create an event handler to deal with that.
Any help will be very valuable, trust me.
Thank you
Arcturus

You need to handle the HardwareButtons.BackPressed event
and plug into your app's navigation system. Commonly you'll find the Frame object, check if frame.CanGoBack, and if so call frame.GoBack. If you're at the app's front page (frame.CanGoBack is false) then don't handle the event and let it back out of the application.
private void HardwareButtons_BackPressed(object sender, BackPressedEventArgs e)
Frame frame = Window.Current.Content as Frame;
if (frame == null)
return;
if (frame.CanGoBack)
frame.GoBack();
e.Handled = true;
See Handling the Back button
in a Windows Phone app
The NavigationHelper.cs classes in the non-blank Windows Phone app templates will hook this up for you.

Similar Messages

  • Every time there's a power cut or I turn off my router, my Macbook doesn't detect the network and doesn't accept the password. Finally, after many, many attempts at solving with 'diagnostics', rebooting...the 'network changes' detected message shows.

    How can I get it to look for a network change - or find the change immediately - and speed up the process? Is there really a change? This has really frustrated me many, many times.
    I'm using 10.6.8 and see there's an update that supposedly helps airport problems but that people hatve problems with it. I'm having enough problems without those too!
    Thank you for any ideas.

    Take your battery out and reset your PMU.
    http://docs.info.apple.com/article.html?artnum=303319
    Next time you shut down, wait until the computer is totally shut down -- i.e., make sure you don't hear your fan running, the screen is black and that the light is out on the front of the computer -- before you close the lid.
    I had that exact thing happen once, and since I done the above, it's never happened since.
    -Bmer
    Mac Owners Support Group
    Join Us @ MacOSG.com
    ITMS: MacOSG Podcast
     An Apple User Group 

  • I recently updated my ipad and then  I connected with my computer forn sync, not realising that I had a new version of itunes with none of my apps. Now I have lost allof the apps and books etc, that I had prurchased. How do I get them back?

    I recently updated my ipad and then  I connected with my computer for sync, not realising that I had a new version of itunes with none of my apps. Now I have lost all of the apps and books etc, that I had prurchased. How do I get them back?

    As long as the apps and ibooks are still available in the store, and you use the same iTunes account as you originally used to buy them, then you should be able to re-download them for free : http://support.apple.com/kb/HT2519

  • TS2951 I have a laptop (2010) with Lion OS and tried to install Mavericks and part way through the installation it quit and reverted back to Lion and the app store doesn't let me download Mavericks again

    I have a laptop (2010) with Lion OS and tried to install Mavericks and part way through the installation it quit and reverted back to Lion and the app store doesn't let me download Mavericks again. How can I resolve this?

    Is your data backed up?
    Are you running any non-Apple system optimization tools?

  • TS1702 My iphone wont download any apps. It lets me enter password but then the app just flicks back to the price and doesn't download. Any idea why?

    My iphone wont download any apps. It lets me enter password but then the app just flicks back to the price and doesn't download. Any idea why?
    It was fine until i updated to iOS 5

    Have you tried:
    1. Resetting your iPad; hold down the Sleep and Home button for about 10 seconds until you see the Apple logo.
    2. Turn OFF your router for 30 seconds and ON again.

  • HT203433 How do I retrieve an app that I bought.  The icon is in my library.  But the program isn't in my device. When I look in the file that contain the app and try to open it,  It doesn't open.

    How do I retrieve an app that I bought.  The icon is in my library.  But the program isn't in my device. When I look in the file that contains the app and try to open it, it doesn't open.

    Howdy Hestersfree,
    This can be done through the App Store on the device that you'd like the app installed on.
    Apps on iOS
    Open the App Store on your device.
    Make sure you are signed in with the same Apple ID used for the original purchase.
    Tap Updates from the bottom navigation bar. 
    Tap Purchased on the resulting screen.
    Locate the app in your Purchased tab.
    Tap the download button.
    The app will begin downloading and you'll be taken back to your home screen. 
    Downloading past purchases from the App Store, iBookstore, and iTunes Store
    http://support.apple.com/kb/HT2519
    Cheers,
    Allen

  • I downloaded creative cloud and I payed for it but it don't work. He doesn't download the apps nothing works.

    I downloaded creative cloud and I payed for it but it don't work. He doesn't download the apps nothing works.

    Please read, and reply back here with information https://forums.adobe.com/thread/1499014
    -try some steps such as changing browsers and turning off your firewall
    -also flush your browser cache so you are starting with a fresh browser
    http://myleniumerrors.com/installation-and-licensing-problems/creative-cloud-error-codes-w ip/
    http://helpx.adobe.com/creative-cloud/kb/failed-install-creative-cloud-desktop.html
    or
    A chat session where an agent may remotely look inside your computer may help
    Creative Cloud chat support (all Creative Cloud customer service issues)
    http://helpx.adobe.com/x-productkb/global/service-ccm.html

  • Ive just plugged my phone into my computer and it has synced automatically with i tunes,i tunes has removed virtually all the apps and now wont let me sync them back? it comes up saying ibooks could not be uploaded to your device?

    i have just plugged my i phone 4s into my computer and it automatically synced with i tunes, i tunes for some reason removed all the apps and backed up my phone automatically. ive gone to put my apps back on and its showing me an automatic flash up message saying, i tunes could not upload ibooks onto your device,it must be authorised. Im signed in and im also authorised, ive de authorised and authorised my account now twice.ive deleted the app i books as i read it could be out of date now and still it wont let me sync my apps. its letting me sync some apps that i bought on my new phone and not my 3, i also had an old e mail address registered with these apps and this account but hotmail deleted it for some random security reason. i have also bought an i pad recently and that works fine with my i tunes.can anybody help me as i have an i phone 4s now with nothing on!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! this new i tunes is crap!!!!!!!!!!!!! never had problems before,all i did was change my e mail address last time and everything was fine with the old version!!

    Downloading past purchases from the App Store, iBookstore, and iTunes Store

  • TS1702 any app I download from the app store doesn't open. after I finished downloading the app I tap it to open but it crashes as soon as i finish downloading it. yes, the downloading process works but any app I download won't launch. pls help

    any app I download from the app store doesn't open. after I finished downloading the app I tap it to open but it crashes as soon as i finish downloading it. yes, the downloading process works but any app I download won't launch. pls help

    Hi,
    Install the v10.6.6 combo update available here. It's ok to do this even though you are already running v10.6.6. The combo includes fixes that were not included in the original update.
    http://support.apple.com/kb/DL1349
    Restart your Mac and try the MAS again.
    You can download apps directly from the MAS once you have it running.
    Considering the TM backup took so long, make sure there's enough space on your Mac startup disk.
    Right or control click the MacintoshHD icon. Click Get Info. In the Get Info window you will see Capacity and Available. *Make sure you always have a minimum of 15% free disk space.*
    Carolyn

  • Double clicking on a file launches the app but doesn't open the file anymore. Why?

    Double clicking on a file launches the app but doesn't open the file anymore. Why?

    I would post in the Illustrator forum here http://forums.adobe.com/community/illustrator or the Dreamweaver forum here http://forums.adobe.com/community/dreamweaver. One of these product forums will be able to help.

  • My Lightroom stopped working at all. I unistalled the app and installled back a few times and it still won't open.

    My Lightroom stopped working at all. I unistalled the app and installled back a few times and it still won't open.

    Are there any error messages? Mac or PC?

  • My ipod touch is disabled and won't turn off, itunes doesn't recognize the device and i can't see the serial number on the back

    My NOSY (now ex) husband did something to my ipod touch and it is now disabled. It was dead and I charged it and NOW the sucker won't turn off. When I connect to itunes i see a message that says i have to UNLOCK it with a passcode. I tried to get apple support but they want my serial number. Well...the ipod wont turn on!!! I've had it at least 6 years and have moved and I can't find my paperwork and WHO can read that serial number on the back? I know its kind of outdated (third generation, I believe)but its mine, I love it and it has ALL my music on it.

    Disabled
    Place the iOS device in Recovery Mode and then connect to your computer and restore via iTunes. The iPod will be erased.
    iOS: Wrong passcode results in red disabled screen                         
    If recovery mode does not work try DFU mode.                        
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings        
    For how to restore:
    iTunes: Restoring iOS software
    To restore from backup see:
    iOS: Back up and restore your iOS device with iCloud or iTunes       
    If you restore from iCloud backup the apps will be automatically downloaded. If you restore from iTunes backup the apps and music have to be in the iTunes library since synced media like apps and music are not included in the backup of the iOS device that iTunes makes.
    You can redownload most iTunes purchases by:
    Downloading past purchases from the App Store, iBookstore, and iTunes Store        
    If problem what happens or does not happen and when in the instructions? When you successfully get the iPod in recovery mode and connect to computer iTunes should say it found an iPod in recovery mode.

  • I recently Updated my phone and my front camera stopped working its pitch black but still shows the icons on the screen but when i get off the app and get back on and flip the camera to my face view it works fine

    I recently Updated my phone and my front camera stopped working its pitch black but still shows the icons on the screen but when i get off the app and get back on and flip the camera to my face view it works fine

    Hi there Fgonzalez2015,
    You may find the camera troubleshooting steps in the article below helpful.
    Get help with the camera on your iPhone, iPad, or iPod touch
    You see a closed lens or black screen
    If you see a closed lens or black screen when you open the Camera app, try these steps:
    Make sure that there’s nothing blocking the camera lens. If you’re using a case, try removing it.
    Force the app to close, then open the Camera app again.
    Restart your device, then open the Camera app again.
    If your device has a front and rear camera, try both cameras by tapping the camera swap icon . If you see the closed lens or black screen on only one camera, take your device to an Apple Retail Store or Authorized Service Provider for more help.
    -Griff W.  

  • TS3274 My App Store shows 3 updates but when I go to it the screen is blank. It will not give me the option to update all or one at a time, it doesn't show the apps at all.

    My App Store shows 3 updates but when I go to it the screen is blank. It will not give me the option to update all or one at a time, it doesn't show the apps at all.

    Many people are having this problem for the last couple of days. This is a problem that Apple has to fix. If you look around the forum, you will see many, many discusssions about this and they have been going on for a few days.
    According to Fly150 in another discussion, this is a workaround - for the time being.
    If you want to update the Apps while waiting for Apple to fix Updates:
    1. Go to App Store
    2. Select Purchased
    3. Select All
    4. Scroll down to find the Apps showing update
    5. Select update on the Apps
    This should update the Apps and get rid of the update count in App Store.

  • When you delete an app from your homescreen it is still in the cloud, does that mean you still have the app, and how do you get it back on to the home screen

    When you delete an app from your homescreen it is still in the cloud, does that mean you still have the app, and how do you get it back on to the home screen. new to ipad so do not know much. Anybody know.p

    As long as the app remains in the store then you can re-download it via the Purchased tab in the App Store app, or via the Purchased Link under Quick Links on the right-hand side of the iTunes store home page on your computer's iTunes : re-downloading.
    Similarly ibooks can be re-downloaded, and depending upon what country that you are in then music, films and tv shows may also be re-downloadable (if they remain available in the store).

Maybe you are looking for

  • Imac does start up chime but then black screen

    thats about what my imac do: http://www.youtube.com/watch?v=TR9V6AeKLko Not a vid from me but its what it does. Was his diagnostic of motherboard failing right? Also I reseted pram and smu with no changes at all. I cant connect another monitor since

  • 10g form compilation error

    Hi all, I created a form in Oracle form builder 10g.. I uploaded the fmb to server. Say file name is XX_TEST.fmb These are the steps i followed for compilation. 1). emrenv betsyd9 2)cd /betsyd9ap/betsyd9appl/au/11.5.0/resource 3)export FORMS60_PATH=/

  • I am trying to download latest update but just get referred to a page that says "Sorry, this page is not available".

    I am a fully paid up member Adobe cloud and logged in. Other pages of the Adobe website are all accessible except the Lightroom download page. I have tried a few times over the last few days taking different routes to the download page including dire

  • Image/BufferedImage - PNG - Stream - Database?

    I'm capturing an Image via clipboard paste action on a JTextArea, this part works fine. 1. I need to convert this image to a PNG format to... 2. store the PNG encoded image into a database using a PreparedStatement, that requires an InputStream. The

  • Recommended webcam?

    Hello guys. I'm not much of a webcam fan but now I need to get one for a project of mine. Problem is, when I asked around the shops which webcam is compatible with Linux, they either never heard of Linux or blindly replied no. Reminded of my Canon iP