gpt4 book ai didi

.net - System.Drawing.Color和System.Windows.Media.Color有什么区别?

转载 作者:行者123 更新时间:2023-12-03 08:58:17 29 4
gpt4 key购买 nike

基本上,为什么需要一个非常简单的概念的两个抽象?

最佳答案

System.Windows.Media.Color System.Windows.Media 命名空间的一部分:

Provides types that enable integration of rich media, including drawings, text, and audio/video content in Windows Presentation Foundation (WPF) applications.


System.Drawing.Color System.Drawing 命名空间的一部分:

The System.Drawing namespace provides access to GDI+ basic graphics functionality. More advanced functionality is provided in the System.Drawing.Drawing2D, System.Drawing.Imaging, and System.Drawing.Text namespaces.



我猜想后者是Windows特有的,而前者是更通用的,并且更容易移植到Mac OS等上,以用于Silverlight应用程序。

在后一种 namespace 上也有这种警告,它倾向于支持此名称:

Classes within the System.Drawing namespace are not supported for use within a Windows or ASP.NET service. Attempting to use these classes from within one of these application types may produce unexpected problems, such as diminished service performance and run-time exceptions.

关于.net - System.Drawing.Color和System.Windows.Media.Color有什么区别?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2428930/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com