locked
Storyboard.TargetPropertyName syntax.

    Question

  • Hi all,

    I want to be able to animate and object that is part of a runtime generated collection within another object.  I do not know the name of the objects in the collection.  This is to do with the MultiscaleImage control.  At runtime it fills it' SubImages property with as many MultiScaleSubImage objects as there are images in the deep zoom composition.  I can then change the position of those subimages as follows:

    msi.SubImages[1].SetValue(MultiScaleSubImage.ViewportOriginProperty, new Point(-0.3, -0.68))

    I'm struggling with what the Storyboard.TargetPropertyName string should be to be able to animate one of those objects.  So far I have this (that doesn't work)

    .... Storyboard.TargetName="msi" Storyboard.TargetProperty="(SubImages.Children)[1].(MultiScaleSubImage.ViewportOrigin).X ...

    Any ideas?

    Thanks in advance,

     Dave

    Monday, March 17, 2008 7:07 AM

Answers

  • Hi:

      Please try this:

                <PointAnimation Duration="0:0:0.1" Storyboard.TargetName="msi" Storyboard.TargetProperty="msi.SubImages[1].ViewportOrigin"  To="-0.3, -0.68">
                   
                </PointAnimation>

    Regards

    Thursday, March 20, 2008 5:38 AM

All replies

  • Hi:

      Please try this:

                <PointAnimation Duration="0:0:0.1" Storyboard.TargetName="msi" Storyboard.TargetProperty="msi.SubImages[1].ViewportOrigin"  To="-0.3, -0.68">
                   
                </PointAnimation>

    Regards

    Thursday, March 20, 2008 5:38 AM
  • Thanks very much for this.  It suddenly came to me about 10 minutes ago, spooky.

     All the best,

    Dave

    Thursday, March 20, 2008 5:58 AM