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了。
查看全文
相关阅读:
feign的callback设定后,项目启动错误
spring boot工程打成JAR包到服务器上运行
jar包的启动和停止脚本
tomcat启动时出现了Failed to start component [StandardEngine[Catalina].StandardHost[localhost]]
maven的多环境配置
oracle 按照时间间隔进行分组
Oracle执行计划
ajax传JSON时设置的contenttype导致JAVA中request.getParameter("")怎么也接收不到数据
[转]动态代理
[转]一文读懂《梁宁·产品思维30讲》最精华内容(含全套PPT)
原文地址:https://www.cnblogs.com/KingWorld/p/1018782.html
最新文章
SAR指标(转)
关于403 由于扩展配置问题而无法提供您请求的页面的问题(转)
怎样写一个PC端使用的操盘手软件(用来买卖股票,查看报表,行情)
ATR的计算
利用rqalpha帅选股票 1
火币网行情获取的websocket客户端
python一个简单的websocket测试客户端
python一个简单的打包例子
详解java设计模式之责任链模式
java 消息机制 ActiveMQ入门实例
热门文章
tomcat 和 jboss access log 日志输出详解
DDOS攻击原理及防护方法论
WAF防火墙介绍
linux bash 和 sh的区别
zookeeper简单介绍
Zookeeper的安装的配置
Java之JMX 详解
深入剖析ConcurrentHashMap 一
Kafka监控工具KafkaOffsetMonitor配置及使用
spring boot整合activemq消息中间件
Copyright © 2011-2022 走看看