Skip to content

Start using FEATURE_SYSTEM_EVENTS in System.Drawing.Common #22405

Closed

Description

@mellinoe

On the .NET Framework, types in System.Drawing will react to certain system events, like system fonts changing, or system colors changing. When such an event is encountered, the system fonts and colors are refreshed and re-cached, so that they stay up-to-date with the rest of the OS. On .NET Framework, these events are tracked through the SystemEvents class, located in System.dll. We don't have this functionality in .NET Core, but can consider adding it, perhaps directly in System.Drawing.Common.dll for now. All code using this is behind the FEATURE_SYSTEM_EVENTS flag. Note that this will probably only ever work on Windows, and not other operating systems.

Another option is to simply delete the code, and document this as a minor quirk of the .NET Core version of the library. This would mean that, in very rare (incredibly rare?) circumstances, the colors and fonts returned by System.Drawing.Common would be out of sync with the rest of the system.

@stephentoub @hughbe

Activity

  1. mellinoe commented on Sep 1, 2017

    @mellinoe
    ContributorAuthor

    I've removed this code.

  2. transferred this issue fromdotnet/corefxon Jan 31, 2020
  3. added this to the 2.1.0 milestone on Jan 31, 2020
  4. 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

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions