wpf - XAML Rotate and Fade Out Animation Together -
i have following code image rotation animation :
<image source="/resources/collage5.jpg" name="myimage"> <!--code rotation animation--> <!--rendertransformorigin="0.5, 0.5">--> <image.rendertransform> <rotatetransform/> </image.rendertransform> <image.triggers> <eventtrigger routedevent="loaded"> <beginstoryboard> <storyboard> <doubleanimation storyboard.targetproperty="(rectangle.rendertransform).(rotatetransform.angle)" to="360" duration="0:0:5" repeatbehavior="forever"/> </storyboard> </beginstoryboard> </eventtrigger> </image.triggers>
and following code fade out animation:
<stackpanel> <image name="myrectangle" source="/resources/collage5.jpg"> <image.triggers> <!--animates rectangle's opacity.--> <eventtrigger routedevent="image.loaded"> <beginstoryboard> <storyboard> <doubleanimation storyboard.targetname="myrectangle" storyboard.targetproperty="opacity" from="1.0" to="0.0" duration="0:0:5"/> </storyboard> </beginstoryboard> </eventtrigger> </image.triggers> </image> </stackpanel>
now, want is, make image rotate once , apply rotation , fade out effect time 1 rotation complete image has faded out completely. how achieve this?
i figured out solution . used begintime tag start second animation after first.
Comments
Post a Comment