Skip to Content
Programming Windows®, Six Edition
book

Programming Windows®, Six Edition

by Charles Petzold
January 2013
Intermediate to advanced content levelIntermediate to advanced
1136 pages
34h 9m
English
Microsoft Press
Content preview from Programming Windows®, Six Edition

Chapter 3. Basic Event Handling

The previous chapters have demonstrated how you can instantiate and initialize elements and other objects in either XAML or code. The most common procedure is to use XAML to define the initial layout and appearance of elements on a page but then to change properties of these elements from code as the program is running.

As you’ve seen, assigning a Name or x:Name to an element in XAML causes a field to be defined in the page class that gives the code-behind file easy access to that element. This is one of the two major ways that code and XAML interact. The second is through events. An event is a general-purpose mechanism that allows one object to communicate something of interest to other objects. The event is said ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Programming Windows®, Fifth Edition

Programming Windows®, Fifth Edition

Charles Petzold
Programming C# 10

Programming C# 10

Ian Griffiths

Publisher Resources

ISBN: 9780735671751Purchase book