windows runtime - WinRT Animation: Return rectangle properties to original states -


i changing appearance of 2 rectangles when 1 of them tapped. following code works fine on tap. when released tap, rectangles not return original states.

what missing?

            <storyboard x:name="recttapped">                 <doubleanimation duration="0" to="0" storyboard.targetproperty="(uielement.opacity)" storyboard.targetname="recttop" d:isoptimized="true"/>                 <coloranimation duration="0" to="#ff43a047" storyboard.targetproperty="(shape.fill).(solidcolorbrush.color)" storyboard.targetname="rectbottom" d:isoptimized="true"/>             </storyboard> 

the storyboard triggered behaviors

   <rectangle x:name="rectbottom" fill="#ff317434" horizontalalignment="left" height="42" radiusy="6" radiusx="6" strokethickness="0" strokelinejoin="round" width="320" margin="0" tapped="rectangle1_tapped"/>                         <rectangle x:name="recttop" fill="#ff43a047" horizontalalignment="left" height="42" radiusy="6" radiusx="6" strokethickness="0" strokelinejoin="round" width="320" margin="0,-9,0,0">                             <interactivity:interaction.behaviors>                                 <core:eventtriggerbehavior eventname="tapped">                                     <media:controlstoryboardaction storyboard="{staticresource recttapped}"/>                                 </core:eventtriggerbehavior>                             </interactivity:interaction.behaviors>                          </rectangle> 

try use event pointerpressed turn on animation , pointerreleased returning back


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

jquery - javascript onscroll fade same class but with different div -