19 November, 2010

WP7: How to disable the lockscreen

If you want to prevent the lockscreen from appearing, set this in App.xaml.cs:

public partial class App : Application

// Easy access to the root frame
public PhoneApplicationFrame RootFrame { get; private set; }

// Constructor
public App()
// Global handler for uncaught exceptions.
// Note that exceptions thrown by ApplicationBarItem.Click will not get caught here.
UnhandledException += Application_UnhandledException;

// Standard Silverlight initialization

// Phone-specific initialization

PhoneApplicationService.Current.UserIdleDetectionMode = IdleDetectionMode.Disabled;

It’s actually not that difficult – it goes like this

  1. Select the app.xaml file
  2. RightClick the file/or press F7
  3. Enter this line in the contructor:

Technorati Tags:


Jason Williams said...

A step by step guide would be great.

Jason Williams said...

A step by step guide would be great.

InRiver: Not loading your extensions?

(You really need to in the loop to appreciate the issue this post addresses). Man, I've been fighting this problem for hours before I ...