Prev | Current Page 260 | Next

Matthew MacDonald

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

However, it??™s indispensable if you want to create a custom panel with specialized
scrolling behavior.
The GroupBox and TabItem:Headered Content Controls
One of the classes that derive from ContentControl is HeaderedContentControl. Its role is
simple??”it represents a container that has both single-element content (as stored in the
Content property) and a single-element header (as stored in the Header property).
There are three classes that derive from ContentControl: GroupBox, TabItem, and
Expander. The GroupBox is the simplest of the three. It??™s displayed as a box with rounded
corners and a title. Here??™s an example (shown in Figure 5-7):
Margin="5" VerticalAlignment="Top">

One
Two
Three



Figure 5-7. A basic group box
Notice that the GroupBox still requires a layout container (such as a StackPanel) to
arrange its contents. The GroupBox is often used to group small sets of related controls, such
CHAPTER 5 n CONTENT 129
as radio buttons. However, the GroupBox has no built-in functionality, so you can use it however
you want. (RadioButton objects are grouped by placing them into any panel.


Pages:
248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272