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

ContentPage.ToolbarItems disappear after change page by slash

$
0
0

ContentPage.ToolbarItems disappear after change page by slash

Hi
This is MainPage with ToolBar:

<ContentPage.ToolbarItems>


</ContentPage.ToolbarItems>

MainViewModel:
Logout = new BitDelegateCommand(async () =>
{
await securityService.Logout();
await navigationService.NavigateAsync("/Login");
});

LoginViewModel:
await securityService.LoginWithCredentials(UserName, Password, "Owner", "secret");
await navigationService.NavigateAsync("/Main");

When I click LogOut and Login again ToolbarItems disappear in MainPage.
When I remove / (slash) before "/Login" or "/Main" , problem resolves.
But I don't want user can back to before page after login or after logout.
What should I do?


Viewing all articles
Browse latest Browse all 91519

Trending Articles



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