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控件的模板,把 ...
随机推荐
- Python 网络爬虫与信息获取(一)—— requests 库的网络爬虫
1. 安装与测试 进入 cmd(以管理员权限),使用 pip 工具,pip install requests 进行安装: 基本用法: >> import requests >> ...
- oracle11g 在azure云中使用rman进行实例迁移
1,開始备份 备份脚本rman_full_backup.sh内容例如以下: #!/bin/sh export DATE=`date +%F` export BACK_DIR='/backupdisk/ ...
- 安装 Visual Studio,连接中国区 Azure
中国数据中心 目前,中国区 Azure 有两个数据中心,在位置字段中显示为“中国北部”和“中国东部”. 在 Azure 上创建应用程序的区别 在中国区 Azure 上开发应用程序与在境外 Azure ...
- WIN32汇编语言中位图的使用
说到位图.我们事实上非常早就接触过.从最早接触计算机,我们应该就知道有图片这个东西,然后再进一步说,图片在电脑上有好几种格式比方jpg. gif .png.pcx.bmp等等,当中bmp格式的图片文件 ...
- push的时候隐藏底部的tabbar
push的时候隐藏底部的tabbar #import "mainNavigationControllers.h" @interface mainNavigationControll ...
- github push出错(1)You can't push to git:// Use https://
fatal: remote error: You can't push to git://github.com/niexiaobo/remote.git Use https://github.com/ ...
- Java Web 实用返回结果封装
实用的返回结果封装 使用示例 效果 Result ResultEnum 使用示例 /** * @Author: huangwenjun * @Description: * @Date: Created ...
- Andrew Ng Machine Learning 专题【Logistic Regression & Regularization】
此文是斯坦福大学,机器学习界 superstar - Andrew Ng 所开设的 Coursera 课程:Machine Learning 的课程笔记. 力求简洁,仅代表本人观点,不足之处希望大家探 ...
- Android Studio ERROR: x86 emulation currently requires hardware acceleration!报错解决傻瓜教程~
很早之前就碰到过Android Studio模拟器无法启动的问题,今天终于尝试去解决了下,下面将我解决的方法记录下. 模拟器报错信息为: emulator: ERROR: x86 emulation ...
- dotnet core 使用 sqlite 部署到 Centos 服务器
原文:dotnet core 使用 sqlite 部署到 Centos 服务器 本文告诉大家如何创建一个 asp dotnet core 程序,这个程序使用 sqlite 保存,部署程序到 Cento ...