WPF animate String Array vertically

Total Post:117

Points:821
WPF 
WPF
 1299  View(s)
Ratings:
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.

  1. Post:378

    Points:2694
    Re: WPF animate String Array vertically

    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.

      Modified On Mar-31-2018 12:13:25 AM

Answer