Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

[Q] who to moderate back key press in WP8.1

OP ngame

17th April 2014, 09:00 AM   |  #1  
OP Senior Member
Flag Mashad
Thanks Meter: 93
 
368 posts
Join Date:Joined: Mar 2012
More
Hi every one
In WP8 we could use
Protected Override Void OnbackKeyPress(....e)
{
}
Now I didn't find such thing in windows Phone 8.1 ! Can anyone help me with this ?
and my other Q is : where is the messagebox.show ? and also Isolated Storage ?!
Now I think get an absolutely Noooob again
18th April 2014, 12:29 AM   |  #2  
Junior Member
Thanks Meter: 1
 
1 posts
Join Date:Joined: Apr 2014
Quote:
Originally Posted by ngame

Hi every one
In WP8 we could use
Protected Override Void OnbackKeyPress(....e)
{
}
Now I didn't find such thing in windows Phone 8.1 ! Can anyone help me with this ?
and my other Q is : where is the messagebox.show ? and also Isolated Storage ?!
Now I think get an absolutely Noooob again

Hi,

instead of overriding OnbackKeyPress you have to register the event
...
Windows.Phone.UI.Input.HardwareButtons.BackPressed += HardwareButtons_BackPressed;
...

void HardwareButtons_BackPressed(object sender, Windows.Phone.UI.Input.BackPressedEventArgs e)
{
// your code
e.Handled = true; // if you wanna prevent that the "standard"-eventhandler is called and your app getting closed
}

Best,
The Following User Says Thank You to ElStoney For This Useful Post: [ View ]
18th April 2014, 06:56 AM   |  #3  
OP Senior Member
Flag Mashad
Thanks Meter: 93
 
368 posts
Join Date:Joined: Mar 2012
More
Quote:
Originally Posted by ElStoney

Hi,

instead of overriding OnbackKeyPress you have to register the event
...
Windows.Phone.UI.Input.HardwareButtons.BackPressed += HardwareButtons_BackPressed;
...

void HardwareButtons_BackPressed(object sender, Windows.Phone.UI.Input.BackPressedEventArgs e)
{
// your code
e.Handled = true; // if you wanna prevent that the "standard"-eventhandler is called and your app getting closed
}

Best,

Thanks.
And what about isolated storage?
I can't use them any more and power tools ran out
18th April 2014, 05:03 PM   |  #4  
Junior Member
Thanks Meter: 2
 
7 posts
Join Date:Joined: Feb 2012
Look for StorageFile and StorageFolder:
http://msdn.microsoft.com/de-de/libr...s.storage.aspx

And here is a Storage Helper class from Jerry Nixon that is useful: http://codepaste.net/gtu5mq
The Following User Says Thank You to deHoDev For This Useful Post: [ View ]
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes