views:

32

answers:

0

Hi...

i have implemented zooming and panning on a canvas. i also implemented zoom animation on the canvas. But when i begin zoom animation then i'm not able to pann canvas. please have a look at the following XAML for Zoom Animation.

 <Canvas x:Name="cnVProductMain" Background="#FF0CE836">
                                <Canvas.Resources>
                                    <Storyboard x:Name="ZoomStoryboard" Duration="0:0:1">
                                        <DoubleAnimation x:Name="ZoomAnimationX"
                                 Storyboard.TargetName="cnVProductMain" 
                                 Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" 
                                 Duration="0:0:1"/>
                                        <DoubleAnimation x:Name="ZoomAnimationY"
                                 Storyboard.TargetName="cnVProductMain" 
                                 Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" 
                                 Duration="0:0:1"/>
                                    </Storyboard>
                                </Canvas.Resources>


  <Canvas.RenderTransform>
     <TransformGroup x:Name="transformGroup">
        <ScaleTransform x:Name="scaleTransform" ScaleX="1" ScaleY="1"/>
            <TranslateTransform x:Name="translateTransform" />
        </TransformGroup>
</Canvas.RenderTransform>
 <Border Height="Auto" Width="Auto" BorderBrush="{x:Null}" BorderThickness="1,1,1,1" Margin="0" x:Name="brdImage" Background="{x:Null}" Visibility="Collapsed"/> 

</Canvas>