WPF Button 样式
<Style TargetType="{x:Type Button}" x:Key="DefaultButton"> <Setter Property="Foreground" Value="White"/> <Setter Property="FontFamily" Value="Microsoft YaHei"/> <Setter Property="FontSize" Value="12"/> <Setter Property="FontWeight" Value="Bold"/> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="Button"> <Border BorderBrush="{TemplateBinding Control.BorderBrush}" BorderThickness="0" CornerRadius="5,5,5,5"> <Border.Background> <LinearGradientBrush EndPoint="0,1" StartPoint="0,0"> <GradientStop Color="#FF32515B" Offset="0.0" /> <GradientStop Color="#FF274954" Offset="0.2" /> <GradientStop Color="#FF32515B" Offset="0.0" /> </LinearGradientBrush> </Border.Background> <ContentPresenter Content="{TemplateBinding ContentControl.Content}" HorizontalAlignment="Center" VerticalAlignment="Center" ></ContentPresenter> </Border> </ControlTemplate> </Setter.Value> </Setter> </Style>