is there a way to detect if application is idle?



is there a way to detect if application is idle?..

Answer / Dheeraj Kumar Jatav

Yes, you can detect if an application is in the background (idle) by handling the Suspending event on the Application class. This event is raised when your application is about to be suspended due to low memory conditions or user interaction with another app:

```csharp
public App()
{
this.Suspending += OnSuspending;
}

private void OnSuspending(object sender, SuspendingEventArgs e)
{
// Handle application suspension heren"
}
```
This event is only available in Silverlight applications. In XAML applications, you can use the DispatcherUnhandledException event to handle exceptions that occur while your app is idle.n

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Windows Phone OS Interview Questions

Tell me Will TextTrimming property be available on TextBlock?

1 Answers  


Tell me is wcf supported in windows phone?

1 Answers  


How to dismiss the SIP programmatically?

1 Answers  


What content can I share/save?

1 Answers  


Will texttrimming property be available on textblock?

1 Answers  


Explain about windows phone web browser?

1 Answers  


Tell me is there any internal page notification that it receives to detect a phone call?

1 Answers  


Tell me can I write multi-player games using wi-fi or blue tooth in the device.?

1 Answers  


How to save Silverlight UIElements into an image?

1 Answers  


Where is httputility class, since there is no system.windows.browser namespace?

1 Answers  


Suppose I am hitting System.InvalidOperationException in the Navigate method of the WebBrowserControl. What gives?

1 Answers  


Is wcf supported in windows phone?

1 Answers  


Categories