I have this style defined in <UserControl.Resources>
:
<Style x:Name="DropDownStyle" TargetType="{x:Type ComboBoxItem}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate>
<StackPanel Orientation="Horizontal">
<TextBlock Margin="5,2,2,2" Text="{Binding ID, Mode=OneWay}" />
<TextBlock Margin="5,2,10,2" Text="{Binding Name, Mode=OneWay}" />
</StackPanel>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
which is used to display the items of the ComboBoxItem as 1 Car
, 2 Truck
, etc.
I would like to know how to move this style within the DataGridComboBoxColumn
item as this style is being applied to all my other DataGridComboBoxColumn
.
I cannot figure out how to get down to the ComboBoxItem
element of the DataGridComboBoxColumn
to apply the style.