Search code examples
c#xamlanimationwindows-phone-8windows-phone

windows phone Image Translation (movement/animation)


Im trying to animate a image that moves from the right side of the screen to the left, i guess thats what translate is for, but not really sure how it works, or whats the best solution. So far i have this:

        <Image Height="50" Width="50" Source="/Assets/Img/cloud.png" Stretch="Uniform">
            <Image.RenderTransform>
                <TranslateTransform x:Name="p1Translate" X="0" Y="0"/>
            </Image.RenderTransform>
        </Image>

Which is nothing! So can someone help me, translate the cloud.png just in the X axis?

Greets, José Correia


Solution

  • Did you try using the CompositeTransform for your image? You could use Blend to come up with a storyboard animation.

    XAML storyboard animation moving images from outside viewport-windows phone 8

    For further reference:

    Images Animation By Using Story Board in Windows Phone 8/8.1