Search This Blog

Tuesday, December 7, 2010

Combobox in window phone 7

<ComboBox x:Name="cbSorting"  ItemsSource="{Binding Path=SortModes}" SelectedItem="{Binding Path=Sort, Mode=TwoWay}"  
    IsEnabled="{Binding Path=CanSort}"
    HorizontalContentAlignment="Center"
    SelectionChanged="CbSortingSelectionChanged">
 <ComboBox.ItemTemplate>
  <DataTemplate>
   <TextBlock HorizontalAlignment="Center" Text="{Binding Path=Name}" />
  DataTemplate>
 ComboBox.ItemTemplate>
ComboBox>