码迷,mamicode.com
首页 > Windows程序 > 详细

WPF:Metro样式ProgressBar

时间:2014-11-15 23:02:23      阅读:524      评论:0      收藏:0      [点我收藏+]

标签:des   http   io   ar   os   sp   for   on   bs   

 <UserControl x:Class="MetroProgressBar.MetroProBar"

  •                  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  •                  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  •                  xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  •                  xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  •                  mc:Ignorable="d"
  •                  d:DesignHeight="300" d:DesignWidth="300">
  •         <UserControl.Resources>
  •             <Storyboard x:Key="StoryLeftToRight" RepeatBehavior="Forever">
  •                 <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="e1" Storyboard.TargetProperty="(FrameworkElement.Margin)">
  •                     <SplineThicknessKeyFrame KeyTime="00:00:00.6" Value="275,0,0,0" />
  •                     <SplineThicknessKeyFrame KeyTime="00:00:03.1" Value="325,0,0,0" />
  •                     <SplineThicknessKeyFrame KeyTime="00:00:03.7" Value="600,0,0,0" />
  •                 </ThicknessAnimationUsingKeyFrames>
  •                 <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="e2" Storyboard.TargetProperty="(FrameworkElement.Margin)">
  •                     <SplineThicknessKeyFrame KeyTime="00:00:00.5" Value="20,0,0,0" />
  •                     <SplineThicknessKeyFrame KeyTime="00:00:01.1" Value="275,0,0,0" />
  •                     <SplineThicknessKeyFrame KeyTime="00:00:03.6" Value="325,0,0,0" />
  •                     <SplineThicknessKeyFrame KeyTime="00:00:04.2" Value="590,0,0,0" />
  •                 </ThicknessAnimationUsingKeyFrames>
  •                 <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="e3" Storyboard.TargetProperty="(FrameworkElement.Margin)">
  •                     <SplineThicknessKeyFrame KeyTime="00:00:01.0" Value="10,0,0,0" />
  •                     <SplineThicknessKeyFrame KeyTime="00:00:01.6" Value="275,0,0,0" />
  •                     <SplineThicknessKeyFrame KeyTime="00:00:04.1" Value="325,0,0,0" />
  •                     <SplineThicknessKeyFrame KeyTime="00:00:04.7" Value="580,0,0,0" />
  •                 </ThicknessAnimationUsingKeyFrames>
  •                 <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="e4" Storyboard.TargetProperty="(FrameworkElement.Margin)">
  •                     <SplineThicknessKeyFrame KeyTime="00:00:01.5" Value="0,0,0,0" />
  •                     <SplineThicknessKeyFrame KeyTime="00:00:02.1" Value="275,0,0,0" />
  •                     <SplineThicknessKeyFrame KeyTime="00:00:04.5" Value="325,0,0,0" />
  •                     <SplineThicknessKeyFrame KeyTime="00:00:05.1" Value="570,0,0,0" />
  •                 </ThicknessAnimationUsingKeyFrames>
  •             </Storyboard>
  •         </UserControl.Resources>
  •     
  •         <UserControl.Triggers>
  •             <EventTrigger RoutedEvent="FrameworkElement.Loaded">
  •                 <BeginStoryboard Storyboard="{StaticResource StoryLeftToRight}"/>
  •             </EventTrigger>
  •         </UserControl.Triggers>
  •  
  •         <Grid>
  •             <Ellipse Width="5" Height="5" HorizontalAlignment="Left" Margin="30,0,0,0" Fill="White" Name="e1" />
  •             <Ellipse Width="5" Height="5" HorizontalAlignment="Left" Margin="20,0,0,0" Fill="White" Name="e2" />
  •             <Ellipse Width="5" Height="5" HorizontalAlignment="Left" Margin="10,0,0,0" Fill="White" Name="e3" />
  •             <Ellipse Width="5" Height="5" HorizontalAlignment="Left" Margin="0,0,0,0" Fill="White" Name="e4" />
  •         </Grid>
  •     </UserControl>

 

WPF:Metro样式ProgressBar

标签:des   http   io   ar   os   sp   for   on   bs   

原文地址:http://www.cnblogs.com/KeepLoving/p/4100304.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!