Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
This example describes how to use a Trigger to style a ToolBar. The sample shows how to create a Style that changes the appearance of a ToolBar in response to events raised on the bar. When you move the mouse over the ToolBar its appearance changes.
Example
<Style x:Key="Triggers" TargetType="{x:Type ToolBar}">
<Style.Triggers>
<Trigger Property="Button.IsMouseOver" Value="true">
<Setter Property = "Background" Value="Red"/>
<Setter Property = "BorderBrush" Value="Green"/>
</Trigger>
</Style.Triggers>
</Style>
For the complete sample see ToolBar Styles Sample.