I am trying to bind a combobox from a static resource(added on code behind) and add an image beside each item. The best solution I have so far is the following:
<ComboBox x:Name="cmbGroup"
Width="150" Height="32" ItemsSource="{StaticResource Groups}" >
<ComboBox.ItemTemplate>
<DataTemplate>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Image Source="Question.jpg" Height="30" MouseEnter="Image_MouseEnter" ></Image>
<ComboBoxItem Content="{Binding Source={StaticResource Groups}}" Grid.Column="1"/>
</Grid>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
This is not working, although I can see the image on each item, but instead a text, I got a "Systems.Collection.GenericList". Any ideas how to solve this? Thanks