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

ToolbarItems not shown if PushModalAsync is used to show the page

$
0
0

When PushAsync is used to show below page, toolbar items are shown. But they are not shown if PushModalAsync is used.

1) If anyone can brief me why this happens.
2) Also when should I choose PushModalAsync vs PushAsync as I am not able to find any visible difference between the two.

public partial class HomePage : ContentPage
    {   
        public HomePage ()
        {
            InitializeComponent ();

            this.ToolbarItems.Add(new ToolbarItem("Login", "", async () =>
                {
                    Navigation.PushModalAsync(new LoginPage(null));
                }));
            this.ToolbarItems.Add(new ToolbarItem("Create Account", "", async () =>
                {
                    Navigation.PushModalAsync(new CreateAccountPage(null));
                }));
        }
    }

Viewing all articles
Browse latest Browse all 58056

Trending Articles



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