How to trigger an Animation when TextBlock’s Text is changed during a DataBinding
2014-12-19 16:28
225 查看
原文: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>
相关文章推荐
- How to display an empty row when the underlying dataset is empty
- How to queue a heartbeat to get faster when an enemy is near
- How to bind to data when the DataContext is not inherited【项目】
- [WPF] How to bind to data when the DataContext is not inherited
- How to import data from a text file to a ACCESS table
- [eZ publish] When a ezxml embed an video, how to get the ezxml object in the video embed template?
- How to provide animation when calling another activity in Android?( from Stack overflow)
- An Introduction to XML Data Binding in C++(转载)
- How To Use a DataReader Against an Oracle Stored Procedure in Visual C# .NET
- How to populate the datagrid on background thread with data binding by using Visual C#
- [转]How to remove an assembly from the Cache if it is locked by Microsoft Installer
- How to solve install error ".NET Framework 2.0 is not detected." when installing VS tools SDK for GP 10.0
- System.Data.SqlClient.SqlException: Cannot insert explicit value for identity column in table 'Food' when IDENTITY_INSERT is set to OFF
- How to bind a GridView to a list of multiple types? NHibernate proxy causing problems with databinding [From stack overflow]
- An example to show how to make Tree structure data table in SQL server
- How to let FIR open a URL when you click an image
- How to transfer data to an Excel workbook by using Visual C# 2005 or Visual C# .NET
- A more elegant solution to display GridView header and footer when the data source is empty. (cite)
- How to solve the problem witch is the system send many emails when cron have something wrong
- How to get the rowid when insert the data to Oracle database