c# - WPF Control disappears when is is animated with DoubleAnimation -
i have textbox(toanimate) , button(toclick). when click button, textbox disappears. should move on x position 20 units.
did wrong?
//double left = canvas.getleft(toanimate); returned wrong value. translatetransform tanl = new translatetransform(); vector pos = visualtreehelper.getoffset(toanimate); double left = pos.x; toanimate.rendertransform = tanl; doubleanimation doua = new doubleanimation((left + 20), left, timespan.fromseconds(3)); tanl.beginanimation(translatetransform.xproperty, doua);
Comments
Post a Comment