Just new in WPF, I’m trying to do a combobox that allows people to select the keywords, by checking them. Below is my XAML
<ComboBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<CheckBox Tag="{Binding Path=TagID}"
Content="{Binding Path=Tag}"
Margin="10,0,0,0"></CheckBox>
</StackPanel>
</DataTemplate>
</ComboBox.ItemTemplate>
the question is, how do I create a custom display? for example, the user selected three items. Instead of the selected item and the checkbox being displayed in the combo box text. I want the three selected items to be the ones displayed in the combobox text?
Try to use ItemContainerStyle property which allows you to specify the container for your templates