Get up to 80 % extra points for free! More info:

Shapes in C# .NET WPF

The program uses drawing from the Path class. The Path class is derived from the Shape class, which is derived from the UIElement, respectively the FrameWorkElement, so full interaction options are available within the user interface.

At the same time, because to the Path.Data property can be assigned any geometry (PathGeometry, CombinedGeometry, GeometryGroup), it's possible to render even relatively complex geometric shapes.

Application allows

  • parametrically inserting basic shapes - ellipse, rectangle
  • drawing closed polygons or open compound lines by clicking the mouse button
  • inserting texts as geometric objects, with the selected type, typeface and font size
  • coloring the geometric shapes
  • moving with shapes using mouse
  • combining geometric shapes using union, subtraction, intersection and Xor operations;

The program features Snap to Grid function, which is useful for drawing polygons accurately, or for positioning objects precisely before combining them.

When writting the program, I came across the absence of ColorPicker in WPF. Therefore, my own solution for this feature is included in the application.

If anybody gets lost, all functions can be found either in the main menu or in the context menu by right-clicking on the geometric shape object. If necessary, it's of course possible to contact me.


Gallery

Program was created in 2018.

 

Download

By downloading the following file, you agree to the license terms

Downloaded 28x (313.47 kB)
Application includes source codes in language C# .NET

 

All articles in this section
C# .NET Community Projects - WPF Form Applications
Program has been written for you by Bruno Schwarzbach
Avatar
User rating:
No one has rated this quite yet, be the first one!
Activities