Is this supported?
I've tried without any luck.. the editor is populated with data as it should (using ObservableCollection<dynamic> as ItemsSource), but the correct DataTemplate for the relevant data type is not shown, just the default included in the control:
<UserControl.Resources> <DataTemplate DataType="ctl:ProductType1"> <StackPanel Orientation="Horizontal"> <TextBlock Text="{Binding Path=PartNumber}"/> <TextBlock Text=" - "/> <TextBlock Text="{Binding Path=RevisionName}"/> </StackPanel> </DataTemplate> <DataTemplate DataType="ctl:ProductType2"> <StackPanel Orientation="Vertical"> <TextBlock Text="{Binding Path=PartNumber}" FontWeight="Bold"/> <TextBlock Text="{Binding Path=Name}"/> </StackPanel> </DataTemplate> </UserControl.Resources>
<ig:XamComboEditor TabIndex="1" x:Name="EditorNewPartNumber" Grid.Column="1" Grid.Row="4" Margin="0 5 0 0" FontFamily="Segoe UI" FontSize="13" ItemsSource="{Binding Source={StaticResource ViewModelLocator}, Path=ViewModel.Products}" DisplayMemberPath="PartNumber" SelectedItem="{Binding Source={StaticResource ViewModelLocator}, Path=ViewModel.ProductItem, Mode=TwoWay}" CustomValueEnteredAction="{Binding Source={StaticResource ViewModelLocator}, Path=ViewModel.ProductEnteredAction}" AutoComplete="{Binding Source={StaticResource ViewModelLocator}, Path=ViewModel.IsProductEnabled}" Visibility="{Binding Source={StaticResource ViewModelLocator}, Path=ViewModel.IsProductRequired, Converter={StaticResource BoolToVisibilityConverter}}" KeyUp="EditorNewPartNumber_KeyUp"> </ig:XamComboEditor>
Hello,
I am just checking the progress of this issue and was wondering if you managed to achieve your goal or if you need any further assistance on the matter.