Enabling Selection in ItemsRepeater Control

Problem

While the ItemsRepeater control provides a flexible system for creating custom layouts, it lacks built-in support for common selection policies. For example, the ListView control has built-in support for single and multiple selection modes, but the ItemsRepeater control does not.

Solution

The ItemsRepeater extensions library provides attached properties that enable common selection policies on the ItemsRepeater control. This allows you to easily implement single, multiple, and single-or-none selection modes on the ItemsRepeater control.

<muxc:ItemsRepeater ItemsSource="{Binding Times}"
                    utu:ItemsRepeaterExtensions.SelectedItem="{Binding Filter.Time, Mode=TwoWay}"
                    utu:ItemsRepeaterExtensions.SelectionMode="SingleOrNone">

ItemsRepeaterExtensions Single Selection ExampleItemsRepeaterExtensions Single Selection Example

Source Code

Documentation