开发者

Invoking storyboard defined in view when ItemsSource is updated

开发者 https://www.devze.com 2023-02-01 04:48 出处:网络
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 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消