locked
DoubleAnimation with CompositeTransform & TranslateX/TranslateY

    Question

  • I have an Ellipse in my app that I want to animate using an animation. Here is my current code (piece is the Ellipse):

    Dim droppieceanimation As New DoubleAnimation()
    Dim droppieceboard As New Storyboard()
    droppieceanimation.To = (8 - Me.count(Me.lastplayed)) * 100
    Storyboard.SetTarget(droppieceanimation, piece)
    Storyboard.SetTargetProperty(droppieceanimation, "(UIElement.RenderTransform).(TranslateTransform.Y)")
    droppieceboard.Begin()

    However, this gives me the following error message:

    Cannot resolve TargetProperty (UIElement.RenderTransform).(TranslateTransform.Y) on specified object.

    Am I specifying the property incorrectly? I tried every way I could think of, but none of them seemed to work. Any ideas? Thanks.


    Nathan Sokalski njsokalski@hotmail.com http://www.nathansokalski.com/

    Monday, November 17, 2014 9:14 PM

Answers

  • OK, I found my answer. I just had to add a TranslateTransform to the Ellipse before doing the animation. I guess the error was just a little misleading.

    Nathan Sokalski njsokalski@hotmail.com http://www.nathansokalski.com/

    Tuesday, November 18, 2014 1:11 AM

All replies

  • OK, I found my answer. I just had to add a TranslateTransform to the Ellipse before doing the animation. I guess the error was just a little misleading.

    Nathan Sokalski njsokalski@hotmail.com http://www.nathansokalski.com/

    Tuesday, November 18, 2014 1:11 AM
  • Good to know it. Vote:)


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Tuesday, November 18, 2014 5:53 AM
    Moderator