Prev | Current Page 261 | Next

Matthew MacDonald

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

A GroupBox
is not required, unless you want the rounded, titled border.)
The TabItem represents a page in a TabControl. The only significant member that the
TabItem class adds is the IsSelected property, which indicates whether the tab is currently
being shown in the TabControl. Here??™s the markup that??™s required to create the simple example
that??™s shown in Figure 5-8:



Setting One
Setting Two
Setting Three



...


nTip You can use the TabStripPlacement property to make the tabs appear on the side of the tab control,
rather than their normal location at the top.
Figure 5-8. A set of tabs
As with the Content property, the Header property can accept any type of object. It displays
UIElement-derived classes by rendering them and uses the ToString() method for inline
CHAPTER 5 n CONTENT 130
text and all other objects. That means you can create a group box or a tab with graphical content
or arbitrary elements in its title. Here??™s an example:




Image and Text Tab Title
249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273