tags:

views:

13

answers:

1

Is animation for custom properties of array type supported? Animation for simple properties (of Point type for example) works fine for me. When I changed property to PointCollection type the code stopped working with the error: cannot resolve TargetProperty Points[0] on specified object.

Property is defined as

    public static readonly DependencyProperty PointsProperty =
        DependencyProperty.Register("Points",
        typeof(PointCollection),
        typeof(Bone),
        new PropertyMetadata(new PropertyChangedCallback(OnPointsChanged)));

    public PointCollection Points
    {
        get { return (PointCollection)GetValue(PointsProperty); }
        set { SetValue(PointsProperty, value); }
    }

Timeline is created from code as

    Storyboard.SetTarget(tlArr, obj);
    Storyboard.SetTargetProperty(tlArr, new PropertyPath("Points[0]"));

Any ideas?

A: 

A lot of the transform animations using indexing into arrays of properties, so that simple case at least is certainly possible.

(Can you provide your XAML as well, so we can play with the code and see what is possible. Getting the syntax for accessing child-members right requires a bit of interaction?)

Enough already
That the reason why I was quite surprised when it did not work. I added code snippet for animation creation
AlexEzh