Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

items animation within a itemscontrol

$
0
0

Hello forum,

i've got an ItemsControl that uses a WrapPanel for its ItemsControl.ItemsPanel template. At runtime i am adding UserControls to this ItemsControl. Now i want to implement some sorting to sort all UserControls. When sorting i want to display some fancy animation. If the user presses the sort button i want to trigger following animation:

- every UserControl rotates between -10 and +10 degree, randomly generated for every UserControl

- then, every UserControl moves to the center of my ItemsControl control

The end result should look like a bunch of unsorted UserControls. After local sorting is done i want that all UserControls are moving back to the right position within the WrapPanel.

Can someone point me to the right direction how? How can i move/rotate a UserControl within a WrapPanel. Can you do this without a Canvas control for every UserControl?

I've created a DoubleAnimation for every UserControl within the ItemsControl. The DoubleAnimation is set up to animate the TranslateTransform.XProperty (or RotateTransForm.AngleProperty), but the animation isn't working. 

Many thanks in advance.

regards,

xxxcoderxxx



Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>