How to prevent automatic screen lock in WP7

February 11, 2013 by Anuraj

.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

Copyright © 2024 Anuraj. 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. Powered by Jekyll. Hosted with ❤ by GitHub