The issue is when I open the drop down it uses the Template that I defined. When I select and item I don't know how to create the template to then show what was selected the way I want to show it. So for example. When I open the drop down it shows 3 different "columns", say Name, Phone, Address. When I select an item and the drop down closes (I'm not sure what mode this is considered). How do I show one selected item. For example the Name. Hope this makes sense.. Thanks..
The issue you are having is that you don't see the ItemsTemplate you specified being used when its closed (while still in edit mode or not) or that you want to have a different template for what is displayed in the edit area?
Hi All.. I have the following code that allows me to put a tamplate for the drop down items. How do I then write a template for when the combobox is then closed. I would expect it to be like ItemsTemplateSelector or something but I couldn't get it to work
<igEditors:XamComboEditor ItemsSource="{Binding Users}" ValuePath="Name" Value="{Binding User}" Margin="34,129,0,112" Name="xamComboEditor2" HorizontalAlignment="Left" Width="200">
<igEditors:XamComboEditor.ComboBoxStyle>
<Style TargetType="ComboBox">
<Setter Property="ItemTemplate">
<Setter.Value>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding Name}" Width="100" />
<TextBlock Text="{Binding Phone}" Width="100" />
</StackPanel>
</DataTemplate>
</Setter.Value>
</Setter>
</Style>
</igEditors:XamComboEditor.ComboBoxStyle>
</igEditors:XamComboEditor>
Excuse my ignorance, I had the DisplayMemberPath still set.....d'uh.
Hi Andrew,
While I can use the Style property and apply a DataTemplate to the Combo, it raises an error -
System.Windows.Data Error: 24 : Both 'ContentTemplate' and 'ContentTemplateSelector' are set; 'ContentTemplateSelector' will be ignored. ComboBoxItem:'ComboBoxItem' (Name='')
I am assuming that XamComboEditor or the Combo itself is setting some values for the ItemTemplate and ItemTemplateSelector, which in turn feeds the ContentTemplates? (I am new to WPF)
Is there anyway to do this safely with the XamComboEditor?
Thanks
Zack