Support Dark Mode
- [x] Detect Dark/Light Mode
- [ ] Add different/mode-aware context menu renderers
- [ ] Make Plugin Mode-Aware
We already have different context menu renderers, based on the current theme. But they actually don't represent something meaningful.
We could use rounded Windows 11-Style menus for that, which we'd have to implment ourselves.
Also, there is https://github.com/dotnet/winforms/issues/2543
The current toolstrip renderer uses the UxTheme data to draw stuff. On Windows 11, it already looks like other okayish legacy menus. However, it does not respect the dark mode.
It would be fine if we'd keep this and just change the Font/Background color depending on the current theme.
We then can dispose our old renderer that is used in the light mode setting.
Then the setting changed, we should react to WM_SETTINGCHANGE. We're not doing this for now, since setting it initially works for us.
Maybe this helps https://github.com/microsoft/WindowsAppSDK/issues/41
Not doing this for 2.0.0.
Wait how did you guys make the context menu renderer using GetThemeSysColor? I been looking into something like this too.
I also need something like this for other controls like TextBox (for background and Text), the Window background, ListView, TreeView, TextBox, Button, Label, LinkLabel (background), etc.
We're using the VisualStyle renderer, which doesn't seem to support dark mode (yet?). It always draws the light version of the control.
There is an article that partly covers this: https://den.dev/blog/windows-priority-shuffle/
Also: https://stackoverflow.com/questions/71403685