如何在xamarin中添加System.Drawing? [英] How to add System.Drawing in xamarin?

查看:185
本文介绍了如何在xamarin中添加System.Drawing?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我现在尝试了一段时间,将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 --> select System.Drawing.dll.

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

这篇关于如何在xamarin中添加System.Drawing?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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