Home > DeveloperSection > Forums > WPF animate String Array vertically
jayprakash sharma
jayprakash sharma

Total Post:117

Points:821
Posted on    September-03-2013 5:09 AM

 WPF WPF 
Ratings:


 1 Reply(s)
 669  View(s)
Rate this:

I am trying to display a list control for which string array is used for binding.

I would like to see the string in the array display one each time with a delay - animated.

Please give me a solution.

Thanks in advance.



Sumit Kesarwani

Total Post:378

Points:2694
Posted on    September-03-2013 7:46 AM

Hi Jayprakash,

You need to follow these steps :-

1.     Create a DataTemplate for each entry in the list. This template can just be a ContentControl

2.     Set the ItemsControl.AlternationCount on your list to the maximum value.

3.     Create a behavior that you can tag on each template. This behavior should react on theAssociatedItem's 'Loaded' event.

4.     Have the behavior launch a storyboard for the attached element. Delay the start of the storyboard by AlternationCount * whatever_you_like. You can create a StoryBoard dependency property on the behavior and data bind this in XAML however you see fit.


Hope this will solve your problem.


Don't want to miss updates? Please click the below button!

Follow MindStick