Disable screen from autolocking on Windows Phone 7

前端 未结 2 399
不知归路
不知归路 2020-12-24 06:09

I need to prevent the screen from automatically locking itself if the user dont interact with the device for a while.

Is it possible to request some kind of lock to

2条回答
  •  孤独总比滥情好
    2020-12-24 06:48

    I did not found example code in MSDN, so I decided to put it up here because I was also looking for an answer to this problem:

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

提交回复
热议问题