I have a Windows Phone 8.1 application.
On a page when the user hits the hardware back button I want to Navigate back but also want to send a parameter to the previous page. But GoBack function doesn't take any parameter. How do I pass a parameter back so that the previous page?
This is how I have handled Hardware back button currently
In my View Constructor
HardwareButtons.BackPressed += HardwareButtons_BackPressed;
The event handler
void HardwareButtons_BackPressed(object sender, BackPressedEventArgs e)
{
Frame rootFrame = Window.Current.Content as Frame;
if (rootFrame != null && rootFrame.CanGoBack)
{
rootFrame.GoBack();
e.Handled = true;
}
}
I would be very glad if someone can point me in the right direction. Thanks in Advance.