zoukankan
html css js c++ java
WPF(1)Hello,WPF
以下是一段简单的say hello动画,说是简单,可自己也费了九牛之力啊
在Kaxaml中编辑, 用Xaml Hack 也可打开查看效果。由于对一些语法,属性还不熟悉,所以得借助Kaxaml所带的提示功能,比较郁闷的是这软件有时会因一些语法错误而导致直接退出
<
Page
xmlns
=
"
http://schemas.microsoft.com/winfx/2006/xaml/presentation
"
xmlns:x
=
"
http://schemas.microsoft.com/winfx/2006/xaml
"
>
<
Canvas
>
<
Canvas.Triggers
>
<
EventTrigger RoutedEvent
=
"
Canvas.Loaded
"
>
<
EventTrigger.Actions
>
<
BeginStoryboard
>
<
Storyboard BeginTime
=
"
0
"
Duration
=
"
Forever
"
>
<!--
"
hello
"
Animation
-->
<
DoubleAnimation Storyboard.TargetName
=
"
hello
"
Storyboard.TargetProperty
=
"
(Canvas.Left)
"
From
=
"
0
"
To
=
"
500
"
BeginTime
=
"
0:0:0
"
Duration
=
"
0:0:1.5
"
/>
<
DoubleAnimation Storyboard.TargetName
=
"
skew
"
Storyboard.TargetProperty
=
"
AngleX
"
AutoReverse
=
"
True
"
DecelerationRatio
=
"
0.5
"
From
=
"
0
"
To
=
"
30
"
BeginTime
=
"
0:0:1
"
Duration
=
"
0:0:0.8
"
/>
<
DoubleAnimation Storyboard.TargetName
=
"
hello
"
Storyboard.TargetProperty
=
"
(Canvas.Left)
"
To
=
"
300
"
BeginTime
=
"
0:0:3
"
Duration
=
"
0:0:0.5
"
/>
<!--
"
W
"
Animation
-->
<
DoubleAnimation Storyboard.TargetName
=
"
tbw
"
Storyboard.TargetProperty
=
"
(Canvas.Left)
"
From
=
"
350
"
To
=
"
550
"
BeginTime
=
"
0:0:3
"
Duration
=
"
0:0:0.35
"
/>
<
DoubleAnimation Storyboard.TargetName
=
"
tbw
"
Storyboard.TargetProperty
=
"
(Canvas.Top)
"
From
=
"
0
"
To
=
"
180
"
BeginTime
=
"
0:0:3
"
Duration
=
"
0:0:00.35
"
/>
<!--
"
P
"
Animation
-->
<
DoubleAnimation Storyboard.TargetName
=
"
tbp
"
Storyboard.TargetProperty
=
"
(Canvas.Left)
"
From
=
"
400
"
To
=
"
700
"
BeginTime
=
"
0:0:3.5
"
Duration
=
"
0:0:0.3
"
/>
<
DoubleAnimation Storyboard.TargetName
=
"
tbp
"
Storyboard.TargetProperty
=
"
(Canvas.Top)
"
From
=
"
0
"
To
=
"
180
"
BeginTime
=
"
0:0:3.5
"
Duration
=
"
0:0:0.3
"
/>
<!--
"
F
"
Animation
-->
<
DoubleAnimation Storyboard.TargetName
=
"
tbf
"
Storyboard.TargetProperty
=
"
(Canvas.Left)
"
From
=
"
450
"
To
=
"
800
"
BeginTime
=
"
0:0:4
"
Duration
=
"
0:0:0.3
"
/>
<
DoubleAnimation Storyboard.TargetName
=
"
tbf
"
Storyboard.TargetProperty
=
"
(Canvas.Top)
"
From
=
"
0
"
To
=
"
180
"
BeginTime
=
"
0:0:4
"
Duration
=
"
0:0:0.3
"
/>
</
Storyboard
>
</
BeginStoryboard
>
</
EventTrigger.Actions
>
</
EventTrigger
>
</
Canvas.Triggers
><!--
Insert
this
sample
as
the child of a Page, Grid, Canvas, Button, or other container
-->
<
TextBlock x:Name
=
"
hello
"
Canvas.Top
=
"
218
"
FontFamily
=
"
Segoe, Segoe UI, Arial
"
FontWeight
=
"
Bold
"
FontSize
=
"
80pt
"
Foreground
=
"
Chartreuse
"
Text
=
"
Hello
"
>
<
TextBlock.RenderTransform
>
<
SkewTransform x:Name
=
"
skew
"
CenterX
=
"
50
"
CenterY
=
"
200
"
>
</
SkewTransform
>
</
TextBlock.RenderTransform
>
</
TextBlock
>
<
TextBlock x:Name
=
"
tbw
"
Text
=
"
W
"
FontSize
=
"
100pt
"
FontWeight
=
"
Bold
"
Canvas.Top
=
"
-1000
"
></
TextBlock
>
<
TextBlock x:Name
=
"
tbp
"
Text
=
"
P
"
FontSize
=
"
100pt
"
FontWeight
=
"
Bold
"
Canvas.Top
=
"
-1000
"
>
</
TextBlock
>
<
TextBlock x:Name
=
"
tbf
"
Text
=
"
F
"
FontSize
=
"
100pt
"
FontWeight
=
"
Bold
"
Canvas.Top
=
"
-1000
"
>
</
TextBlock
>
</
Canvas
>
</
Page
>
查看全文
相关阅读:
Linux命令
Linux目录说明
python推导式
python公共方法
python集合
python字典
python元组
python列表
python字符串常用操作方法
C语言编译过程
原文地址:https://www.cnblogs.com/anders06/p/1151512.html
最新文章
mac上的visual studio code 插件开发(纯记录,持续更新)
superset连接es中的日期格式问题及解决
python+mac+matplotlib 中文乱码问题完美解决,绝对简单
mac os 中安装mysql-python
DbVisualizer配置连接hive
在Spark中使用fastutil
Java+Spark 实现 flatMapToPair 的lambda函数时遇到的问题及解决方法
centos下python安装包的一些问题记录
Hive作业
使用 MapReduce 实现分组排名
热门文章
Python实现Adaboost
Python实现SVM(Support Vector Machine)
Python实现感知机(Perceptron)
Python实现决策树2(CART分类树及CART回归树)
Python实现决策树1(ID3及C4.5)
Python实现朴素贝叶斯分类器
Python实现softmax回归
Python实现逻辑回归(Logistic Regression)
Python实现线性回归3,局部加权线性回归,lasso回归,岭回归
Python实现线性回归2,梯度下降算法
Copyright © 2011-2022 走看看