© Taurius Litvinavicius 2021
T. LitvinaviciusExploring Windows Presentation Foundationhttps://doi.org/10.1007/978-1-4842-6637-3_2

2. Events

Taurius Litvinavicius1  
(1)
Jonava, Lithuania
 

Everything in WPF is based on events, like the click and change events, and although most of them are associated with specific elements, there are some that are more generic. In this chapter, you will learn how to use window-wide, application-wide, and other kinds of generic events.

Application Events

The application events and anything that is general about the whole application will be found in App.xaml.cs file. You will see why the XAML part of it exists in Chapter 6 of this book.
public partial class App : Application
    {
        protected override void OnActivated(EventArgs ...

Get Exploring Windows Presentation Foundation: With Practical Applications in .NET 5 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.