adspace


is there a way to detect if application is idle?

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain how to edit location for weather?

968


Explain how to save screen from an xna app?

1040


Explain how to play video in isolatedstorage using mediaelement?

939