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 ,如需转载请自行联系原作者

相关文章
|
2月前
|
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
11 1
|
7月前
|
移动开发 UED HTML5
什么是 Accessibility 设计领域的 Auto Focus
什么是 Accessibility 设计领域的 Auto Focus
36 0
|
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
|
JavaScript
Element UI - el-table-column 属性之 show-overflow-tooltip 爬坑
Element UI - el-table-column 属性之 show-overflow-tooltip 爬坑
2021 0
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
SAP UI5 view.setModel will trigger binding creation
Created by Wang, Jerry, last modified on May 20, 2015
90 0
SAP UI5 view.setModel will trigger binding creation
the code place where the binding is converted to final value displayed in ui
the code place where the binding is converted to final value displayed in ui
the code place where the binding is converted to final value displayed in ui
|
C#
C#: Get current keyboard layout\input language
原文 https://yal.cc/csharp-get-current-keyboard-layout/   On some occasions, you may want to get a "global" input language - that is, the keyboard layo...
1065 0