0

I've decided to learn a bit of WPF and I've created an application with the Mahapps Metro library and it interacts with a SQLite database (Unrelated but a bit of background).

I'd like to draw an object, let's say a triangle, in a new window.

I've seen this - Click - but the drawing of the shape needs to be visible to the user. So the user will see the line being drawn from point A to B to C to A. The image will "reload" after a few seconds i.e. Clearing the window/canvas and redrawing the triangle.

Are they any libraries out there that might make this easier or does WPF have something else I can use to achieve this?

Also, the redrawing of the triangle will be in a separate thread running a loop. Something tells me this isn't going to be very efficient. Is there a better way initiate a "redraw"?

chickenbeef
  • 170
  • 10

1 Answers1

0

My "answer" are some helpful searches and a few results that might help you get to the next step of deciding on a design that works for you.

Yes, WPF does have facilities to help you achieve some animation in drawing lines.

I searched for "wpf animate line drawing" and some interesting links for your research are:

How do you animate a line on a canvas in C#?

generating animated line

Drawing line "slowly" programmatically with wpf

Hopefully this gets you going in a good direction. Best of luck with your project.

Community
  • 1
  • 1
Kory Gill
  • 6,993
  • 1
  • 25
  • 33
  • Thank you, your links were most helpful. You also gave me the "correct" search terms I could use to get the information I need. – chickenbeef Mar 06 '16 at 13:36