The XamComboEditor uses a WPF ComboBox while in edit mode. It exposes a property named ComboBoxStyle which can be used to set the Style whose TargetType is ComboBox and is used to set any properties that you would have set on the ComboBox itself such as ItemTemplate, etc. If you still encounter a problem then please post a sample demonstrating the problem along with a description of what you are trying to accomplish.
Can we get a more elaborate response.
I'm very confused as to how to apply an Items Template for when the XamComboEditor is expanded and then show a different Template to when it's closed. It seems that the ComboBox control does this rather easy and I'm wondering why it seems harder to do using the XamComboBox control.
Thanks
Hi, could you post a xaml example with a DataTemplate which show two column.
something like this but works :)
<Control.Resources>
<Style x:Key="dtOrganizationUnitParent">
<DataTemplate>
<StackPanel Orientation="Horizontal" Margin="2">
<TextBlock Text="{Binding Path = OUN_OUN_SHORTNAME}" Width="100" />
<TextBlock Text="{Binding Path = OUN_OUN_DESCRIPTION}" Width="160" />
</StackPanel>
</DataTemplate>
</Style>
</Control.Resources>
<igEditors:XamComboEditor Name="parentCbo" ValueType="{x:Type sys:String}" Grid.Row="2" Grid.Column="1" VerticalAlignment="Top"
ItemsSource="{Binding Path=OrganizationUnitParentCollectionView}"
Value="{Binding Path=OUN_OUN_OUN_OUN_P_ID.Value}"
ComboBoxStyle="{StaticResource dtOrganizationUnitParent}"
>
</igEditors:XamComboEditor>
Hi,
XamComboEditor internally uses a ComboBox in its edit template. You can specify a style to apply to this combo box using the XamComboEditor's ComboBoxStyle property. This is where you can specify any properties like the ItemTemplate that you want to apply to the combo box.
Hope this helps,
Sandip