Jason94
Jason94

Reputation: 13608

Can I move a figure after creating it?

I'm trying to create shapes with c# to my xaml application, the best way to do it would be create a shape at 0,0, draw the lines and then move the shape to its location.

Is it possible? Is it me or does not Path, PathGeometry or PathFigure have move?

Upvotes: 0

Views: 78

Answers (2)

Mani
Mani

Reputation: 1374

You can move the shape to another location either by setting the location to another point by code or in xaml itself. But if u want an animation, then refer to some tutorials. I would recommend you to trial all animations using Blend.

Some link on how to do animation: http://dotnetapp.com/blog/2012/08/26/how-to-create-simple-animation-in-your-windows-phone-app/

Upvotes: 1

DotNetRussell
DotNetRussell

Reputation: 9857

In order to move UI elements you need to either set a new margin thickness or you need to put it on a canvas and set its canvas position. If you wanted it animated do the above but put it in a timer tick event.

Upvotes: 0

Related Questions