Reputation: 129
Is there any way to show page A for 5 seconds and navigate to page B ? I am building a POS application. It has to show approved transaction screen for few seconds and navigate to print receipt screen automatically after 5 seconds. Thanks in advance.
Upvotes: 2
Views: 2604
Reputation: 2645
Just put a delay in your code prior to calling the routine to open the new page:
await Task.Delay(5000);
or if if you want the screen to lock up whilst the delay is happening, just use the sleep command:
Thread.Sleep(5000);
Upvotes: 0
Reputation: 89102
use a timer:
Device.StartTimer(TimeSpan.FromMilliseconds(5000), () =>
{
Navigation.PushAsync(new PageB());
return false;
});
Upvotes: 4