动画WPF文本绑定更新时,怎么样? [英] Animate WPF Text when binding updates, how?
问题描述
当
绑定到该元素更新时,我想要能够在文本元素上创建一个淡入淡出的动画。换句话说,效果是,当
文本被添加到文本框中时,会看到一个衰落效果,因为文本更新
然后淡出。我不知道如何实现这一点。在$ code> RoutedEvent 中,使用 EventTrigger
看到类似的
,例如 FrameworkElement .Loaded
,但是如何检测绑定更新?
I want to be able to create a fade animation on a text element when the
binding to that element updates. In other words, the effect is that as
text gets added to a text box one sees a fading effect as the text updates
and then fades out. I do'nt know how to achieve this. I have seen something similar
using an EventTrigger
on a RoutedEvent
such as FrameworkElement.Loaded
but how does one detect when a binding updates?
谢谢。
推荐答案
我有这个工作。解决方案可以在这里找到...
http://michaelscherf.wordpress.com/2009/02/23/how-to-trigger-an-animation-when-textblocks-text-is换一个数据绑定/
I got this working. The solution can be found here ... http://michaelscherf.wordpress.com/2009/02/23/how-to-trigger-an-animation-when-textblocks-text-is-changed-during-a-databinding/
这篇关于动画WPF文本绑定更新时,怎么样?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!