How can you restrict/control the navigation routes the user can visit based on login status/role?
问题 For my Xamarin.Forms app, I am looking for a way to check if a user has the right role/authentication status to access a page. I know Angular has route guards that can be reused for different routes to check for an authentication status. Is there something similar in Xamarin.Forms? 回答1: Here is an example showing how you can control the visibility or navigation to your pages based on the login status of the user. By default Shell will always displays initially the first element defined in