How to trigger an Animation when TextBlock’s Text is changed during a DataBinding

简介:

原文:http://michaelscherf.wordpress.com/2009/02/23/how-to-trigger-an-animation-when-textblocks-text-is-changed-during-a-databinding/

 

        <TextBlock x:Name="tbMessage" Text="{Binding Path=StatusBarText, NotifyOnTargetUpdated=True}">
            <TextBlock.Triggers>
                <EventTrigger RoutedEvent="Binding.TargetUpdated">
                    <BeginStoryboard>
                        <Storyboard>
                            <DoubleAnimation Storyboard.TargetProperty="Opacity" Duration="0:0:0" To="1.0" />
                            <DoubleAnimation Storyboard.TargetProperty="Opacity" Duration="0:0:2" From="1.0" To="0.0" BeginTime="0:0:5" />
                        </Storyboard>
                    </BeginStoryboard>
                </EventTrigger>
            </TextBlock.Triggers>

</TextBlock>



本文转自 sun8134 博客园博客,原文链接: http://www.cnblogs.com/sun8134/p/4174197.html ,如需转载请自行联系原作者

相关文章
|
3天前
|
Android开发
Can t process attribute android:fillColor=@color/camera_progress_delete: references to other resou
Can t process attribute android:fillColor=@color/camera_progress_delete: references to other resou
12 1
|
11月前
|
容器
An InputDecorator, which is typically created by a TextField, cannot have an unbounded width
An InputDecorator, which is typically created by a TextField, cannot have an unbounded width
very important tip - when to add / in binding path Fiori
very important tip - when to add / in binding path Fiori
very important tip - when to add / in binding path Fiori
scn exercise view.setModel will trigger binding creation in Fiori
scn exercise view.setModel will trigger binding creation in Fiori
scn exercise view.setModel will trigger binding creation in Fiori
SAP UI5 view.setModel will trigger binding creation
Created by Wang, Jerry, last modified on May 20, 2015
92 0
SAP UI5 view.setModel will trigger binding creation
why I cannot set SAP UI5 dropdown list as not selected
Created by Wang, Jerry, last modified on Feb 11, 2015
why I cannot set SAP UI5 dropdown list as not selected