绑定更新时,如何动画WPF文本? [英] Animate WPF Text when binding updates, how?
问题描述
我希望能够到一个文本元素上创建动画渐变时,
结合该元素的更新。换句话说,其效果是,作为
文本被添加到文本框人们看到一个渐变效果的文字更新
然后淡出。我do'nt知道如何实现这一目标。我见过类似的东西
使用的EventTrigger
在 RoutedEvent
如 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?
感谢。
推荐答案
我得到了这个工作。该解决方案可以在这里找到...
<一href=\"http://michaelscherf.word$p$pss.com/2009/02/23/how-to-trigger-an-animation-when-textblocks-text-is-changed-during-a-databinding/\">http://michaelscherf.word$p$pss.com/2009/02/23/how-to-trigger-an-animation-when-textblocks-text-is-changed-during-a-databinding/
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屋!