O'Reilly logo

Microsoft® Visual Basic® 2010 Developer’s Handbook by Klaus Löffelmann and Sarika Calla Purohit

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

XAML Syntax Overview

This section contains a brief overview of XAML syntax. The XAML code will also be compared to regular Visual Basic code. Many of you probably have prior experience with XML; nevertheless, for those who don’t, we’ll explain the XAML syntax with the help of a few examples.

An XAML hierarchy always starts with the root element, a Window or Page element. The required XML namespaces are defined there.

Next, it declares the user interface hierarchy. All elements that can be used in XAML exist as normal classes in the .NET Framework 4.0. As a programmer, you know that a class can contain properties, methods, and events, among other elements. Let’s see how this works in XAML:

<Button Name="btnClear" Width="80" Height="25" Click="OnClear">Delete</Button> ...

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