How do I determine inactivity in a MVVM application?
Posted
by
Jordan
on Stack Overflow
See other posts from Stack Overflow
or by Jordan
Published on 2011-02-01T16:46:29Z
Indexed on
2011/02/02
15:25 UTC
Read the original article
Hit count: 208
I have an MVVM kiosk application that I need to restart when it has been inactive for a set amount of time. I'm using Prism and Unity to facilitate the MVVM pattern. I've got the restarting down and I even know how to handle the timer. What I want to know is how to know when activity, that is any mouse event, has taken occurred. The only way I know how to do that is by subscribing to the preview mouse events of the main window. That breaks MVVM thought, doesn't it?
I've thought about exposing my window as an interface that exposes those events to my application, but that would require that the window implement that interface which also seems to break MVVM.
© Stack Overflow or respective owner