O'Reilly logo

Illustrated WPF by Daniel Solis

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 9. Routing Events and Commands

What Is an Event?

Windows programming is event driven, which means that while a program is running, it can be interrupted at any time by user actions or system actions such as button clicks, key presses, or system timers. When this happens, the program needs to handle the event and then continue on its course. If you want your program to perform some set of tasks when a particular event occurs, you must write a method, called an event handler, to be called when the event occurs.

The mechanism the system uses for this process is called an event. An event is a .NET object that contains a list of references to the methods, the event handlers, associated with it. The system takes care of sensing when an event occurs. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required