方案: 图标位置不变化的情况下设置透明度实现

代码:

<Window
x:Class="WpfApp1.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:ec="http://schemas.microsoft.com/expression/2010/controls"
xmlns:local="clr-namespace:WpfApp1"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Title="MainWindow"
Width="300"
Height="300"
mc:Ignorable="d"> <Window.Resources>
<Duration x:Key="AnimationTime">0:0:.84</Duration>
</Window.Resources>
<Grid Background="Gray">
<Ellipse
x:Name="ellipse"
Width="80"
Height="80"
RenderTransformOrigin="0.5,0.5" />
<ec:PathListBox HorizontalAlignment="Left" VerticalAlignment="Top">
<ec:PathListBox.LayoutPaths>
<ec:LayoutPath Distribution="Even" SourceElement="{Binding ElementName=ellipse}" />
</ec:PathListBox.LayoutPaths>
<Ellipse
Width="15"
Height="15"
Fill="White">
<Ellipse.Triggers>
<EventTrigger RoutedEvent="Window.Loaded">
<BeginStoryboard>
<Storyboard>
<DoubleAnimation
BeginTime="0:0:.770"
RepeatBehavior="Forever"
Storyboard.TargetProperty="Opacity"
From=".2"
To="1"
Duration="{StaticResource AnimationTime}" />
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</Ellipse.Triggers>
</Ellipse>
<Ellipse
Width="15"
Height="15"
Fill="White">
<Ellipse.Triggers>
<EventTrigger RoutedEvent="Window.Loaded">
<BeginStoryboard>
<Storyboard>
<DoubleAnimation
BeginTime="0:0:.700"
RepeatBehavior="Forever"
Storyboard.TargetProperty="Opacity"
From=".2"
To="1"
Duration="{StaticResource AnimationTime}" />
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</Ellipse.Triggers>
</Ellipse>
<Ellipse
Width="15"
Height="15"
Fill="White">
<Ellipse.Triggers>
<EventTrigger RoutedEvent="Window.Loaded">
<BeginStoryboard>
<Storyboard>
<DoubleAnimation
BeginTime="0:0:.630"
RepeatBehavior="Forever"
Storyboard.TargetProperty="Opacity"
From=".2"
To="1"
Duration="{StaticResource AnimationTime}" />
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</Ellipse.Triggers>
</Ellipse>
<Ellipse
Width="15"
Height="15"
Fill="White">
<Ellipse.Triggers>
<EventTrigger RoutedEvent="Window.Loaded">
<BeginStoryboard>
<Storyboard>
<DoubleAnimation
BeginTime="0:0:.560"
RepeatBehavior="Forever"
Storyboard.TargetProperty="Opacity"
From=".2"
To="1"
Duration="{StaticResource AnimationTime}" />
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</Ellipse.Triggers>
</Ellipse>
<Ellipse
Width="15"
Height="15"
Fill="White">
<Ellipse.Triggers>
<EventTrigger RoutedEvent="Window.Loaded">
<BeginStoryboard>
<Storyboard>
<DoubleAnimation
BeginTime="0:0:.490"
RepeatBehavior="Forever"
Storyboard.TargetProperty="Opacity"
From=".2"
To="1"
Duration="{StaticResource AnimationTime}" />
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</Ellipse.Triggers>
</Ellipse>
<Ellipse
Width="15"
Height="15"
Fill="White">
<Ellipse.Triggers>
<EventTrigger RoutedEvent="Window.Loaded">
<BeginStoryboard>
<Storyboard>
<DoubleAnimation
BeginTime="0:0:.420"
RepeatBehavior="Forever"
Storyboard.TargetProperty="Opacity"
From=".2"
To="1"
Duration="{StaticResource AnimationTime}" />
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</Ellipse.Triggers>
</Ellipse>
<Ellipse
Width="15"
Height="15"
Fill="White">
<Ellipse.Triggers>
<EventTrigger RoutedEvent="Window.Loaded">
<BeginStoryboard>
<Storyboard>
<DoubleAnimation
BeginTime="0:0:.350"
RepeatBehavior="Forever"
Storyboard.TargetProperty="Opacity"
From=".2"
To="1"
Duration="{StaticResource AnimationTime}" />
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</Ellipse.Triggers>
</Ellipse>
<Ellipse
Width="15"
Height="15"
Fill="White">
<Ellipse.Triggers>
<EventTrigger RoutedEvent="Window.Loaded">
<BeginStoryboard>
<Storyboard>
<DoubleAnimation
BeginTime="0:0:0.280"
RepeatBehavior="Forever"
Storyboard.TargetProperty="Opacity"
From=".2"
To="1"
Duration="{StaticResource AnimationTime}" />
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</Ellipse.Triggers>
</Ellipse>
<Ellipse
Width="15"
Height="15"
Fill="White">
<Ellipse.Triggers>
<EventTrigger RoutedEvent="Window.Loaded">
<BeginStoryboard>
<Storyboard>
<DoubleAnimation
BeginTime="0:0:0.210"
RepeatBehavior="Forever"
Storyboard.TargetProperty="Opacity"
From=".2"
To="1"
Duration="{StaticResource AnimationTime}" />
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</Ellipse.Triggers>
</Ellipse>
<Ellipse
Width="15"
Height="15"
Fill="White">
<Ellipse.Triggers>
<EventTrigger RoutedEvent="Window.Loaded">
<BeginStoryboard>
<Storyboard>
<DoubleAnimation
BeginTime="0:0:0.140"
RepeatBehavior="Forever"
Storyboard.TargetProperty="Opacity"
From=".2"
To="1"
Duration="{StaticResource AnimationTime}" />
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</Ellipse.Triggers>
</Ellipse>
<Ellipse
Width="15"
Height="15"
Fill="White">
<Ellipse.Triggers>
<EventTrigger RoutedEvent="Window.Loaded">
<BeginStoryboard>
<Storyboard>
<DoubleAnimation
BeginTime="0:0:0.7"
RepeatBehavior="Forever"
Storyboard.TargetProperty="Opacity"
From=".2"
To="1"
Duration="{StaticResource AnimationTime}" />
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</Ellipse.Triggers>
</Ellipse>
<Ellipse
Width="15"
Height="15"
Fill="White">
<Ellipse.Triggers>
<EventTrigger RoutedEvent="Window.Loaded">
<BeginStoryboard>
<Storyboard>
<DoubleAnimation
BeginTime="0:0:0"
RepeatBehavior="Forever"
Storyboard.TargetProperty="Opacity"
From=".2"
To="1"
Duration="{StaticResource AnimationTime}" />
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</Ellipse.Triggers>
</Ellipse>
</ec:PathListBox>
</Grid>
</Window>

WPF 简单的绕圈进度条(无cs代码)的更多相关文章

  1. WPF 绕圈进度条(二)

    一 以前的方案 以前写过一个圆点绕圈的进度条,根据参数圆点个数和参数每次旋转角度,主要是在cs文件中动态添加圆点,通过后台定时器,动态设置角度后用正弦余弦计算(x,y)的位置. 此方案优点:动态添加L ...

  2. WPF 自定义绕圈进度条

    在设计界面时,有时会遇到进度条,本次讲解如何设计自定义的绕圈进度条,直接上代码: 1.控件界面 <UserControl x:Class="ProgressBarControl&quo ...

  3. WPF 绕圈进度条(一)

    在设计界面时,有时会遇到进度条,本次讲解如何设计自定义的绕圈进度条,直接上代码: 1.控件界面 <UserControl x:Class="ProgressBarControl&quo ...

  4. WPF 自定义绕圈进度条(转)

    在设计界面时,有时会遇到进度条,本次讲解如何设计自定义的绕圈进度条,直接上代码: 1.控件界面 <UserControl x:Class="ProgressBarControl&quo ...

  5. WPF利用动画实现圆形进度条

    原文:WPF利用动画实现圆形进度条 这是我的第一篇随笔,最近因为工作需要,开始学习WPF相关技术,自己想实现以下圆形进度条的效果,逛了园子发现基本都是很久以前的文章,实现方式一般都是GDI实现的,想到 ...

  6. C# WPF 解压缩7zip文件 带进度条 sevenzipsharp

      vs2013附件 :http://download.csdn.net/detail/u012663700/7427461 C# WPF 解压缩7zip文件 带进度条 sevenzipsharp W ...

  7. 使用ajax实现简单的带百分比进度条

    需求:当进行文件上传保存等操作时,能在页面显示一个带百分比的进度条,给用户一个好的交互体验 实现步骤 JSP页面 1.添加table标签 <table id="load" w ...

  8. 最简单的android自定义进度条样式

    一.自定义圆形进度条样式 1.在安卓项目drawable目录下新建一个xml文件如下:<?xml version="1.0" encoding="utf-8&quo ...

  9. [WPF]有滑动效果的进度条

    先给各位看看效果,可能不太完美,不过效果还是可行的. 我觉得,可能直接放个GIF图片上去会更好. 我这个不是用图片,而是用DrawingBrush画出来的.接着重做ProgressBar控件的模板,把 ...

随机推荐

  1. MySQL建立双向主备复制server配置方法

    1.环境描写叙述 serverA(主) 192.85.1.175 serverB(从) 192.85.1.176 Mysql版本号:5.1.61 系统版本号:System OS:ubuntu 10.1 ...

  2. C++ 程序延时处理的几种方法

    (—)使用_sleep()函数 例如:_sleep(200);//延时200毫秒 (二)使用delay(int time)函数 (需要自己实现,编译器里面没有) /// @brief      程序延 ...

  3. [NPM] Pull out npm scripts into another file with p-s

    A technique you might use once you start having lots of npm scripts is to use a node package that al ...

  4. TensorFlow中卷积

    CNN中的卷积核及TensorFlow中卷积的各种实现 声明: 1. 我和每一个应该看这篇博文的人一样,都是初学者,都是小菜鸟,我发布博文只是希望加深学习印象并与大家讨论. 2. 我不确定的地方用了“ ...

  5. 接入Erlang控制台的几种方法

    在window中调试的时候我们可以通过启动多个cmd窗口运行Erlang节点,在生产环境中我们需要Erlang服务在Centos服务器上后台运行;这就需要在启动的时候添加启动参数detached来脱离 ...

  6. 孔雀翎----《Programming C# 》中国版 文章4版

    孔雀翎----<Programming C# >中国版 文章4版 页:http://blog.csdn.net/21aspnet/           时间:2007.8.7 电子工业出版 ...

  7. Thread和ThreadPool

    Thread和ThreadPool 说到多线程异步编程,总会说起Thread.ThreadPool.Task.TPL这一系列的技术.总结整理了一版编程示例和实践,分享给大家. 先从Thread和Thr ...

  8. 文件控制 fcntl函数具体解释

    摘要:本文主要讨论文件控制fcntl函数的基本应用.dup函数能够拷贝文件描写叙述符,而fcntl函数与dup函数有着异曲同工之妙.而且还有更加强大的功能,能够获取或设置已打开文件的性质,操作文件锁. ...

  9. maven 依赖(依赖范围,聚合,继承等)

    目录: 1.什么是依赖? 2.依赖的管理:依赖的范围与传递,依赖的排除,依赖的原则(maven对依赖冲突的处理原则) 3.依赖的版本管理 4.继承与聚合 1.什么是依赖? 简单的讲,当jar包A需要j ...

  10. spring boot jar包 linux 部署

    前提: jar包路径:/usr/local/lib/app/app.jar 1.首先先用vi创建文件 命令: cd /usr/local/lib/app/vi app-start.sh 2.在文件ap ...