Invoking storyboard defined in view when ItemsSource is updated
I am trying to build some notification contro开发者_如何学运维l in Silverlight. When I click the notification icon it shows/hides the notification window which contains all notification messages.
I have an ItemsControl
in view whose ItemsSource
is binded to an ObservableCollection in presenter.
I want to invoke a Storyboard defined in view whenever ItemSource (i.e. ObservableCollection in Presenter) is updated.
Is it possible with EventTriggers
? if yes how?
Can I invoke Storyboard from presenter, if yes how? And is it a bad idea to invoke Storyboard from presenter?
Here is a complete example using an Expression Blend behavior BeginStoryBoardAction
together with a custom DataChangedTrigger
: wp7 listboxitem animation on bound data changes (mvvm)
You can still use Blend behaviors even if you don't have Blend, you just need the Blend SDK.
精彩评论