简体   繁体   中英

Automatic navigation of page in WPF using c#

I want to set my wpf application to navigate to another page after 3 second using c#.

Is this possible? If yes then how?

You could either use a Timer and set the Tick to 3000 which would a fire a method, changing the page. Or you could start a new Thread , put a thread.sleep(3000) then call the page change. If you do the second method, you need to use Dispatcher.Invoke as you are not on the main UI thread.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM