WPF如何重置Combobox下拉菜单里的值为初始状态
<!-- 下拉框只读切换按钮 -->
<Style x:Key="ComboBoxReadonlyToggleButton" TargetType="{x:Type ToggleButton}">
<Setter Property="OverridesDefaultStyle" Value="true"/>
<Setter Property="IsTabStop" Value="false"/>
<Setter Property="Focusable" Value="false"/>
<Setter Property="ClickMode" Value="Press"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ToggleButton}">
<Border x:Name="Chrome"
BorderBrush="{TemplateBinding BorderBrush}"
Background="{TemplateBinding Background}"
CornerRadius="3"
BorderThickness="0"
Margin="0,0,-0.2,0"
SnapsToDevicePixels="true">
<Grid HorizontalAlignment="Right" Width="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}">
<Path x:Name="Arrow"
Data="{StaticResource DownArrowGeometry}"
Fill="Black"
HorizontalAlignment="Center"
Margin="1,1,0,0"
VerticalAlignment="Center"/>
</Grid>
</Border>
<ControlTemplate.Triggers>
<!-- 默认的按钮样式 -->
<Trigger Property="IsEnabled" Value="true">
<Setter Property="Fill" TargetName="Arrow" Value="#AFAFAF"/>
<Setter Property="Background" TargetName="Chrome" Value="{StaticResource ButtonNormalBackground}"/>
</Trigger>
<!-- 鼠标经过时的样式 -->
<Trigger Property="IsMouseOver" Value="true">
<Setter Property="Background" TargetName="Chrome" Value="{StaticResource ButtonMouseOverBackground}"/>
</Trigger>
<!-- 鼠标获得焦点时的样式 -->
<Trigger Property="IsFocused" Value="true">
<Setter Property="Background" TargetName="Chrome" Value="{StaticResource ButtonFocusedBackground}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>