?
<!-- 按钮模板 -->
<ControlTemplate x:Key="buttonTemplateStyle" TargetType="Button">
<Border Background="#FFFFFF" CornerRadius="15" BorderBrush="#409EFF" BorderThickness="1" x:Name="border" >
<StackPanel Orientation="Horizontal" HorizontalAlignment="{TemplateBinding HorizontalAlignment}">
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center" >
<TextBlock x:Name="textInfo" Text="{TemplateBinding Content}"
HorizontalAlignment="Center" VerticalAlignment="Center"
Foreground="#409EFF"/>
</StackPanel>
</StackPanel>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="true">
<Setter Property="Background" TargetName="border" Value="#409EFF"/>
<Setter Property="Foreground" TargetName="textInfo" Value="#FFFFFF"/>
<Setter Property="FontWeight" TargetName="textInfo" Value="Bold" />
</Trigger>
<Trigger Property="IsPressed" Value="true">
<Setter Property="Background" TargetName="border" Value="#003a8c"/>
<Setter Property="BorderBrush" TargetName="border" Value="#003a8c"/>
<Setter Property="Foreground" TargetName="textInfo" Value="#FFFFFF"/>
<Setter Property="FontWeight" TargetName="textInfo" Value="Bold" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
使用在按钮上
<Button Content="关闭" Margin="0,0,20,0" Width="100"
Template="{StaticResource buttonTemplateStyle}"/>