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

Auto Navigate between pages (after timer callback)

$
0
0

Hi:

My goal is to display a splash-screen that will navigate to my app's main menu after a couple of seconds.

This seems like it should be relatively straight-forward. I have the following...

        Device.StartTimer(TimeSpan.FromSeconds(2), () =>
        {
            getSplashScreenPage().Navigation.PushModalAsync(new NavigationPage(App.GetMainPage()));
            return true;
        }); 

I have tested the timer using DisplayAlert(). The Navigation.PushModalAsync() doesn't seem to be navigating anywhere, however. This is the method I generally use to react to a button click event.


Viewing all articles
Browse latest Browse all 58056

Trending Articles