<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Page.Resources>
<Style x:Key="ButtonTriggers" TargetType="{x:Type Button}">
<Style.Triggers>
<Trigger Property="Button.IsMouseOver" Value="true">
<Setter Property = "Control.Foreground" Value="Green"/>
<Setter Property = "Control.Background" Value="Red"/>
</Trigger>
</Style.Triggers>
</Style>
</Page.Resources>
<StackPanel>
<Button Style="{StaticResource ButtonTriggers}" Content="My Button" />
</StackPanel>
</Page>
|