问题
I have a Silverlight 3 application, and in a method, I want to determine when the last time that the application received user input was. Is there an easy way to detect this?
回答1:
I doubt there is framework support for such a value, but you should be able to roll your own easily enough by monitoring key, mouse and other input events and setting a timestamp value accordingly. You could even persist this in isolated storage to carry the value across sessions (provided the user has not disabled isolated storage of course).
来源:https://stackoverflow.com/questions/2580566/how-to-determine-the-last-time-a-user-input-was-received-in-silverlight-3