• 模仿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="0" Value="White"/>
    </ColorAnimationUsingKeyFrames>
    <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.BorderBrush).(SolidColorBrush.Color)" Storyboard.TargetName="border">
    <EasingColorKeyFrame KeyTime="0" 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="0" Value="White"/>
    <EasingColorKeyFrame KeyTime="0:0:0.1" Value="#FF41C236"/>
    </ColorAnimationUsingKeyFrames>
    </Storyboard>
    </ControlTemplate.Resources>

    <Border x:Name="border" CornerRadius="70" BorderBrush="white" BorderThickness="6" Height="142" Width="143" Background="Black">
    <Grid>
    <Rectangle x:Name="rectangle" Fill="White" HorizontalAlignment="Left" Height="130" RadiusY="65" RadiusX="65" Stroke="#41C236" StrokeThickness="3" VerticalAlignment="Top" Width="131"/>
    <Rectangle Fill="White" HorizontalAlignment="Left" Height="50" Margin="36" RadiusY="65" RadiusX="65" Stroke="#41C236" StrokeThickness="3" VerticalAlignment="Top" Width="50"/>
    <Rectangle Fill="#41C236" HorizontalAlignment="Left" Height="9.448" Margin="80 80 0 0" Stroke="#41C236" StrokeThickness="3" 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="p1" Data="M150,120 L173,120" Fill="White" HorizontalAlignment="Left" Height="3" Margin="40 66 0 0" Stretch="Fill" Stroke="#41C236" StrokeThickness="3" VerticalAlignment="Top" Width="17"/>
    <Path x:Name="p2" Data="M171,124 L181,111" Fill="White" HorizontalAlignment="Left" Height="20.314" Margin="50 48 0 0" Stretch="Fill" Stroke="#41C236" StrokeThickness="3" 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="p3" Data="M177,107 L179.5,119.5" Fill="White" HorizontalAlignment="Left" Height="33.5" Margin="61 43 0 0" Stretch="Fill" Stroke="#41C236" StrokeThickness="3" VerticalAlignment="Top" Width="10"/>
    <Path x:Name="p4" Data="M185,138 L192.5,124" Fill="White" HorizontalAlignment="Left" Height="17" Margin="69 58 0 0" Stretch="Fill" Stroke="#41C236" StrokeThickness="3" VerticalAlignment="Top" Width="10.5"/>
    <Path x:Name="p5" Data="M190,124 L200,124" Fill="White" HorizontalAlignment="Left" Height="3" Margin="74 60 0 0" Stretch="Fill" Stroke="#41C236" StrokeThickness="3" VerticalAlignment="Top" Width="13"/>

    </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

  • 相关阅读:
    Sharepoint List Attachments in a Webpart : The Solution
    MOSS 文档库操作类
    许多实用的js 正则表达式
    SharePoint 调查列表的自定义错误页面
    排序算法——插入排序
    用vs2010创建带有AssociationForm的工作流
    does not have element "configuration/configSections/sectionGroup[@name='SharePoint']" or it is invalid
    CSharp数据库使用SqlCommand进行增,删,改,查询操作
    去掉视图选择栏
    IList与Xml互相转换
  • 原文地址:https://www.cnblogs.com/ExMan/p/5645911.html
Copyright © 2020-2023  润新知