我想使用 controlpaint.DrawReversibleLine 方法绘制一条线并尝试传递 system.windows.point,但它需要 system.drawing.point 输入。我有点困惑。它们之间有什么区别?或者除了明显的差异之外,它们有何不同?
谢谢,
我想使用 controlpaint.DrawReversibleLine 方法绘制一条线并尝试传递 system.windows.point,但它需要 system.drawing.point 输入。我有点困惑。它们之间有什么区别?或者除了明显的差异之外,它们有何不同?
谢谢,
System.Windows.Point
是 WPF 结构,而System.Drawing.Point
是 WinForms 结构。
通常,如果您正在编写 WinForms 应用程序,则不要使用任何System.Windows
命名空间中的内容(除了System.Windows.Forms
)。这些命名空间中的资源是特定于 WPF 的,因此除非您打算连接 WPF 和 WinForms,否则最好避免使用它们。
System.Windows.Point
适用于 WPF 应用程序。
System.Windows 命名空间包含 Windows Presentation Foundation (WPF) 应用程序中使用的类型,包括动画客户端、用户界面控件、数据绑定和类型转换
System.Drawing.Point
适用于 WinForms 应用程序。
System.Drawing 命名空间提供对 GDI+ 基本图形功能的访问。