O'Reilly logo

Visual Basic 2010 Unleashed by Alessandro Del Sole

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

Declaring and Using Controls with the Designer and XAML

To add controls to the user interface, you have two possibilities: dragging controls from the Toolbox onto the designer surface and manually writing XAML. For a better understanding, we first show how to drag from the Toolbox. With the Toolbox open, click the Button control and drag it onto the designer. When you release it, the IDE should look like Figure 31.5.

Figure 31.5 Dragging controls and generating XAML.

image

As you can see from Figure 31.5, Visual Studio also generates the XAML code for the controls you add to the UI. For the new button, this is the XAML code generated:

Confirming that ...

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