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

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

问题描述

我尝试将 System.Drawing 添加到 Visual Studio 2015 中的引用已有一段时间了.似乎没有任何效果.当我进入添加引用窗格时,列表中没有 System.Drawing.

我需要 System.Drawing 的 Bitmap 类而不是 Android.Graphics 的类

解决方案

作为@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:WindowsMicrosoft.NETFrameworkv4.0.30319 --> select System.Drawing.dll.

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

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

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