2

In Flash this question is answered really easy because you can set the X and Y coordinates of an object:

newxpos = object._x;
newypos = object._y;

How do you do the same in Silverlight?

animuson
  • 53,861
  • 28
  • 137
  • 147
Ry.
  • 173
  • 3
  • 13

3 Answers3

8

Place the object inside a canvas element and then use:

Canvas.SetLeft(object, value);
Canvas.SetTop(object, value);
Spencer Ruport
  • 34,865
  • 12
  • 85
  • 147
0

The Canvas works if you want fixed positions. If you want relative positions or positions that are controlled in a more dynamic manner, you want to look into putting your controls inside a StackPanel or a FlowPanel or a WrapPanel, etc.

Kevin Hoffman
  • 5,154
  • 4
  • 31
  • 33
0

Canvas.SetLeft(object, value); is a good feature but if you control changes ownership dynamically it's better to target the control itself with "yourcontrolname".SetValue(Canvas.LeftProperty, value);