Tag Archives: DrawPolygon

Render polygons and polylines in a WPF program using C#

WPF lets you do all sorts of interesting things that are much harder in Windows Forms applications. However sometimes, as in this example, it makes simple things much harder. (WPF’s slogan should be, “Twice as flexible and only five times … Continue reading

Posted in drawing, extension methods, geometry, graphics, wpf, XAML | Tagged , , , , , , , , , , , , , , , , , , , , , , , | 2 Comments

Use DrawPolygon and DrawLines to draw shapes (and understand the different results) in C#

The Graphics object’s DrawPolygon method connects the points in an array of Point or PointF to draw a polygon. It automatically draws a line between the first and last points to close the polygon. The DrawLines method connects the points … Continue reading

Posted in drawing, graphics | Tagged , , , , , , , , , | 2 Comments