Prev | Current Page 191 | Next

Matthew MacDonald

"Pro WPF with VB 2008: Windows Presentation Foundation with .NET 3.5"

These include panels that are dedicated to holding the child
items of a particular control??”such as TabPanel (the tabs in a TabControl), ToolbarPanel (the
buttons in a Toolbar), and ToolbarOverflowPanel (the commands in a Toolbar??™s overflow
menu). There??™s also a VirtualizingStackPanel, which databound list controls use to minimize
their overhead, and an InkCanvas, which is similar to the Canvas but has support for handling
stylus input on the TabletPC. (For example, depending on the mode you choose, the
InkCanvas supports drawing with the pointer to select onscreen elements. And although it??™s
a little counterintuitive, you can use the InkCanvas with an ordinary computer and a mouse.)
Simple Layout with the StackPanel
The StackPanel is one of the simplest layout containers. It simply stacks its children in a single
row or column.
For example, consider this window, which contains a stack of three buttons:
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Layout" Height="223" Width="354"
>








Figure 4-2 shows the window that results.


Pages:
179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203