Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report for Bug 7773 on
GitHub or Developer Community if you have new
information to add and do not yet see a matching new report.
If the latest results still closely match this report, you can use the
In special cases on GitHub you might also want the comments:
GitHub Markdown with public comments
I am unable to use System.Drawing.* classes in my portable class library project.
I would think making the basic data structures available should be possible.
How are you defining "basic data structures"?
The only "basic data structures" currently included in both MonoTouch & Mono for Android are:
Currently, the above are in Mono.Android.dll and monotouch.dll.
Now, answer this honestly: would a PCL System.Drawing assembly containing ONLY the above types be at all useful? I'm not sure that it would.
Finally, System.Drawing is not part of the PCL, at least as far as I can determine reading:
Reading the above MSDN page, it sounds like nothing UI-related is in the PCL:
> the Portable Class Library project doesn't contain any UI components
> because of behavioral differences between the UIs of different devices.
Silverlight doesn't support System.Drawing:
Thus, any PCL System.Drawing would be restricted to MonoTouch & Mono for Android. That _might_ be useful, but given the small number of types that are supported, is there really any point?
Thanks for the detailed answer.
Use case I was measuring something in MonoTouch and got a Size and then request something of that size from my PCL.
Of course it is not a big deal to convert to a custom size class for me, and probably worth the tradeoff since a sparsely implemented System.Drawing might confuse more people (or worse diverging from the MS spec).
Another option for me would be to just copy the corresponding classes from the Mono project.
But I agree that sticking to the convention is very important here, so WONTFIX?
As a "proper" PCL assembly? WONTFIX: it'll require Microsoft support, which I think is unlikely.
However, that doesn't mean that we can't improve System.Drawing interop between MonoTouch and Mono for Android. This won't necessarily be _easy_, but it's certainly _plausible_, and could be a handy feature. This would likely involve rewriting System.Drawing atop the native APIs.