I am trying to create such an effect as here ru.4game.com/lineage2/install (when using the mouse wheel, the pictures are separated) I created several pictures, cut them and when I press the button I want to get this effect, but it works only with two (scrolls one over the other and then changes again to the first from the second) How to do with the others?

private void AnimUp(Image img) { im4_4.Margin = new Thickness(673, 686, -5, -686); var animUp = new ThicknessAnimation(); var animUp1 = new ThicknessAnimation(); if (img.Margin == new Thickness(673, 0, -4, 0)) { animUp.To = new Thickness(673, -688, -4, 0); animUp1.To = new Thickness(673, 0, -4, 0); } animUp.Duration = TimeSpan.FromMilliseconds(500); animUp1.Duration = TimeSpan.FromMilliseconds(500); img.BeginAnimation(Image.MarginProperty, animUp); im4_4.BeginAnimation(Image.MarginProperty, animUp1); } private void AnimDw(Image img) { im4.Margin = new Thickness(0, -687, 0, 0); var animDw = new ThicknessAnimation(); var animDw1 = new ThicknessAnimation(); if (img.Margin == new Thickness(0, 0, 0, 0)) { animDw.To = new Thickness(0, 687, 0, -687); animDw1.To = new Thickness(0, 0, 0, 0); } animDw.Duration = TimeSpan.FromMilliseconds(500); animDw1.Duration = TimeSpan.FromMilliseconds(500); img.BeginAnimation(Image.MarginProperty, animDw); im4.BeginAnimation(Image.MarginProperty, animDw1); } private void btnSlide_Click(object sender, RoutedEventArgs e) { AnimDw(im5); AnimUp(im5_5); } 

    1 answer 1

    Add pictures of the substrate (initially hidden). As soon as the animation is over, you place the desired image on the substrates and display it, and hide the pictures with which the animation was done. When they are hidden, return to the original coordinates. Before the next animation, the procedure is repeated. We hide the substrates, and the workers show and launch the animation. The user will not notice anything, and you will get the desired effect.