How can I move an object left and right with silverlight?
Posted
by Craig
on Stack Overflow
See other posts from Stack Overflow
or by Craig
Published on 2010-05-20T18:58:02Z
Indexed on
2010/05/20
19:00 UTC
Read the original article
Hit count: 213
I currently have two buttons that say left and right, and I want them to move a square object left and right respectively.
What its currently doing when i press left is moving the square to the left, and if I press left again, it resets from the center and goes left.
I want it so that when I press left, from where ever it is currently to go left and right.
I know the principle is something like get current objects position and add the canvas coordinates respectively but how do I do this?
© Stack Overflow or respective owner