TabControl

The TabControl enables splitting an area into tabs. Each tab is represented by a TabItem object, and tabs are enclosed within a TabControl.TabItems collection. The following code demonstrates how you can implement a TabControl with both standard and customized tabs:

image

You set the tab header content assigning the Header property for each TabItem and then nest controls within the element. Notice how you can customize tabs by setting Foreground and Background and declaring the Header in a hierarchical fashion to place multiple elements. Figure 32.20 shows the TabControl implementation.

Figure 32.20 Implementing a TabControl.

You can also ...

Get Visual Basic® 2010 Unleashed 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.