You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Start using FEATURE_SYSTEM_EVENTS in System.Drawing.Common #22405
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.
Activity
mellinoe commentedon Sep 1, 2017
I've removed this code.