I have some basic app on windows phone 8.1, and in that i have regular buttons, for navigate or exit application. I want to disable HardwareButton for back/exit, so if anyone press it, application will not exit. Any help?
Btw, i tried:
Public void HardwareButtons_BackPressed(object sender, Windows.Phone.UI.Input.BackPressedEventArgs e)
{
e.Handled = false;
}
You have to rewrite the HardwareButtons_BackPressed method on App.xaml.cs
file.
Also if you have handled the Event, you have to set e.Handled = true
to tell the system you have already handled the event and dont push the event below in the queue.
For more and examples see MSDN.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With