需要根据实际需求在按钮的对应事件或者Command中添加逻辑
<Style TargetType="ComboBox" x:Key="DeleteComboBoxStyle">
<Setter Property="ItemContainerStyle">
<Setter.Value>
<!--ComBoxItem-->
<Style TargetType="ComboBoxItem" >
<Setter Property="HorizontalContentAlignment" Value="Stretch"></Setter>
</Style>
</Setter.Value>
</Setter>
<Setter Property="ItemTemplate">
<Setter.Value>
<DataTemplate>
<Grid >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" ></ColumnDefinition>
<ColumnDefinition Width="auto"></ColumnDefinition>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" VerticalAlignment="Center" Text="{Binding schoolName}"
HorizontalAlignment="Stretch" />
<Button Grid.Column="1" Cursor="Hand" Background="{x:Null}"
VerticalAlignment="Center" VerticalContentAlignment="Center"
Content="X" BorderThickness="0" HorizontalAlignment="Center"
HorizontalContentAlignment="Center" />
</Grid>
</DataTemplate>
</Setter.Value>
</Setter>
</Style>
标签:选项,删除,添加,Command,wpf,下拉框
From: https://www.cnblogs.com/ives/p/18461131