ArrangeOverride Vs Storyboard Animation
- by user275561
Now I may not grasp the idea or this could be a mistake so feel free to correct me. I am doing a bubble breaker game in Silverlight. So when a bubble in a column gets bursted. I want to animate the above bubbles to simulate that they are being dropped. Each bubble knows its Row and column location and that gets updated in the View Model. Now my question is, Should I call invalidateArrange() on the Canvas from the ViewModel so it rearranges the bubbles or just have a storyboard animate the TranslateY.
In my arrangeOverride Method I have something like this
Rect childBounds = new Rect(CalculateLeft(dataContext.Column), CalculateTop(dataContext.Row), BubbleSize, BubbleSize);
child.Arrange(childBounds);
If there is a better way let me know. I am trying to learn the best practices.