WPF 一个弧形手势提示动画
这是一个操作提示动画,一个小手在屏幕上按照一个弧形来回运动 <Window x:Class="LZRichMediaWall.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:LocWindow="clr-namespace:LZRichMediaWall.UIControls"
xmlns:childControls="clr-namespace:LZRichMediaWall.UIControls.ChildControls"
Title="MainWindow" WindowState="Maximized" AllowsTransparency="True" WindowStyle="None"> <Window.Resources>
<PathGeometry x:Key="path">
<PathFigure StartPoint="0,100">
<PathFigure.Segments>
<PathSegmentCollection>
<ArcSegment Size="100,80" IsLargeArc="True" SweepDirection="CounterClockwise" Point="600,100" />
</PathSegmentCollection>
</PathFigure.Segments>
</PathFigure>
</PathGeometry>
</Window.Resources> <Window.Triggers>
<EventTrigger RoutedEvent="Window.Loaded">
<EventTrigger.Actions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimationUsingPath Storyboard.TargetName="tipGd"
Storyboard.TargetProperty="(Canvas.Left)"
PathGeometry="{StaticResource path}"
Duration="0:0:5" RepeatBehavior="Forever" Source="X" AutoReverse="True" />
<DoubleAnimationUsingPath Storyboard.TargetName="tipGd"
Storyboard.TargetProperty="(Canvas.Top)"
PathGeometry="{StaticResource path}"
Duration="0:0:5" RepeatBehavior="Forever" Source="Y" AutoReverse="True" />
</Storyboard>
</BeginStoryboard>
</EventTrigger.Actions>
</EventTrigger>
</Window.Triggers>
<Grid x:Name="main_Gd" Background="Black">
<Canvas x:Name="animat_Cvs" VerticalAlignment="Bottom" HorizontalAlignment="Center" Margin="-650,0,0,500" Visibility="Collapsed">
<Path Stroke="Transparent" StrokeThickness="" Data="{StaticResource path}" Canvas.Top="" Canvas.Left="">
</Path>
<Grid x:Name="tipGd" Height="" Width="" Visibility="Visible" MouseLeftButtonDown="TipGd_OnMouseLeftButtonDown">
<!--<Image Height="" Width="" Margin="0,-100,-30,0" Source="/LZRichMediaWall;component/Images/点我.png"></Image>-->
<!--<Image x:Name="quan" Height="" Width="" Source="/LZRichMediaWall;component/Images/圈.png">
<Image.Triggers>
<EventTrigger RoutedEvent="UserControl.Loaded">
<BeginStoryboard>
<Storyboard x:Name="storyB" RepeatBehavior="Forever" AutoReverse="True">
<DoubleAnimation From="0.0" To="1.0" Duration="0:0:0.5" Storyboard.TargetName="quan" Storyboard.TargetProperty="Opacity"/>
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</Image.Triggers>
</Image>-->
<Image x:Name="show" Height="" Width="" Margin="0,0,-5,-60" Source="/LZRichMediaWall;component/Images/手.png"></Image>
</Grid>
<Label x:Name="textTip" Height="" Width="" Content="单 指 滑 动" FontSize="" Foreground="White"
VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Canvas.Left="" Canvas.Top="">
<Label.Triggers>
<EventTrigger RoutedEvent="UserControl.Loaded">
<BeginStoryboard>
<Storyboard x:Name="storyB" RepeatBehavior="Forever" AutoReverse="True">
<DoubleAnimation From="0.0" To="1.0" Duration="0:0:1" Storyboard.TargetName="textTip" Storyboard.TargetProperty="Opacity"/>
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</Label.Triggers>
</Label>
</Canvas>
</Grid>
</Window>
WPF 一个弧形手势提示动画的更多相关文章
- 《深入浅出WPF》笔记——绘画与动画
<深入浅出WPF>笔记——绘画与动画 本篇将记录一下如何在WPF中绘画和设计动画,这方面一直都不是VS的强项,然而它有一套利器Blend:这方面也不是我的优势,幸好我有博客园,能记录一 ...
- WPF学习之绘图和动画
如今的软件市场,竞争已经进入白热化阶段,功能强.运算快.界面友好.Bug少.价格低都已经成为了必备条件.这还不算完,随着计算机的多媒体功能越来越强,软件的界面是否色彩亮丽.是否能通过动画.3D等效果是 ...
- WPF学习之绘图和动画--DarrenF
Blend作为专门的设计工具让WPF如虎添翼,即能够帮助不了解编程的设计师快速上手,又能够帮助资深开发者快速建立图形或者动画的原型. 1.1 WPF绘图 与传统的.net开发使用GDI+进行绘图不 ...
- WPF学习(12)动画
本篇来学习WPF的动画.什么是动画?动画就是一系列帧.在WPF中,动画就是在一段时间内修改依赖属性值的行为,它是基于时间线Timeline的.有人会说,要动画干嘛,华而不实,而且添加了额外的资源消耗而 ...
- 写了一个迷你toast提示插件,支持自定义提示文字和显示时间
写了一个迷你toast提示插件,支持自定义提示文字和显示时间,不想用其他第三方的ui插件,又想要toast等小效果来完善交互的同学可以试试, 代码中还贡献了一段css能力检测js工具函数,做项目的时候 ...
- WPF圆形环绕的Loading动画
原文:WPF圆形环绕的Loading动画 版权声明:本文为博主原创文章,未经博主允许不得转载. https://blog.csdn.net/yangyisen0713/article/details/ ...
- WPF编游戏系列 之六 动画效果(1)
原文:WPF编游戏系列 之六 动画效果(1) 本篇主要针对界面进行动画效果处理.首先在打开或关闭界面时,使其产生动态效果而不是生硬的显示或消失(如下图).其次在鼠标放到关闭窗口图标上时, ...
- [WPF] 玩玩彩虹文字及动画
1. 前言 兴致来了玩玩 WPF 的彩虹文字.不是用 LinearGradientBrush 制作渐变色那种,是指每个文字独立颜色那种彩虹文字.虽然没什么实用价值,但希望这篇文章里用 ItemsCon ...
- 一个栗子上手CSS3动画
最近杂七杂八的事情很多,很多知识都没来得及总结,是时候总结总结,开启新的篇章- 本篇文章不一一列举CSS3动画的属性,若需要了解API,可前往MDN 在开始栗子前,我们先补补基础知识. css3动画分 ...
随机推荐
- IQueryable与IEnumberable的区别
IEnumerable接口 公开枚举器,该枚举器支持在指定类型的集合上进行简单迭代.也就是说:实现了此接口的object,就可以直接使用foreach遍历此object: IQueryable 接口 ...
- JQuery方法扩展
第一种 extend <!-- extend 扩展jQuery,其实就是增加一个静态方法 --> 定义: $.extend({ sayHello:function(name) { aler ...
- vc如何编译链接opengl库
强烈推荐的一篇强大的OpenGl学习博文OpenGL入门学习 vc2012如何链接opengl库? 首先,我们需要下载opengl的库文件,http://pan.baidu.com/s/1kTsjkZ ...
- 日期字符串转换 and 两个日期相减
//创建当前日期 NSDate *date = [NSDate date]; //创建日期格式类 NSDateFormatter *dateFormat = [[NSDateFormatter all ...
- 数理方程:Fourier变换与卷积
更新:1 APR 2016 关于傅里叶级数参看数理方程:Fourier级数 Fourier变换: 对于满足Dirichlet条件的函数\(f(t)\)在其连续点处定义 \(F(\omega)=\int ...
- 浅析js中的this
this的用法 this在日常javascript编码中很常见, 但是一直以来没有好好总结过. 今天在这里好好总结一下. 本文只讨论浏览器环境. this指向全局 var name = "w ...
- Houdini 13在Ubuntu系统下流畅运行、不崩溃
至尊影视特效软件Houdini FX,当前最新版是13.0.547,经过试用在Ubuntu系统下可以完美运行,目前为止还没出现过崩溃的情况,之前在windows下使用Houdini 13简直就是噩梦, ...
- ruby(html)
有的时候,我们要给汉字标记拼音,让拼音显示要汉字的上面 <ruby>中国人<rp>(</rp><rt>zhong guo ren</rt>& ...
- 001.android初级篇之ToolBar
官方的最新support library v7中提供了新的组件ToolBar,用来替代之前的ActionBar,实现更为弹性的设计在 material design 也对之做了名称的定义:App ba ...
- 密码强度的js插件(完成)
效果如下图: 低: