Introducing WPF Controls Features

Before using WPF controls, you need to understand some behaviors. In Chapter 31, “Creating WPF Applications,” you learned that UI elements, including controls, are generally declared in XAML code. You also saw how to assign a name to controls to interact with them in Visual Basic code. XAML allows declaring and implementing controls even if you do not assign a name. For example, the following Button declaration is legal:

<Button Width="100" Height="50" Click="OnClick"/>

The control declared in this way works normally as you would expect, also raising click events that you can handle in managed code. This is possible because of the particular WPF architecture part that implements routed events discussed in ...

Get Visual Basic® 2010 Unleashed 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.