Search code examples
.netwpfsystem.drawing

WPF v/s System.Drawing


I have to code a simple control in .Net that draws geometry that looks like following image and the geometry doesn't get any more complex than shown in this image, i.e. it will be a few filled polygons and some dashed lines. This is not a static image however, that is drawn once and forgotten. The dimensions of the geometry can be changed by the user which will have to be reflected in the drawing by updating it.

alt text

My senior says I should use WPF for drawing. My question is whether WPF is overkill for this kind of work and will System.Drawing suffice?


Solution

  • While WPF probably does have drawing capabilities, it is really a completely different UI toolkit than WinForms. If you are planning on porting your app to WPF eventually, I could see drawing your image using it, but otherwise I don't really see why you'd want to introduce WPF just to draw one image. That seems like overkill to me.

    You can find out more about WPF at MSDN or WindowsClient.net.