Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
95
XamComboEditor - different template for selected item and drop down item
posted

Hi,

I use Infragistics.Controls.Editors.XamComboEditor (AllowMultipleSelection = True; IsEditable = False) and I need to have different template for selected item and drop down item. I use the following data template for the ItemTemplate property:

<DataTemplate x:Key="FlatComboEditorItemTemplate">
        <StackPanel Orientation="Horizontal"
                          Margin="0,1,0,0">
            <Image Source="{Binding Icon}"
                        Width="16"
                        Height="16"
                        Margin="3,1,0,0" />
            <TextBlock Text="{Binding Name}"
                             Margin="5,0,0,0" />
        </StackPanel>
</DataTemplate>

This works, but it applies both for selected item and drop down item. For the selected item, I would need to display only the Icon (the Name should not be visible).

Is there any way I can accomplish this?

Thanks.

Parents
  • 22015
    posted

    Hello Ioan,

     Thank you for your post. After some research I have made for you, I can suggest to take a look at the following forum thread: http://es.infragistics.com/community/forums/t/26793.aspx. There you can find a working sample and more information about the functionality you have described. You can create a converter that converts the text that is displayed to show the desired content.

    Please  refer to the above mentioned link and feel free to let me know if you have any further questions on the matter.

Reply Children