模仿36。杀毒~button

 <Style x:Key="360btn" TargetType="{x:Type Button}">
             <Setter Property="Template">
                 <Setter.Value>
                     <ControlTemplate TargetType="{x:Type Button}">
                         <ControlTemplate.Resources>
                             <Storyboard x:Key="Storyboard1">
                                 <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Panel.Background).(SolidColorBrush.Color)" Storyboard.TargetName="border">
                                     <EasingColorKeyFrame KeyTime=" Value="White"/>
                                 </ColorAnimationUsingKeyFrames>
                                 <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.BorderBrush).(SolidColorBrush.Color)" Storyboard.TargetName="border">
                                     <EasingColorKeyFrame KeyTime=" Value="White"/>
                                     <EasingColorKeyFrame KeyTime="0:0:0.1" Value="#FFA2E5A0"/>
                                 </ColorAnimationUsingKeyFrames>
                                 <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Shape.Stroke).(SolidColorBrush.Color)" Storyboard.TargetName="p2">
                                     <EasingColorKeyFrame KeyTime="0:0:0.1" Value="White"/>
                                     <EasingColorKeyFrame KeyTime="0:0:0.3" Value="#FF41C236"/>
                                 </ColorAnimationUsingKeyFrames>
                                 <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Shape.Stroke).(SolidColorBrush.Color)" Storyboard.TargetName="p3">
                                     <EasingColorKeyFrame KeyTime="0:0:0.2" Value="White"/>
                                     <EasingColorKeyFrame KeyTime="0:0:0.4" Value="#FF41C236"/>
                                 </ColorAnimationUsingKeyFrames>
                                 <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Shape.Stroke).(SolidColorBrush.Color)" Storyboard.TargetName="p4">
                                     <EasingColorKeyFrame KeyTime="0:0:0.3" Value="White"/>
                                     <EasingColorKeyFrame KeyTime="0:0:0.5" Value="#FF41C236"/>
                                 </ColorAnimationUsingKeyFrames>
                                 <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Shape.Stroke).(SolidColorBrush.Color)" Storyboard.TargetName="p5">
                                     <EasingColorKeyFrame KeyTime="0:0:0.4" Value="White"/>
                                     <EasingColorKeyFrame KeyTime="0:0:0.6" Value="#FF41C236"/>
                                 </ColorAnimationUsingKeyFrames>
                                 <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Shape.Stroke).(SolidColorBrush.Color)" Storyboard.TargetName="p1">
                                     <EasingColorKeyFrame KeyTime=" Value="White"/>
                                     <EasingColorKeyFrame KeyTime="0:0:0.1" Value="#FF41C236"/>
                                 </ColorAnimationUsingKeyFrames>
                             </Storyboard>
                         </ControlTemplate.Resources>

                         <Border x:Name=" Background="Black">
                         <Grid>
                             <Rectangle x:Name="/>
                             <Rectangle Fill="/>
                             <Rectangle Fill=" VerticalAlignment="Top" Width="23.729" RenderTransformOrigin="0.5,0.5" RadiusY="3.654" RadiusX="3.654">
                                 <Rectangle.RenderTransform>
                                  <TransformGroup>
                                     <RotateTransform Angle="32.454"/>
                                  </TransformGroup>
                             </Rectangle.RenderTransform>
                          </Rectangle>
                         <Path x:Name="/>
                         <Path x:Name=" VerticalAlignment="Top" Width="17.23" RenderTransformOrigin="0.5,0.5">
             <Path.RenderTransform>
                 <TransformGroup>
                     <ScaleTransform/>
                     <SkewTransform/>
                     <RotateTransform Angle="-19.995"/>
                     <TranslateTransform/>
                 </TransformGroup>
             </Path.RenderTransform>
         </Path>
         <Path x:Name="/>
                         <Path x:Name=" VerticalAlignment="Top" Width="10.5"/>
                         <Path x:Name="/>

                         </Grid>
                         </Border>
                         <ControlTemplate.Triggers>
                             <Trigger Property="IsMouseOver" Value="True">
                                 <Trigger.EnterActions>
                                     <BeginStoryboard Storyboard="{StaticResource Storyboard1}"/>
                                 </Trigger.EnterActions>

                             </Trigger>
                         </ControlTemplate.Triggers>
                     </ControlTemplate>
                 </Setter.Value>
           </Setter>
         </Style>

style

 <Button x:Name="button"  Style="{DynamicResource 360btn}" Margin="394,230,75,69">

         </Button>

附上效果图:

模仿36。杀毒~button

http://www.cnblogs.com/yanjinhua/p/5643459.html

上一篇:使用s3cmd操作ceph rgw


下一篇:关于WCF在IIS8注册的问题