Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create a WPF Shape Editor? [closed]

I'm trying to create a WPF Shape (PolyLine) editor, which is a control that I want to use to, edit shapes in a canvas.

What the editor needs to do is to be able to display the points and lines of the shape and to move those around.

Can anyone provide me with a idea of how I can accomplish this, or a starting point? I haven't found anything related to how I could do this, so far.

like image 898
Pop Catalin Avatar asked Oct 28 '08 18:10

Pop Catalin


2 Answers

There is good series of texts about this on CodeProject

WPF Diagram Designer - Part 1

WPF Diagram Designer - Part 2

WPF Diagram Designer - Part 3

WPF Diagram Designer - Part 4

like image 146
Robert Vuković Avatar answered Oct 04 '22 11:10

Robert Vuković


I also liked the WPF DrawTools article on CodeProject, which has a very nicely formatted set of source classes. It provides a simpler example of outline shapes - ellipse, rectangle, line, polyline and text. Unfortunately, it was deleted in 2015, as someone just pointed out to me.

A copy of the article is available through the Wayback Machine but the linked source code has been deleted along with the original article. The article includes class diagrams and enough detail to give you a good idea of the overall design.

Nowadays I think it's worth looking at Kimono Designer, although it seems to have been announced to a lot of excitement and the code hasn't been updated for a year. Note there is a WPF port, as discussed in this article and sample on GitHub.

like image 23
Andy Dent Avatar answered Oct 04 '22 09:10

Andy Dent