LoopingListBox

The LoopingListBox control displays a selected item which the user can expand to a list of choices. The user can scroll through the list of choices by dragging or flicking it with a finger, and the list loops around so that if the user scrolls past the end then they are taken back to the beginning rather than stopping abruptly. The scrolling respects the speed of the user’s gesture, and decelerates over time, enabling the LoopingListBox to provide a convenient user interface over even moderately large sets of choices.

The set of items in the list is specified via the DataSource property. You can use a built-in data source or implement your own. Data sources are provided for days of the month (DayOfMonthDataSource), months of the year (MonthOfYearDataSource), years (YearlyDataSource), numeric ranges (NumericDataSource) and lists of arbitrary objects (ObjectDataSource).

You can customise how items are displayed in the LoopingListBox using the usual Silverlight data templating system and the ItemTemplate property.

The current selection is specified by the SelectedItem property.

By default, the LoopingListBox shows the list when it is selected by the user, and collapses again when it loses focus or when the user taps the item which is already selected. You can programmatically expand and collapse the list using the IsExpanded property.

CopyUsing a LoopingListBox
<ms:LoopingListBox SelectedItem="{Binding Rating, Mode=TwoWay}">
  <ms:LoopingListBox.DataSource>
    <ms:NumericDataSource MinValue="1" MaxValue="10" />
  </ms:LoopingListBox.DataSource>
<ms:LoopingListBox>