locked
Image Transitions doesn't work

    Question

  • Hello,
    I don't know why but, the code below doesn't work. No bugs but, anything happen.

    <Canvas>
            <Image x:Name="logo4" HorizontalAlignment="Left" Height="212" Width="501" Source="Assets/logo4.png" Stretch="None" Canvas.Left="450" Canvas.Top="197">
                <Image.Transitions>
                    <TransitionCollection>
                        <EntranceThemeTransition/>
                    </TransitionCollection>
                </Image.Transitions>
            </Image>    
        </Canvas>
    
    
    

    Thanks,

    Rod

    Sunday, September 14, 2014 8:35 PM

Answers

  • Hi Rodrigo,

    Thanks for your information, indeed, animation does not work on image, but it works with button. But I don't see any documentation mention image does not work with entranceThemeTransition, I will consult to see if we can get some explanation.

    However here I have a quick solution for you:

                <Border Height="194" Canvas.Left="91" Canvas.Top="324" Width="339">
                    <Border.Transitions>
                        <TransitionCollection>
                            <EntranceThemeTransition FromHorizontalOffset="400"></EntranceThemeTransition>
                        </TransitionCollection>
                    </Border.Transitions>
                    <Image  Source="Assets/StoreLogo.png" />
                </Border>

    You should be able to see the transition for the image.

    --James


    <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, September 16, 2014 6:16 AM
    Moderator

All replies

  • Hi Rodrigo,

    What is your expect behavior? The documentation of EntranceThemeTransition class mentioned:

    Provides the animated transition behavior on controls when they first appear. You can use this on individual objects or on containers of objects. In the latter case, child elements will animate into view in sequence rather than all at the same time.

    --James


    <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.

    Monday, September 15, 2014 1:42 AM
    Moderator
  • Hi James,

    If I try the same code with a <Button.../> works ok but, with an <Image...> the transition doesn't run.

    Rodrigo

    Tuesday, September 16, 2014 12:17 AM
  • Hi Rodrigo,

    Thanks for your information, indeed, animation does not work on image, but it works with button. But I don't see any documentation mention image does not work with entranceThemeTransition, I will consult to see if we can get some explanation.

    However here I have a quick solution for you:

                <Border Height="194" Canvas.Left="91" Canvas.Top="324" Width="339">
                    <Border.Transitions>
                        <TransitionCollection>
                            <EntranceThemeTransition FromHorizontalOffset="400"></EntranceThemeTransition>
                        </TransitionCollection>
                    </Border.Transitions>
                    <Image  Source="Assets/StoreLogo.png" />
                </Border>

    You should be able to see the transition for the image.

    --James


    <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, September 16, 2014 6:16 AM
    Moderator