4

I have a WPF app, my purpose is that the app can be automatically navigated to Home page when there is not any user interaction (no touch, no click, etc) within 30 seconds. I have no idea to implement it. Can someone give me some suggestion?  Great thanks.

user1205398
  • 641
  • 2
  • 8
  • 14

1 Answers1

4

hook up the PreviewMouseMove on your MainWindow to reset a Timer. This timer is set to tick within 30 seconds. If that timer ticks, navigate to that home page.

(this is assuming you don't have additional Windows, with that you'd need to hook them up to the same PreviewMouseMove)

Markus Hütter
  • 7,796
  • 1
  • 36
  • 63