How can I cancel current page to navigate back when back button pressed in Windows 10 UWP?
In windows Phone 8 or 8.1 Silverlight I can write this code and handle it
private void PageBackKeyPress(object sender, CancelEventArgs e)
{
if (MGMethods.DisplayMessageWithButton(MessageText))
{
//Can Navigate Back
}
else
{
//Stop to Navigate back
e.Cancel = true;
}
}
But , in windows 10 How can I do this same logic.
I have tried it but it doesn't work.