c# - Why a GridLengthAnimation can't control its direction? -
recently, i've wrote 0*2 grid execute it's expand , shrink function. however, when try drag canvas edge of border control it's expanding direction animation. can't.
when add this:
canvas.setbottom(this._usercontrol,0).
it totally changes direction, after lose control.
canvas.setbottom(this._usercontrol, 0); gridlengthanimation d = new gridlengthanimation(); d.from = new gridlength(0, gridunittype.pixel); d.to = new gridlength(_gridrowsslength, gridunittype.pixel); d.reversevalue = _gridrowsslength; d.autoreverse = false; d.duration = timespan.fromseconds(3); d.fillbehavior = system.windows.media.animation.fillbehavior.stop; d.completed += _timers_tick; _gridmain.rowdefinitions[1].beginanimation(rowdefinition.heightproperty, d);
Comments
Post a Comment