wpf 触发器,属性触发器,事件触发器,事件触发器。
<EventTrigger RoutedEvent="Mouse.MouseEnter"/>
<DataTrigger Binding="{Binding Source={x:Static SystemParameters.HighContrast}}" Value="false">
<Setter Property="Foreground" TargetName="PART_TextBox" Value="{Binding Foreground, RelativeSource={RelativeSource TemplatedParent}}"/>
</DataTrigger>
<Trigger Property="IsDropDownOpen" Value="True">
<Setter Property="Fill" TargetName="RecBackground" Value="#FFDDF1FF"/>
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Fill" TargetName="RecBackground" Value="#FFDDF1FF"/>
</Trigger>