How to prevent automatic screen lock in WP7

Posted by Anuraj on Monday, February 11, 2013

.Net Silverlight Windows Phone

If you are developing some travel applications or fitness applications, you may want to disable automatic screen locking feature of Windows Phone. You can disable this using UserIdleDetectionMode property of PhoneApplicationService.Current class.

Microsoft.Phone.Shell.PhoneApplicationService.Current.UserIdleDetectionMode
    = Microsoft.Phone.Shell.IdleDetectionMode.Disabled;

You can find more details about Idle Detection for Windows Phone and best practices here



Did you like this article? Share it with your friends

Facebook Twitter Google+ LinkedIn Reddit StumbleUpon



Subscribe


Copyright © 2017 - Anuraj P. Blog content licensed under the Creative Commons CC BY 2.5 | Unless otherwise stated or granted, code samples licensed under the MIT license. This is a personal blog. The opinions expressed here represent my own and not those of my employer. Hosted with ❤ by GitHub