The accordion control is a flexible container that consists
of a series of collapsible panels, made up of the AccordionItem control. The
underlying source of the control is ItemsControl, meaning that the control can
contain multiple objects to make up the user interface, by supplying values to
the Items collection. In addition, the ItemsControl can be bound to using the
ItemsSource property, which uses the underlying object to dynamically create
the Accordion item object, supplying the underlying object to the header and
content.
A lot of the plumbing comes from the ItemsControl base
class; however, each derived class that inherits ItemsControl implements it in
a different way. For instance, the HeaderedItemsControl class uses the items
bound to it to create a repeatable list of content. The Accordion, however,
uses each object bound to it to create an AccordionItem class that has its own
header/content.