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了。
查看全文
相关阅读:
配置WebLogic的详细步骤
安装WebLogic的详细步骤
syswrite 函数
利用perl 改写awk统计
第一章 输入和输出基础
CIO必看:跨国集团采购部报表系统的建设经验分享
价值5000元的web报表分享
价值5000元的web报表分享
分页语句 where 条件列和Order by 列 引导列的问题
Java中final修饰参数的作用
原文地址:https://www.cnblogs.com/KingWorld/p/1018782.html
最新文章
JavaScript和JQuery获取DIV的值
EJB相关的面试题
返回值为布尔型引起歧义的面试题
局部变量引起歧义的面试题
Perl 匹配IP或者数字
利用finereport建设保险公司决策分析系统的思路和方法
电信业务支撑报表系统解决方案
电信业务支撑报表系统解决方案
centos linux 实现开机自动运行脚本
centos linux 实现开机自动运行脚本
热门文章
Perl 对象调用方法使用->符号
使用guava从列表中删除重复
使用guava从列表中删除重复
redis SCAN 命令
redis SCAN 命令
JAVA中StringBuffer清空
JAVA中StringBuffer清空
java String.valueOf() 方法的使用
java String.valueOf() 方法的使用
MyEclipse10中配置WebLogic10
Copyright © 2011-2022 走看看