The Layout Containers

A Silverlight window can hold only a single element. To fit in more than one element and create a more practical user interface, you need to place a container in your page and then add other elements to that container. Your layout is determined by the container that you use.

All the Silverlight layout containers are panels that derive from the MustInherit System.Windows.Controls.Panel class (see Figure 3-1).

images

Figure 3-1. The hierarchy of the Panel class

The Panel class adds two public properties: Background and Children. Background is the brush that's used to paint the panel background. Children is the collection of items ...

Get Pro Silverlight 5 in VB now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.