My app doesn't close using the back button

vargai

New member
Sep 18, 2014
8
0
0
Visit site
Hi,
I have written my very first application to Windows Phone 8.1 in Visual Studio 2013. If I run the application on my phone or in emulator through Visual Studio, it does not close pressing the back button (when I hold the back button it shows up), only by pressing long and X it. Should I resolve it from code or is it only because I deploy it and it will disappear when I upload it to the store?

Sorry for my English :eek:rly:
 

anon8855939

New member
May 15, 2014
167
0
0
Visit site
I think you are writing your app via Visual Basic right?
does your code contains
Public NotInheritable Class MainPage

Public Sub New()
InitializeComponent()
AddHandler Application.Current.Suspending, AddressOf App_Suspending
End Sub

End Class
 
Last edited:

anon8855939

New member
May 15, 2014
167
0
0
Visit site
oops sorry
using System;
using Windows.ApplicationModel;
using Windows.ApplicationModel.Activation;
using Windows.UI.Xaml;

partial class MainPage
{
public MainPage()
{
InitializeComponent();
Application.Current.Suspending += new SuspendingEventHandler(App_Suspending);
}
}
this is the module for app suspending
 

anon8855939

New member
May 15, 2014
167
0
0
Visit site
you can also target windows phone 8 while building the app it's more better for you.
I still don't get it why do you want to eliminate it. It just suspends the app instead of closing it.
 
Last edited:

vargai

New member
Sep 18, 2014
8
0
0
Visit site
I've got this message: The name 'App_Suspending' does not exist in the current context. I used required namespaces.
I don't have any app which suspends instead of closing and I want my app to react like other popular ones. It is a ticket buying app, nobody uses more than two times a day.
 

anon8855939

New member
May 15, 2014
167
0
0
Visit site
I've got this message: The name 'App_Suspending' does not exist in the current context. I used required namespaces.
I don't have any app which suspends instead of closing and I want my app to react like other popular ones. It is a ticket buying app, nobody uses more than two times a day.

I think it's by default you have add app exit. I can't help anymore cause I don't know much about c# you should go to wpcentral developer forum and ask them
I still suggest you to don't worry as apps like Facebook,Wunderlist and 6cret uses the same feature i.e. They suspends instead of closing when back button is pressed.
 
Last edited:

Members online

No members online now.

Forum statistics

Threads
326,605
Messages
2,248,624
Members
428,522
Latest member
BarkerJarrod