For developers exploring WPF, the easiest approach is to find the event in the class library
reference of the help for the .NET Framework SDK (under the .NET Development ??° .NET Framework SDK ??°
.NET Framework 3.0 Development ??° Class Library node). You??™ll see Routed Event Information that indicates
the shared field for the event, the type of routing, and the event signature.
You can get the same information programmatically by examining the shared field for the event. For
example, the ButtonBase.ClickEvent.RoutingStrategy property provides an enumerated value that tells you
what type of routing the Click event uses.
WPF Events
Now that you??™ve learned how WPF events work, it??™s time to consider the rich variety of events
that you can respond to in your code. Although every element exposes a dizzying array of
events, the most important events usually fall into one of four categories:
??? Lifetime events. These events occur when the element is initialized, loaded, or
unloaded.
??? Mouse events. These events are the result of mouse actions.
??? Keyboard events. These events are the result of keyboard actions (such as key presses).
??? Stylus events. These events are the result of using the penlike stylus, which takes the
place of a mouse on a Table PC.
Taken together, mouse, keyboard, and stylus events are known as input events.
Pages:
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330