BlackWaspTM

This web site uses cookies. By using the site you accept the cookie policy.This message is for compliance with the UK ICO law.

Windows Presentation Foundation
.NET 4.0+

WPF Base Classes - HeaderedItemsControl

The eighty-third part of the Windows Presentation Foundation Fundamentals tutorial looks at another base class of the menu controls. HeaderedItemsControl provides functionality for controls that hold multiple items and include a header.

HeaderedItemsControl

The HeaderedItemsControl class is inherited by a number of controls, including MenuItem and ToolBar; two of the menu controls that we've seen in recent articles in the WPF tutorial. HeaderedItemsControl is itself a subclass of ItemsControl, which is used by classes that include a number of child items. It adds extra features to controls that hold multiple items and include a header. The header is often plain text but can be another control.

The key property of HeaderedItemsControl is Header. We've already seen this used for menu items in the article describing the MenuItem control. In that case the Header property holds the text shown in the menu item, and the child items form submenus. You can also use the property to add a header to a tool bar.

As we've already seen the use of headers, we won't add any further examples in this article.

29 July 2014