如何在xamarin中添加System.Drawing? [英] How to add System.Drawing in xamarin?
问题描述
我现在尝试了一段时间,将System.Drawing添加到Visual Studio 2015中的引用。似乎没有任何反应。当我进入添加参考窗格时,列表中没有System.Drawing。
我需要System.Drawing中的Bitmap类,而不是Android.Graphics中的Bitmap类
如果@Cheesebaron在论坛中引用过一次:
如果您查看
I am trying for some time now to add System.Drawing to the references in Visual Studio 2015. Nothing seems to work. When I go into the add reference pane, there is no System.Drawing in the list.
I need the Bitmap class from System.Drawing not one from Android.Graphics
解决方案As @Cheesebaron quoted once if forum :
If you look at http://docs.xamarin.com/guides/android/advanced_topics/assemblies you will see that System.Drawing is not a part of the Assemblies shipped with Xamarin.Android, the same goes for Xamarin.iOS.
You will need to use the Android counterparts to filter images.
The alternative method is to add
System.Drawing.dll
as references.Right click on
References
-->Edit References
-->.Net Assembly
-->Browse...
-->C:\Windows\Microsoft.NET\Framework\v4.0.30319
--> selectSystem.Drawing.dll
.Now try to make use of
Bitmap
classusing System.Drawing;
这篇关于如何在xamarin中添加System.Drawing?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!