How to add System.Drawing in xamarin?

user3128955 picture user3128955 · Jan 18, 2016 · Viewed 12.3k times · Source

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

Answer

Yksh picture Yksh · Jan 19, 2016

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;

enter image description here