Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

How to reset NavigationStack and Close the application.

$
0
0

Hello,
I want to close my application on OnBackButtonPressed() below is my code.
foreach (var page in Navigation.NavigationStack.ToList())
{
if (page.GetType() != typeof(BestRx.MainPage))
Navigation.RemovePage(page);
}
Application.Current.Quit();
return false;
Above code is working fine but only on double tap.Is there any other way to do on single tap?


Viewing all articles
Browse latest Browse all 77050

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>