System.Drawing.Point 和 System.Windows.Point 有什么区别? [英] What is the difference between System.Drawing.Point and System.Windows.Point?

查看:31
本文介绍了System.Drawing.Point 和 System.Windows.Point 有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  1. <和有什么区别代码>System.Drawing.PointSystem.Windows.Point?
  2. 应该在什么情况下使用哪一个?

我正在使用 WPF.

推荐答案

System.Drawing.Point 表示 GDI 点,用于 Windows 窗体.它只能保存整数值.

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

WPF 不再使用 GDI,因此它有自己的 System.Windows.Point 类型来表示一个点,该点可以具有非整数值.

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.

这篇关于System.Drawing.Point 和 System.Windows.Point 有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆