Hi Amir,
Per my understanding, close the app is the default behavior when clicking the Back HardwareButton. In this scenario, you should handle HardwareBUttons_BackPressed event in other page and let them navigate to previous page or particular page. Code may look like the following.
void HardwareButtons_BackPressed(object sender, BackPressedEventArgs e)
{
Frame rootFrame = Window.Current.Content as Frame;
if(rootFrame != null && rootFrame.CanGoBack)
{
//Previous page
//rootFrame.GoBack();
//e.Handled = true;
//Particular page
rootFrame.Navigate(typeof(Two));
//Interrupt the default behaior
e.Handled = true;
}
}
Regards,
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. Click HERE to participate the survey.
No comments:
Post a Comment