c# - Wait 5 seconds in Universal App -
i need make pause in windows 10 uwp app.
and thing want wait 5 seconds next acton. tried task. slepp pressed button frozen...
pause should here:
loading.isactive = true; //int period = 5000; //threadpooltimer periodictimer = //threadpooltimer.createperiodictimer(timespan.frommilliseconds(period)); loading.isactive = false;
how can make 5s pause?
you use task.delay()
method:
loading.isactive = true; await task.delay(5000); loading.isactive = false;
when using method ui doesn't freeze.
Comments
Post a Comment