this.cboPhoneTypes.ItemsSource = this.PhoneTypes.GetAllEntities();This will work if I have the XAML as follows:
<ComboBox Grid.Row="1" x:Name="cboPhoneTypes" DisplayMemberPath="PhoneType" SelectedValuePath="PhoneTypeID" SelectedItem="{Binding Path=PhoneTypeID}" /> <ListView Grid.Row="2" x:Name="lstChurchPhones" ItemTemplate="{DynamicResource PhoneTemplate}" > </ListView>The ComboBox is not wired up to the actual data record but it will at least display the PhoneType options, although I've noticed if I have the ItemsSource specified in XAML it doesn't work, only if I've got it specified in the code behind.
<DataTemplate x:Key="PhoneTemplate"> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition/> <ColumnDefinition/> </Grid.ColumnDefinitions> <Grid.RowDefinitions> <RowDefinition /> <RowDefinition /> </Grid.RowDefinitions> <scs:scsDataEntryTextBox x:Name="txtPhoneNumber" Text="{Binding Path=PhoneNumber, Mode=TwoWay, UpdateSourceTrigger=Explicit}"/> <ComboBox Grid.Column="1" x:Name="cboPhoneTypes" ItemsSource="{Binding Source=ListPhoneTypes}" DisplayMemberPath="PhoneType" SelectedValuePath="PhoneTypeID" SelectedItem="{Binding Path=PhoneTypeID}" /> </Grid> </DataTemplate>Obviously I'm missing something in my ItemsSource binding but I can't seem to figure it out. Any help would be greatly appreciated!