There are two interesting properties regarding the lock screen within the Windows Phone 7 (WP7) SDK.
UserIdleDetectionMode Disabling this will stop the screen from timing out and locking. As an example, you might want to disable UserIdleDetectionMode while downloading a large file or smething like this. After the “long running action” is completed, do not forget to re-enable UserIdleDetectionMode so the screen can timeout as usual.
PhoneApplicationService.Current.UserIdleDetectionMode
ApplicationIdleDetectionMode
If you disable ApplicationIdleDetectionMode, your app will continue to run when the screen locks. This is a “one shot” action, there is no way to set it back until the app is started again.
Please note that this will consume more energy.
PhoneApplicationService.Current.ApplicationIdleDetectionMode
PS: The certification process will require to give the user an option where those properties can be configure, if the user does not want one of those.