Hey all, I’m trying to apply an animation to any element that gets added to a datatemplate in WP7’s subset of silverlight. I’m having some issues though. While it appears to be quite possible in WPF ( Animate WPF Datatemplate when item added to Listbox? ) using DataTemplate.Triggers, WP7’s silverlight doesn’t have the Triggers property for DataTemplates. As such, how would I go about doing this on the winphone?
Share
I am assuming you have a
DataTemplatethat is used as theListBox.ItemTemplateproperty value in XAML? If this is the case, you should be able to handle theLoadedevent on the root element of theDataTemplatein code behind. This event will be invoked as eachDataTemplate‘instance’ is created, alowing you to fire aStoryboard.