I have one observable collection with user control. And I am bind it in listbox. I want to set animation on listbox item. Like when mouse over on user control that time start some storyboard and when mouse leave from listbox item that time set storyboard to stop.
How can i do this?
Any idea?
I have one observable collection with user control. And I am bind it in
Share
You could start by defining your mouse over and mouse leave storyboards on your user control and passing your storyboards to your usercontrol view model in the manner described here:
how to call an animation in mainpage.xaml from login.xaml in silverlight 4
You could then assign mouse over and mouse leave events to your user control. Inside the events you’d cast the sender’s DataContext to the type of your user control view model and then call the appropriate storyboard Begin method off of that view model instance.