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. Nessus 扫描Web服务

    Nessus 扫描Web服务 1.点击 New Scan,选择 Web Application Tests 2.填写扫描名称和扫描目标 3.点击 Discovery ,选择 Scan Type 为全端 ...

  2. Ansible之二playbook

    反星系 连接https://galaxy.ansible.com下载相应的roles 列出所有安装的   galaxy ansible-galaxy  list 安装galaxy     ansibl ...

  3. .NET周刊【2月第1期 2025-02-02】

    国内文章 dotnet 9 已知问题 默认开启 CET 导致进程崩溃 https://www.cnblogs.com/lindexi/p/18700406 本文记录 dotnet 9 的一个已知且当前 ...

  4. iceberg调研-查询Iceberg表流程

    1.查询表结构 show create table data_lake_ods.dws_service_subclazz_lesson_user_learn_stat_rt_v2 CREATE TAB ...

  5. Kyuubi支持Iceberg配置

    一.简述 Kyuubi调用Spark来查询iceberg表,修改Spark配置信息即可. 二.服务配置 1.上传jar包到Kyuubi server节点 可以选择emr spark组件后,按照配置组( ...

  6. Luogu P2540 NOIP2015提高组 斗地主 加强版 题解 [ 紫 ] [ 深搜 ] [ 剪枝 ]

    斗地主:一步一步推性质就能做出来的剪枝题. 这题思路和小木棒的剪枝思路极其相似,剪枝的角度都差不多. 其实大部分搜索剪枝题都是先观察性质,列出性质后选择几个比较关键且代码好写的性质进行剪枝,特别要注意 ...

  7. mybatis之增删改查

    核心配置文件中配置数据库连接及注册mapper.xml mapper.xml用来编写执行的sql(namespace为对应的接口类,标签id为接口类中的方法名) User为实体对象类 UserDao为 ...

  8. VSCode Romote SSH连接远程主机经常初始化?10个解决方法!!

    解决方法: 删除远程主机上的 .vscode-server 文件夹:这个文件夹包含 VSCode 的远程服务器组件.如果这个文件夹损坏或配置不正确,会导致连接问题.删除并重新安装可以确保服务器组件是干 ...

  9. C# List应用 Lambda 表达式

    参考链接 : https://blog.csdn.net/wori/article/details/113144580 首先 => 翻译为{ } 然后没有然后 主要基于我工作中常用的几种情况,写 ...

  10. 奥特曼autMan对接BBK-JD扫码登录+微信扫码登录

    1.BBK京东扫码容器配置 首先进入root目录 cd /root 拉取镜像创建容器 docker run -dit \ -v $PWD/conf:/data/conf \ -v $PWD/logs: ...