wpf - How to zoom in on a image when Image.MouseEnter fires? -


I would like to zoom in on a image when Image.MouseEnter Fire and then zoomed out when Image.MouseLeave seems to fire, I thought of making a trigger, but there was no luck.

This is what I have tried so far:

   & Lt; /Image.RenderTransform> & Lt; Image.Triggers & gt; & Lt; EventTrigger Routing Avent = "Image.MoinEnter" & gt; & Lt; BeginStoryboard & gt; & Lt; Storyboard & gt; & Lt; Double animation storyboard TargetName = "TransRotate" storyboard. TargetProperty = "ScaleX" = "0" from = "100" Start Time = "0: 0: 0" Duration = "0: 0: 10" Autorvers = "False" /> & Lt; Double animation storyboard Target = "transorotate" storyboard. Target = "0" from = "100" start = "0: 0: 0" period = "0: 0: 10" auto-rowers = "falls" /> & Lt; / Storyboard & gt; & Lt; / BeginStoryboard & gt; & Lt; / EventTrigger & gt; & Lt; /Image.Triggers> & Lt; / Image & gt;   

Is this the right way, or is there a better way?

I will remove the property from , this animation jumps, its Besides, you only feel the lack of reverse animation at MouseLeave . Apart from this, you can set from Image to 0.5.0.5 to focus the zoom.

Instead of using those two incidents, I usually like the trigger, with IsMouseOver and more.

If you want to keep the location, then you can place it in a container in the set size and set the ClipToBounds to the right.

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -