Because the Loupe Agent buffers data and performs operations in the background for best application performance it has to be notified when the application wants to exit so it can enter a shutdown mode. The best way to do this in WPF is to:
Application Exit Event Handler |
Copy Code
|
---|---|
using Gibraltar.Agent; private void Application_Exit(object sender, ExitEventArgs e) { //This call ensures that the Agent will prepare to exit and close out any open windows. Log.EndSession("Ending WPF Sample Normally"); } |