找不到System.Windows.Media命名空间? [英] Can't find System.Windows.Media namespace?

查看:287
本文介绍了找不到System.Windows.Media命名空间?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用来自第三方API的对象,该对象的属性类型为System.Windows.Media.ImageSource,但是我似乎在任何地方都找不到System.Windows.Media命名空间.如果我尝试添加对项目的引用,那么选项列表中不会显示System.Windows.Media.我的项目也针对.Net 3.5.

要访问该名称空间,我还需要做其他事情吗?

System.Windows.Media.Imaging名称空间是PresentationCore.dll的一部分(如果使用的是Visual Studio 2008,则WPF应用程序模板将自动添加此引用).请注意,此名称空间不是WIC库的直接包装,尽管仍然有很多更常用的用法,并且这些名称如何映射到WIC版本是相对明显的.有关此命名空间中的类的更多信息,请查看

http://msdn2.microsoft.com /en-us/library/system.windows.media.imaging.aspx

I'm using an object from a 3rd party API that has a property of type System.Windows.Media.ImageSource, yet I can't seem to find the System.Windows.Media namespace anywhere. If I try to add a reference to my project I don't see System.Windows.Media in the list of options. My project is also targeting .Net 3.5.

Is there something else I need to do to be able to access this namespace?

解决方案

The System.Windows.Media.Imaging namespace is part of PresentationCore.dll (if you are using Visual Studio 2008 then the WPF application template will automatically add this reference). Note that this namespace is not a direct wrapping of the WIC library, although a large proportion of the more common uses are still available and it is relatively obvious how these map to the WIC versions. For more information on the classes in this namespace check out

http://msdn2.microsoft.com/en-us/library/system.windows.media.imaging.aspx

这篇关于找不到System.Windows.Media命名空间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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