WPF(鼠标悬停) [英] WPF (mouse hover)
本文介绍了WPF(鼠标悬停)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好
在表达式中混合3 wpf,
我有一个按钮,当用户将鼠标悬停在上面时,我想轻轻地放大它(带有动画),我在Silverlight中没有任何代码(带有状态面板)来做到这一点,但是我无法在wpf应用程序中做到这一点. :((请指导我...:sigh:
Hi,everybody
In expression blend 3 wpf ,
I have a button and I want enlarge it softly(with animation) when user mousehover it ,I did that in silverlight without any code(with state panel ),but I couldn''t do that in wpf application. :(( please guide me... :sigh:
推荐答案
在按钮模板中,您需要为mouseover事件设置触发器.您应该能够
In the buttons template, you need to set a trigger for the mouseover event. You should be able to easily find an example using google.
使用DoubleAnimation在执行MouseOver事件触发器时启动.
有道理吗? ;)
使用Expression Blend可以轻松定义和执行DoubleAnimation.创建一个并运行.
Use DoubleAnimation to start when MouseOver Event Trigger gets executed.
Does it makes sense ? ;)
It is easy to define and execute DoubleAnimation using Expression Blend. Create one and run.
好,我做到了,但是没有任何代码!阅读我的文章
通过鼠标操作无需任何代码即可放大元素! [
ok , I did that but without any code ! read my article
enlarge an element by mouse action without any code ![^]
这篇关于WPF(鼠标悬停)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文