I think from memory (been a while since i played with scaletransforms) they
aren't using the Property notification (much like Margin). I think you have
to new-up a new transform?

imgWatermark.RenderTransform).Children[1] = new ScaleTransform(0,0,0,0);

---
Regards,
Scott Barnes
http://www.riagenic.com


On Thu, Jul 7, 2011 at 2:23 PM, Greg Keogh <[email protected]> wrote:

> I have an animation that zooms a logo image into view. The Storyboard (not
> shown) begins and animates the Angle, ScaleX and ScaleY values creating a
> nice spin and zoom-out effect. The trouble is, I can’t set the Scale values
> back to 0.0 again so that the image is hidden and the animation is ready to
> being again. The control is defined like this:****
>
> ** **
>
> <Image x:Name="imgWatermark" Width="500" Height="375">****
>
>   <Image.RenderTransform>****
>
>     <TransformGroup>****
>
>       <RotateTransform Angle="0" CenterX="250" CenterY="187" />****
>
>       <ScaleTransform CenterX="250" CenterY="187" ScaleX="0.0" ScaleY
> ="0.0"/>****
>
>     </TransformGroup>****
>
>   </Image.RenderTransform>****
>
> </Image>****
>
> ** **
>
> Later I do this to “hide” the image again ready for another zoom out.****
>
> ** **
>
> ScaleTransform st = ((TransformGroup
> )imgWatermark.RenderTransform).Children[1] as ScaleTransform;****
>
> st.ScaleX = 0.0;****
>
> st.ScaleY = 0.0;****
>
> ** **
>
> However, this code results in no visible effect. What trick am I missing?*
> ***
>
> ** **
>
> Greg****
>
> ** **
>
> ** **
>
> ** **
>

Reply via email to