I have a problem. I have an popup that i want to close if the back key is pressed, now its closing the application. This it what i have done:
protected override void OnBackKeyPress(CancelEventArgs e)
{
if (dayselect.IsOpen == true)
{
dayselect.IsOpen = false;
dayselectbackground.Visibility = Visibility.Collapsed;
}
base.OnBackKeyPress(e);
}
Now the application is closing as normal, what have i missed.
As mentioned by SwiftSharp in the comments. =)
Actually is quite simple, you are just missing
e.Cancel = true