Saturday, December 5, 2009

WPF Animation when Databing source is updated.

I find a little time to blog this very nice feature on WPF.
More and more people seems to play with WPF animation.

Sometimes in a multi-user environment, updated data is very
important aspect in computing. Users wants to see what other
people are doing with other data by just their own client machine.

With a Mixture of RTI or any messenging over an infrastructure,
and with CEP concepts, data can be PUSH and PULL over the wire.

To play along for the user if their console will be updated
with the new data, We will use just XAML code to detect if
there are changes with our BindingSource.

Here it is as simple.









Using an EventTrigger with RoutedEvent="Binding.TargetUpdated"
allows the WPF to detect if your datasource has been updated.
If this is true, then the storyboard executes. It changes the specific
textbox (if you set this one on your textbox style) color from blue to transparent.
Remember to set your this Trigger in your style.

Have fun.

Sometimes simple information helps.

2 comments:

Anonymous said...

在你一無所有的時候 是誰在陪伴你 他便是你最重要的人..................................................

Gio said...

you are correct nine..