Code:

<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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:WpfApp1"
mc:Ignorable="d"
Title="MainWindow" Height="450" Width="800">
<Window.Resources>
<Storyboard x:Key="storyboard1">
<!--这个效果是从左到中间快,从中间到右边快.-->
<DoubleAnimationUsingKeyFrames
RepeatBehavior="Forever"
BeginTime="0:0:0"
Storyboard.TargetName="t1"
Storyboard.TargetProperty="X">
<SplineDoubleKeyFrame KeyTime="0:0:2" Value="100" KeySpline="0,1,1,1" />
<SplineDoubleKeyFrame KeyTime="0:0:4" Value="200" KeySpline="0,1,1,1"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames
RepeatBehavior="Forever"
BeginTime="0:0:0"
Storyboard.TargetName="ellipse1"
Storyboard.TargetProperty="(Ellipse.Opacity)">
<SplineDoubleKeyFrame KeyTime="0:0:2" Value="1" KeySpline="0,1,1,1"/>
<SplineDoubleKeyFrame KeyTime="0:0:4" Value="0" KeySpline="0,1,1,1" />
</DoubleAnimationUsingKeyFrames>

<DoubleAnimationUsingKeyFrames
RepeatBehavior="Forever"
BeginTime="0:0:0.4"
Storyboard.TargetName="t2"
Storyboard.TargetProperty="X">
<SplineDoubleKeyFrame KeyTime="0:0:2" Value="100" KeySpline="0,1,1,1" />
<SplineDoubleKeyFrame KeyTime="0:0:4" Value="200" KeySpline="0,1,1,1" />
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames
RepeatBehavior="Forever"
BeginTime="0:0:0.4"
Storyboard.TargetName="ellipse2"
Storyboard.TargetProperty="(Ellipse.Opacity)">
<SplineDoubleKeyFrame KeyTime="0:0:2" Value="1" KeySpline="0,1,1,1" />
<SplineDoubleKeyFrame KeyTime="0:0:4" Value="0" KeySpline="0,1,1,1" />
</DoubleAnimationUsingKeyFrames>

<DoubleAnimationUsingKeyFrames
RepeatBehavior="Forever"
BeginTime="0:0:0.6"
Storyboard.TargetName="t3"
Storyboard.TargetProperty="X">
<SplineDoubleKeyFrame KeyTime="0:0:2" Value="100" KeySpline="0,1,1,1" />
<SplineDoubleKeyFrame KeyTime="0:0:4" Value="200" KeySpline="0,1,1,1" />
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames
RepeatBehavior="Forever"
BeginTime="0:0:0.6"
Storyboard.TargetName="ellipse3"
Storyboard.TargetProperty="(Ellipse.Opacity)">
<SplineDoubleKeyFrame KeyTime="0:0:2" Value="1" KeySpline="0,1,1,1" />
<SplineDoubleKeyFrame KeyTime="0:0:4" Value="0" KeySpline="0,1,1,1" />
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</Window.Resources>
<Grid Width="200" Height="200">
<Grid.Triggers>
<EventTrigger RoutedEvent="Loaded">
<BeginStoryboard Storyboard="{StaticResource storyboard1}"/>
</EventTrigger>
</Grid.Triggers>
<Border>
<Ellipse x:Name="ellipse1" Opacity="0" Fill="Red" Width="10" Height="10" HorizontalAlignment="Left">
<Ellipse.RenderTransform>
<TransformGroup>
<TranslateTransform x:Name="t1"/>
</TransformGroup>
</Ellipse.RenderTransform>
</Ellipse>
</Border>
<Border>
<Ellipse x:Name="ellipse2" Opacity="0" Fill="Green" Width="10" Height="10" HorizontalAlignment="Left">
<Ellipse.RenderTransform>
<TranslateTransform x:Name="t2"/>
</Ellipse.RenderTransform>
</Ellipse>
</Border>
<Border>
<Ellipse x:Name="ellipse3" Opacity="0" Fill="Blue" Width="10" Height="10" HorizontalAlignment="Left">
<Ellipse.RenderTransform>
<TranslateTransform x:Name="t3"/>
</Ellipse.RenderTransform>
</Ellipse>
</Border>
</Grid>
</Window>

WPF 制作三个点从左到右过渡隐藏显示的更多相关文章

  1. WPF案例 (三) 模拟QQ“快速换装"界面

    原文:WPF案例 (三) 模拟QQ"快速换装"界面 这个小程序使用Wpf模拟QQ快速换装页面的动画特效,通过使用组合快捷键Ctrl+Left或Ctrl+Right,可实现Image ...

  2. WPF制作的小时钟

    原文:WPF制作的小时钟 周末无事, 看到WEB QQ上的小时钟挺可爱的, 于是寻思着用WPF模仿着做一个. 先看下WEB QQ的图: 打开VS, 开始动工. 建立好项目后, 面对一个空荡荡的页面, ...

  3. WPF制作的小型笔记本

    WPF制作的小型笔记本-仿有道云笔记 楼主所在的公司不允许下载外部资源, 不允许私自安装应用程序, 平时记录东西都是用记事本,时间久了很难找到以前记的东西. 平时在家都用有道笔记, 因此就模仿着做了一 ...

  4. 布局:高度已知,布局一个三栏布局,左栏和右栏宽度为200px,中间自适应

    需求:高度已知为200px,写出三栏布局,左栏和右栏各位200px,中间自适应,如下图所示: 方法一:float浮动布局 原理是:定义三个区块,需要注意的是中间的区块放在右边区块的下面,统一设置高度为 ...

  5. WPF制作表示透明区域的马赛克画刷

    最近在用WPF制作一款软件,需要像ps一样表示透明区域,于是制作了一个马赛克背景的style.实现比较简单,那么过程和思路就不表了,直接上代码 <DrawingBrush TileMode=&q ...

  6. WPF入门(三)->几何图形之不规则图形(PathGeometry) (2)

    原文:WPF入门(三)->几何图形之不规则图形(PathGeometry) (2) 上一节我们介绍了PathGeometry中LineSegment是点与点之间绘制的一条直线,那么我们这一节来看 ...

  7. WPF入门(三)->几何图形之不规则图形(PathGeometry)

    原文:WPF入门(三)->几何图形之不规则图形(PathGeometry) 前面我们给大家介绍了LineGeometry,EllipseGeometry,CombinedGeometry等一些规 ...

  8. WPF入门(三)->两个几何图形合并(CombinedGeometry)

    原文:WPF入门(三)->两个几何图形合并(CombinedGeometry) 在WPF中,提供了一个CombinedGeometry对象可以使两个几何图形合并产生效果 CombinedGeom ...

  9. WPF入门(三)->几何图形之矩形(RectangleGeometry)

    原文:WPF入门(三)->几何图形之矩形(RectangleGeometry) 我们可以使用RectangleGeometry来绘制一个矩形或者正方形 RectangleGeometry 类:描 ...

  10. WPF入门(三)->几何图形之椭圆形(EllipseGeometry)

    原文:WPF入门(三)->几何图形之椭圆形(EllipseGeometry) 我们可以使用EllipseGeometry 来绘制一个椭圆或者圆形的图形 EllipseGeometry类: 表示圆 ...

随机推荐

  1. 并发编程 - 线程同步(五)之原子操作Interlocked详解二

    上一章我们学习了原子操作Interlocked类的几个常用方法,今天我们将继续学习该类的其他方法. 01.Exchange方法 该方法用于原子的将变量的值设置为新值,并返回变量的原始值.该方法共有14 ...

  2. c# 删除文件夹最快的函数方法 无视占用 直接删除

    原文作者:aircraft 原文链接:https://www.cnblogs.com/DOMLX/p/17270147.html 代码如下,直接通过cmd调用dos命令进行删除 public stat ...

  3. 解密prompt系列49. 回顾R1之前的思维链发展路线

    在所有人都在谈论R1的今天,作为算法也是有些千头万绪无从抓起.所以这一章先复盘,我先按照自己的思路来梳理下R1之前整个模型思维链的发展过程.下一章再展望主要去看RL在Agent上的一些尝试,毕竟Age ...

  4. DeepSeek R1 简明指南:架构、训练、本地部署及硬件要求

    DeepSeek 新的 LLM 推理方法 DeepSeek 通过强化学习(RL)提出了一种创新的改进大规模语言模型(LLM)推理能力的方法,这在他们最近关于 DeepSeek-R1 的论文中有详细介绍 ...

  5. 【BUUCTF】HardSQL

    [BUUCTF]HardSQL 题目来源 收录于:BUUCTF 极客大挑战 2019 题目描述 一道纯粹的SQL注入题 尝试进行注入,发现对以下字符进行了过滤: = %20(空格) %09 %0a % ...

  6. 解决win11输入法自定义短语有多个当前日期只有最后一个生效

    由于win11自定义短语保存机制问题导致只有最后一个当前日期短语生效** 1.首先找到自定义短语存储文件的具体路径:%AppData%\Microsoft\InputMethod\Chs\ 拼音输入法 ...

  7. Elasticsearch搜索引擎学习笔记(二)

    可视化插件 GitHub搜索elasticsearch-head并下载,如果网络不好可以在gitee上搜索. 这是一个前端项目,需要安装nodejs. 在项目根目录执行 npm install npm ...

  8. Elasticsearch搜索引擎学习笔记(一)

    核心概念 ES -> 数据库 索引index -> 表 文档 document -> 行(记录) 字段 fields -> 列 安装Elasticsearch 1. 上传后解压 ...

  9. My'Bug

    修改时未校验工作经历是否为空

  10. ppt 实用技巧总结

    全是图片且颜色单一 解决方案:在图片上添加图形,加图标 效果图 2.文本功能10个 解决方案:添加背景图片+文本+图标 效果图 只有文本 没有过多内容怎么办