<!--黄色-->
<Style x:Key="btnYellowStyle" TargetType="Button">
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Background" Value="Transparent"></Setter>
<Setter Property="Cursor" Value="Hand"></Setter>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Grid Name="sp_1" HorizontalAlignment="Center" VerticalAlignment="Center" Opacity="0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Border x:Name="e2" Opacity="0" Width="24" Height="24" CornerRadius="50">
<Border.Effect>
<DropShadowEffect ShadowDepth="0" Color="#F9D950" BlurRadius="16"/>
</Border.Effect>
<Border.Background>
<LinearGradientBrush StartPoint="1,1" EndPoint="0,0" Opacity="0.6">
<GradientStop Offset="1.0" Color="Transparent"></GradientStop>
<GradientStop Offset="0.8" Color="#efe1a6"></GradientStop>
<GradientStop Offset="0.4" Color="#ead26b"></GradientStop>
<GradientStop Offset="0.0" Color="#F9D950"></GradientStop>
</LinearGradientBrush>
</Border.Background>
</Border>
<Ellipse x:Name="img" Width="12" Height="12" Fill="#F9D950" Opacity="1">
<Ellipse.Effect>
<DropShadowEffect ShadowDepth="0" Color="#F9D950" BlurRadius="20"/>
</Ellipse.Effect>
</Ellipse>
<TextBlock Grid.Column="1" x:Name="txt" Text="{TemplateBinding Content}" FontSize="14" VerticalAlignment="Center" Foreground="White" Margin="10,0,0,0"/>
</Grid>
<ControlTemplate.Triggers>
<EventTrigger RoutedEvent="Loaded">
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetName="sp_1" Storyboard.TargetProperty="Opacity" From="0" To="1" Duration="0:0:0.2"></DoubleAnimation>
<DoubleAnimation Storyboard.TargetName="e2" Storyboard.TargetProperty="Opacity" From="1" To="0.7" Duration="0:0:0.3" AutoReverse="True" RepeatBehavior="Forever"/>
<DoubleAnimation Storyboard.TargetName="e2" Storyboard.TargetProperty="Opacity" From="0.7" To="0.3" Duration="0:0:0.3" AutoReverse="True" RepeatBehavior="Forever"/>
<DoubleAnimation Storyboard.TargetName="e2" Storyboard.TargetProperty="Opacity" From="0.3" To="0" Duration="0:0:0.3" AutoReverse="True" RepeatBehavior="Forever"/>
</Storyboard>
</BeginStoryboard>
</EventTrigger>
<EventTrigger RoutedEvent="MouseEnter">
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetName="e2" Storyboard.TargetProperty="Width" To="26" Duration="0:0:0.2"></DoubleAnimation>
<DoubleAnimation Storyboard.TargetName="e2" Storyboard.TargetProperty="Height" To="26" Duration="0:0:0.2"></DoubleAnimation>
<DoubleAnimation Storyboard.TargetName="img" Storyboard.TargetProperty="Width" To="18" Duration="0:0:0.2"></DoubleAnimation>
<DoubleAnimation Storyboard.TargetName="img" Storyboard.TargetProperty="Height" To="18" Duration="0:0:0.2"></DoubleAnimation>
<DoubleAnimation Storyboard.TargetName="txt" Storyboard.TargetProperty="FontSize" To="18" Duration="0:0:0.2"></DoubleAnimation>
</Storyboard>
</BeginStoryboard>
</EventTrigger>
<EventTrigger RoutedEvent="MouseLeave">
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetName="e2" Storyboard.TargetProperty="Width" To="24" Duration="0:0:0.2"></DoubleAnimation>
<DoubleAnimation Storyboard.TargetName="e2" Storyboard.TargetProperty="Height" To="24" Duration="0:0:0.2"></DoubleAnimation>
<DoubleAnimation Storyboard.TargetName="img" Storyboard.TargetProperty="Width" To="12" Duration="0:0:0.2"></DoubleAnimation>
<DoubleAnimation Storyboard.TargetName="img" Storyboard.TargetProperty="Height" To="12" Duration="0:0:0.2"></DoubleAnimation>
<DoubleAnimation Storyboard.TargetName="txt" Storyboard.TargetProperty="FontSize" To="14" Duration="0:0:0.2"></DoubleAnimation>
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
08-01
515
09-13
501
09-15
3261
05-16
1044
06-03
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交