I have an element positioned on Canvas
using attached properties Canvas.Top
and Canvas.Left
. Then using animations the element is moved to different set of coordinates, like this:
DoubleAnimation left = new DoubleAnimation( oldLeft, newLeft );
DoubleAnimation top = new DoubleAnimation( oldTop, newTop );
element.BeginAnimation( Canvas.LeftProperty, left );
element.BeginAnimation( Canvas.TopProperty, top );
Is there a way to receive events whenever Canvas.Top
or Canvas.Left
is changed? Preferably without relation to animation.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…