Search code examples
wpf2d

What is the difference between System.Drawing.Point and System.Windows.Point?


  1. What's the difference between System.Drawing.Point and the System.Windows.Point?
  2. In what context should which one be used?

I'm working with WPF.


Solution

  • System.Drawing.Point represents a GDI point and is used in Windows Forms. It can only hold integer values.

    WPF doesn't use GDI anymore, so it has its own System.Windows.Point type to represents a point, which can have non integer values.