Welcome to WindowsClient.net | Sign in | Join
These are task-based samples that are an excellent way to learn about various features of Windows Presentation Foundation. Each sample is a short walk through, some providing online demonstrations of the final result.
Control Author: jaytayl
Posted: 08-04-2007
Views: 2,284
Downloads: 3,298
This sample demonstrates how to handle both the Activated and Deactivated events to monitor the activation status of an application.
Building the Sample
Running the Sample
Remarks
The sample simulates the mail server polling functionality of a mail client. When mail is received, the application notifies the user using one of two mechanisms that depend on application's activation status; if the application is currently activated, the UI is updated, otherwise an icon is displayed in the system tray.
Note: This sample uses the NotifyIcon component from Windows Forms to display a system tray icon. Consequently, this sample also demonstrates integration of Windows Forms technology into Windows Presentation Foundation (WPF).