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).


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 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.