Telerik UI for Windows Phone by Progress

The RadListPicker control derives from the HeaderedItemsControl, so it works as any other ItemsControl. In the case of the RadListPicker control the items should represent list of options. After defining such you have to set it to its ItemsSource property.

Here is an example of a RadListPicker control that allows the user to choose between countries.

CopyXAML
<telerikInput:RadListPicker x:Name="radListPicker" Header="Country:" VerticalAlignment="Top"></telerikInput:RadListPicker>
CopyC#
List<string> countries = new List<string>() { "United Kingdom", "Germany", "China",
"Japan", "Bulgaria" };
this.radListPicker.ItemsSource = countries;

If you want to modify the way the items get visualized you can use the ItemTemplate property and provide a DataTemplate for this purpose. Here is an example:

Note
When the RadListPicker is collapsed it displays the selected item of the list. It will appear as defined in the ItemTemplate.
Note
If you intend to use the RadListPicker in Popup mode, you should use the PopupItemTemplate property instead. Read more about the Popup mode here.
CopyXAML
      <telerikInput:RadListPicker x:Name="radListPicker" PopupHeader="Choose
a Country:" VerticalAlignment="Top">
      <telerikInput:RadListPicker.ItemTemplate>
      <DataTemplate>
      <Border BorderBrush="White" BorderThickness="2">
      <TextBlock Text="{Binding}" FontStyle="Italic" />
      </Border>
      </DataTemplate>
      </telerikInput:RadListPicker.ItemTemplate>
      </telerikInput:RadListPicker>

Here is a snapshot of the result.

List Picker-Features-Items-01

Note

It is important to note that the ItemTemplate and PopupItemTemplate properties can only be set if the DisplayMemberPath property is NOT set. This has the following consequences:

  • DisplayMemberPath can be used only when ItemTemplate and PopupItemTemplate are null if the list picker will be used both in inline mode and in popup mode.
  • If DisplayMemberPath is not set and the default visualization of items is not satisfactory, both ItemTemplate and PopupItemTemplate must be set.
  • If RadListPicker will only be used in inline mode, either ItemTemplate or DisplayMember path must be used but not both. Conversely, if the picker is to be used only in popup mode, PopupItemTemplate or DisplayMember path must be used.