Hi all!
Can DoubleAnimations be applied to any double? Or just some?
In WPF, I know you can create a DoubleAnimation object:
var ani = new DoubleAnimation();
..and that object can be used in the BeginAnimation method of UIElements.
In my case, however, I'd like to just apply the animation to the object the the UIElement is bound to. I have a ListBox whose ItemsPanel has been set to be a Canvas, and the ListBoxItems use a converter to set the Canvas.Left and .Top properties, based on the property (call it
public Point Location {get; set; } // this is a lie for brevity; I'm actually raising OnPropertyChanged
)
So I'd like to apply an animation object to Location.X and Location.Y. Can DoubleAnimations be applied to any double? Or just some?
The learning never ends...
Edit #1: I'm being told only dependancy properties. As I suspected. This begs the question, How can the Location property I mentioned be made a dependancy property, so that I can animate ListBoxItems on a canvas?