How to add System.Drawing in xamarin?

风格不统一 提交于 2019-12-30 08:19:05

问题


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


回答1:


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 --> select System.Drawing.dll.

Now try to make use of Bitmap class using System.Drawing;



来源:https://stackoverflow.com/questions/34862868/how-to-add-system-drawing-in-xamarin

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!