Header and Footer

Like ComboBox, ListView has a Header property of type Object. It also has a Footer property of type Object. These could be set to simple strings, UIElements, or used in conjunction with HeaderTemplate and FooterTemplate properties.

This header and footer work differently than the way the header works with ComboBox. Rather than remaining in a stationary position, the header and footer scroll along with the content. Therefore, these properties provide a way to inject a special first and/or last element in the list that doesn’t participate in selection.

Get XAML 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.