adspace
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