top button
Flag Notify
Site Registration

App.xaml.cs: Null Exception was unhandled - IdleDetectionMode.Disabled in WindowsPhone?

+1 vote
72 views
App.xaml.cs: Null Exception was unhandled - IdleDetectionMode.Disabled in WindowsPhone?
posted Mar 16, 2015 by Saravanan

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+2 votes

Some times in App.xaml.cs file ,we may get an exception like "Null Exception was unhandled" at line
PhoneApplicationService.Current.UserIdleDetectionMode = IdleDetectionMode.Disabled;

So solutions are

Solution1:

Clearing the \bin and \obj folders and then recompile ,it will resolve your issue.

Solution2:

By adding PhoneApplicationService = new PhoneApplicationService() on the line above code.

answer Mar 18, 2015 by Jdk
...