Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,778,758 Members 37,847 Now Online
XDA Developers Android and Mobile Development Forum

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

Tip us?
 
ngame
Old
#1  
Senior Member - OP
Thanks Meter 88
Posts: 342
Join Date: Mar 2012
Location: Mashad
Default [Q] who to moderate back key press in WP8.1

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
Nokia Lumia 920
GDR3 Developer Preview
Developer Unlock : ✔
Interop Unlock : Soon...
 
ElStoney
Old
#2  
Junior Member
Thanks Meter 1
Posts: 1
Join Date: Apr 2014
Quote:
Originally Posted by ngame View Post
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: [ Click to Expand ]
 
ngame
Old
#3  
Senior Member - OP
Thanks Meter 88
Posts: 342
Join Date: Mar 2012
Location: Mashad
Quote:
Originally Posted by ElStoney View Post
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
Nokia Lumia 920
GDR3 Developer Preview
Developer Unlock : ✔
Interop Unlock : Soon...
 
deHoDev
Old
#4  
Junior Member
Thanks Meter 2
Posts: 7
Join Date: 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: [ Click to Expand ]
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes