February 2010
Beginner
400 pages
11h 13m
English
The main layout controls in Silverlight are the following:
Canvas
StackPanel
Grid
Canvas is the simplest of all the layout controls. You can think of it as a rectangle or <div> tag in which you put content. Content added to a canvas is normally then positioned absolutely by setting the Canvas.Left and Canvas.Top properties. Canvas is unique from the other layout controls in that it is the only layout control that allows you to modify the Z index (or which elements on top of which).
A StackPanel allows you to set items positioned within them to flow horizontally or vertically by setting a property called Orientation to either Vertical or Horizontal (see Figure 14-7).