ソースコード
App.xaml
<Application x:Class="WpfApplication9.App" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" StartupUri="MainWindow.xaml"> </Application>
MainWindow.xaml
<Window x:Class="WpfApplication9.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" Height="100" Width="150"> <Button> <Button.Template> <ControlTemplate TargetType="{x:Type Button}"> <Ellipse Name="ellipse" Fill="Blue" /> <ControlTemplate.Triggers> <MultiTrigger> <MultiTrigger.Conditions> <Condition Property="IsEnabled" Value="true" /> <Condition Property="IsMouseOver" Value="true" /> </MultiTrigger.Conditions> <Setter TargetName="ellipse" Property="Fill" Value="Red" /> </MultiTrigger> </ControlTemplate.Triggers> </ControlTemplate> </Button.Template> </Button> </Window>