I did not knew that this simple thing would be slightly complicated. I have a Canvas in which I am trying to add Ellipse dynamically. Here is the code:
The reason 100 doesn't work is that SetValue() interprets it as an integer, but Canvas.Top & Canvas.Left are doubles. Try 100d instead. Also SetLeft() & SetTop() work because they expect doubles.