0

I have two controls in grid. I want to make a animation to move a control to the position of another control and with the same size of of another control. Here is part of code:

<Grid x:Name="OutGrid" Width="1280" Height="720" Background="Red">
        <Image x:Name="Img_2" Width="480" Source="Images/0_0012_2.png" HorizontalAlignment="Right" />
        <Image x:Name="Img_1" Width="240" Source="Images/0_0012_2.png" RenderTransformOrigin="0.5,0.5" HorizontalAlignment="Left">
            <Image.RenderTransform>
                <TransformGroup>
                    <TranslateTransform />
                    <ScaleTransform />
                </TransformGroup>
            </Image.RenderTransform>
        </Image>
 </Grid>
Qi Tong
  • 79
  • 2
  • 12
  • Are you sure you want to use scale? Changing the width and height may give you better results. – Gusdor Dec 04 '13 at 14:19
  • Additionally, animations with dynamic values need to be applied from code, not xaml. – Gusdor Dec 04 '13 at 14:20
  • Yes, I need to make a animation. can I use width or height to do it? – Qi Tong Dec 04 '13 at 14:21
  • possible duplicate of [Animate Grid from one position to another](http://stackoverflow.com/questions/10459289/animate-grid-from-one-position-to-another) – Gusdor Dec 04 '13 at 14:23
  • I've got it. Do it with thickness and scaletransform can figure it out. But thickness value need some fix. Thank you very much! – Qi Tong Dec 04 '13 at 15:08

0 Answers0