开发者

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

开发者 https://www.devze.com 2022-12-27 01:03 出处:网络
What\'s the difference between System.Drawing.Point and the System.Windows.Point? In what context should wh开发者_Python百科ich one be used?
  1. What's the difference between System.Drawing.Point and the System.Windows.Point?
  2. In what context should wh开发者_Python百科ich one be used?

I'm working with WPF.


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.


One is used with the classes in System.Drawing namespaces, and one is used with WPF.

The System.Drawing.Point is not so surprisingly used with the classes in the System.Drawing namespaces. The System.Windows.Point is used with WPF.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号