WPF 简单的绕圈进度条(无cs代码)
方案: 图标位置不变化的情况下设置透明度实现
代码:
<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代码)的更多相关文章
- WPF 绕圈进度条(二)
一 以前的方案 以前写过一个圆点绕圈的进度条,根据参数圆点个数和参数每次旋转角度,主要是在cs文件中动态添加圆点,通过后台定时器,动态设置角度后用正弦余弦计算(x,y)的位置. 此方案优点:动态添加L ...
- WPF 自定义绕圈进度条
在设计界面时,有时会遇到进度条,本次讲解如何设计自定义的绕圈进度条,直接上代码: 1.控件界面 <UserControl x:Class="ProgressBarControl&quo ...
- WPF 绕圈进度条(一)
在设计界面时,有时会遇到进度条,本次讲解如何设计自定义的绕圈进度条,直接上代码: 1.控件界面 <UserControl x:Class="ProgressBarControl&quo ...
- WPF 自定义绕圈进度条(转)
在设计界面时,有时会遇到进度条,本次讲解如何设计自定义的绕圈进度条,直接上代码: 1.控件界面 <UserControl x:Class="ProgressBarControl&quo ...
- WPF利用动画实现圆形进度条
原文:WPF利用动画实现圆形进度条 这是我的第一篇随笔,最近因为工作需要,开始学习WPF相关技术,自己想实现以下圆形进度条的效果,逛了园子发现基本都是很久以前的文章,实现方式一般都是GDI实现的,想到 ...
- C# WPF 解压缩7zip文件 带进度条 sevenzipsharp
vs2013附件 :http://download.csdn.net/detail/u012663700/7427461 C# WPF 解压缩7zip文件 带进度条 sevenzipsharp W ...
- 使用ajax实现简单的带百分比进度条
需求:当进行文件上传保存等操作时,能在页面显示一个带百分比的进度条,给用户一个好的交互体验 实现步骤 JSP页面 1.添加table标签 <table id="load" w ...
- 最简单的android自定义进度条样式
一.自定义圆形进度条样式 1.在安卓项目drawable目录下新建一个xml文件如下:<?xml version="1.0" encoding="utf-8&quo ...
- [WPF]有滑动效果的进度条
先给各位看看效果,可能不太完美,不过效果还是可行的. 我觉得,可能直接放个GIF图片上去会更好. 我这个不是用图片,而是用DrawingBrush画出来的.接着重做ProgressBar控件的模板,把 ...
随机推荐
- CRT(C Runtime Library)—— C/C++运行时库
C runtime library(part of the C standard library) 任何一个 C 程序,它的背后都有一套庞大的代码来进行支撑,使得该程序得以运行在更高级别上,而不必担心 ...
- 图形界面Aardio
用aardio给python写个图形界面 前阵子在用python写一些小程序,写完后就开始思考怎么给python程序配一个图形界面,毕竟控制台实在太丑陋了. 于是百度了下python的图形界面库,眼花 ...
- VBA Code for Word Navigation Pane 【failed】 view-showheading-method-word
https://msdn.microsoft.com/VBA/Word-VBA/articles/view-showheading-method-word View.ShowHeading Metho ...
- [React] Modify file structure
In React app, you might create lots of components. We can use index.js to do both 'import' & 'ex ...
- alloc init初始化后对象依然还在父视图
self.TableView=[[UITableView alloc]init]; ........2个cell //下面但方法和addsubviews方法不一样 [self.view insertS ...
- [_UICascadingTextStorage attributesAtIndex:effectiveRange:]: Range or index out of bounds
之前写过一篇<如何更好地限制一个UITextField的输入长度>,在文章最后得到的结论是可以直接使用 UIKIT_EXTERN NSString *const UITextFieldTe ...
- pycharm输出乱码如\xe9\x9d\x92\xe8\x9b\x99\xe7\x8e\x8b\xe5\xad\x90转成中文
转自:https://blog.csdn.net/baidu_19473529/article/details/54949453 利用Python解决unicode编码问题,有些json在控制台打印也 ...
- 智能手环体验:UP24
背景 穿戴式设备承载了物联网.大数据.健康.智能等各路当下或曾经的热门词汇,其风言风语已经飘荡了两年了.当前市面上比较流行的有国外的 jawbone up 手环.NIKE 的 fuelband 和 f ...
- class helper 可能是从 Delphi 2007 增加的新语法
class helper 可能是从 Delphi 2007 增加的新语法, 因为感觉不太实用, 直到今天才测试了一下. 试过之后才知道: 挺有意思的! 基本功能就是修改已存在的类. Txxx = cl ...
- 共享Session
概述 现在的大型网站中,会面临实现多台服务器中的session数据共享问题.当使用多台服务器架设成集群之后,我们通过负载均衡的方式,同一个用户(或者ip)访问时被分配到不同的服务器上,假设在A服务器登 ...