System.Drawing.Point
和System.Windows.Point
有什么区别?我正在使用 WPF。
System.Drawing.Point
代表 GDI 点,用于 Windows 窗体。它只能保存整数值。
WPF 不再使用 GDI,因此它有自己的
System.Windows.Point
类型来表示点,该点可以具有非整数值。
一种用于
System.Drawing
命名空间中的类,另一种用于 WPF。
System.Drawing.Point
与 System.Drawing
命名空间中的类一起使用并不令人意外。 System.Windows.Point
与 WPF 一起使用。