FORUMS
Post Reply Subscribe to Thread Email Thread

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

17th April 2014, 08:00 AM |#1  
OP Senior Member
Flag Mashad
Thanks Meter: 130
 
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
 
 
17th April 2014, 11:29 PM |#2  
Junior Member
Thanks Meter: 1
 
More
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, 05:56 AM |#3  
OP Senior Member
Flag Mashad
Thanks Meter: 130
 
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, 04:03 PM |#4  
Junior Member
Thanks Meter: 4
 
More
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


Top Threads in Windows Phone 8 Q&A, Help & Troubleshooting by ThreadRank