Chapter 7. The Application

While it's running, every WPF application is represented by an instance of the System.Windows.Application class. This class tracks all the open windows in your application, decides when your application shuts down, and fires application events that you can handle to perform initialization and cleanup.

In this chapter, you'll explore the Application class in detail. You'll learn how you can use it to perform tasks like catching unhandled errors, showing a splash screen, and retrieving command-line parameters. You'll even consider an ambitious example that uses instance handling and registered file types, allowing the application to manage an unlimited number of documents under one roof.

Once you understand the infrastructure ...

Get Pro WPF in C# 2010: Windows Presentation Foundation in .NET 4 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.