zoukankan
html css js c++ java
WPF: Designer and Developer
初次尝试,用Expression Blend设计动画,然后在VS 2008中通过编码将动画指派给需要它的控件,感觉不错。
WPF is interesting! I'm a desinger and developer!!
OutlookBar.xml:
<
UserControl
x:Class
="KingUCLs.OutlookBar"
xmlns
="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x
="http://schemas.microsoft.com/winfx/2006/xaml"
Height
="300"
Width
="300"
>
<
UserControl.Resources
>
<
Storyboard
x:Key
="Storyboard1"
>
<
DoubleAnimationUsingKeyFrames
BeginTime
="00:00:00"
Storyboard.TargetProperty
="(UIElement.Opacity)"
>
<
SplineDoubleKeyFrame
KeyTime
="00:00:01"
Value
="0.5"
/>
<
SplineDoubleKeyFrame
KeyTime
="00:00:02"
Value
="1"
/>
</
DoubleAnimationUsingKeyFrames
>
</
Storyboard
>
</
UserControl.Resources
>
<
Grid
x:Name
="gridMain"
>
<
StackPanel
x:Name
="stackPanel1"
>
</
StackPanel
>
</
Grid
>
</
UserControl
>
OutlookBar.xaml.cs
public
partial
class
OutlookBar : UserControl
{
private
Storyboard _sButtonMouseEnter
=
null
;
public
OutlookBar()
{
InitializeComponent();
Button btnAdd
=
new
Button();
btnAdd.Content
=
"
Add
"
;
btnAdd.Name
=
"
btnAdd
"
;
this
.RegisterName(btnAdd.Name, btnAdd);
Button btnDelete
=
new
Button();
btnDelete.Content
=
"
Delete
"
;
btnDelete.Name
=
"
btnDelete
"
;
this
.RegisterName(btnDelete.Name, btnDelete);
stackPanel1.Children.Add(btnAdd);
stackPanel1.Children.Add(btnDelete);
_sButtonMouseEnter
=
(Storyboard)
this
.FindResource(
"
Storyboard1
"
);
btnAdd.MouseEnter
+=
new
MouseEventHandler(onButtonMouseEnter);
btnDelete.MouseEnter
+=
new
MouseEventHandler(onButtonMouseEnter);
}
public
void
onButtonMouseEnter(
object
sender, RoutedEventArgs e)
{
Storyboard.SetTargetName(_sButtonMouseEnter, ((Button)sender).Name);
_sButtonMouseEnter.Begin((Button)sender);
}
}
}
无需更多的语言了,又O了。
查看全文
相关阅读:
蓝牙4.0BLE抓包(二) – 广播包解析
蓝牙4.0BLE抓包(一)
蓝牙4.0 BLE 广播包解析
蓝牙学习笔记之实例广播数据的解析
Android ConstraintLayout详解
Android ConstraintLayout的基本使用
使用EasyBCD完美实现Windows7与Linux双系统
使用MbrFix.exe修复MBR分区表
C#中的Delegate
C# 设置程序开机自动运行(+注册表项)
原文地址:https://www.cnblogs.com/KingWorld/p/1018782.html
最新文章
JsonPath 语法 与 XPath 对比
20171111
三阶魔方花样玩法,公式汇总
IntelliJ IDEA Debug模式的启动
RSA AES 前端JS与后台JAVA的加密解密的是实现
@Override is not allowed when implementing interface method
6.5 使用函数
java基础之集合List-ArrayList、LinkedList、Vector的差别
LINQ to SQL和Entity Framework对照
APPCAN学习笔记004---AppCan与Hybrid,appcan概述
热门文章
Codeforces 474D Flowers dp(水
Android launcher3 开发初始篇
POJ 2479-Maximum sum(线性dp)
zTree实现清空选中的第一个节点的子节点
驱动开发之 一个简单的截取键盘按键的驱动
敏捷完工与公布检查
使用Kotlin如何startActivity
Fresco-Facebook的图片加载框架的使用
BLE广播数据的抓包解析
Android BLE 总结-源码篇(BluetoothLeAdvertiser)
Copyright © 2011-2022 走看看