Skip to content

TypeConverters for System.Drawing #22324

Closed
dotnet/corefx
#33092

Description

@qmfrederik

TypeConverters are currently omitted from System.Drawing.Common, as described in dotnet/corefx#20593.

Since the idea is that Mono will use the CoreFX System.Drawing sources, and Mono maintains compatibility with Desktop .NET, we should add them back.

Here's what I can do:

  • Add the TypeConverters (possibly from Mono) to CoreFX
  • Add the TypeConverter attributes to the System.Drawing classes and hide them between a feature flag.

The same will probably apply other Desktop-only features, such as [Serializable] attributes.

Activity

  1. qmfrederik commented on Jun 16, 2017

    @qmfrederik
    ContributorAuthor
  2. danmoseley commented on Jun 16, 2017

    @danmoseley
    Contributor

    We are limiting the types we apply Serializable to so if you have new such attributes we might want to put them on mono specific partial classes.

  3. danmoseley commented on Jun 16, 2017

    @danmoseley
    Contributor

    @weshaggard @morganbr I wonder if we need an analyzer to flag if more [serializable]'s appear.

  4. weshaggard commented on Jun 17, 2017

    @weshaggard
    Member

    As for the TypeConverters assuming we add them I would like to keep the in the TypeConverters library instead of System.Drawing.Common library if at all possible. We have been trying to invert this dependency to avoid everything needing to depend on TypeConverter.

  5. safern commented on Feb 5, 2018

    @safern
    Member

    @qmfrederik interested on grabbing this one?

  6. qmfrederik commented on Feb 5, 2018

    @qmfrederik
    ContributorAuthor

    @safern What's the timeline for this?

  7. safern commented on Feb 6, 2018

    @safern
    Member

    It would be great to have this in the 2.1 timeline so that when we ship the stable Compat pack and 2.1 we have this compatibility with Desktop and Mono could use our implementation.

    We're currently in prepping preview1 release which we don't have a date yet, but it would be nice to get this one any time soon.

  8. satano commented on Mar 17, 2018

    @satano
    Member

    I would try to do this one. I just need to explain a what should be done. What converters to take and where to put them.

  9. safern commented on Mar 19, 2018

    @safern
    Member

    @satano I found we're currently missing:

    • FontConverter
    • IconConverter
    • ImageConverter
    • ImageFormatConverter

    We would need to port them from Mono:
    https://github.com/mono/mono/blob/master/mcs/class/System.Drawing/System.Drawing/IconConverter.cs

    Put them into System.ComponentModel.TypeConverter and then add the attributes to the corresponding types.

    @qmfrederik is there any TypeConverter that I missed?

  10. satano commented on Mar 19, 2018

    @satano
    Member

    OK. I'll do it.

  11. safern commented on Mar 19, 2018

    @safern
    Member

    Assigned to you. Thanks!

  12. safern commented on Mar 21, 2018

    @safern
    Member

    @satano any progress o this? Do you have any questions?

  13. satano commented on Mar 21, 2018

    @satano
    Member

    I am doing this locally. In couple of days I will submit first version and will have questions there - it will be better to have context.

  14. safern commented on Mar 21, 2018

    @safern
    Member

    I am doing this locally. In couple of days I will submit first version and will have questions there - it will be better to have context.

    Sweet. Thanks for the update.

  15. satano commented on Mar 23, 2018

    @satano
    Member

    @safern I am ready for feedback. :)

  16. transferred this issue fromdotnet/corefxon Jan 31, 2020
  17. added this to the 3.0 milestone on Jan 31, 2020
  18. ghost locked as resolved and limited conversation to collaborators on Dec 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area-System.Drawinghelp wanted

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions