SystemTrayMenu
SystemTrayMenu copied to clipboard
[Feature] Context menu in dark mode is not dark
@phanirithvij Thank you the feedback!
Yes, we have already noticed that here https://github.com/Hofknecht/SystemTrayMenu/issues/225 but extra issue is ok for that
We are using 'Explorer Shell Context Menu' from CodeProject. At its website we found a bug report related to this issue, but sadly no solution. Only the suggestion for another project called 'Gong Solutions Shell Library' that should work in this case.
https://www.codeproject.com/Articles/22012/Explorer-Shell-Context-Menu?fid=929090&df=90&mpp=25&sort=Position&spc=Relaxed&select=3706303&tid=3706303
(copied this point from #225 to here, because #225 itself is solved)
related to ShellContextMenu there is also this second minor issue, the context menu of a network root folder does not work
when we change to another solution maybe also check this issue or create then an extra one therefore
I found some info that might help with dark theme support for ShellContextMenu.cs
From here..
... the window that owns those menus basically has to have its theme set to Explorer and the undocumented and weirdly working SetPreferredAppMode and AllowDarkModeForWindow called on it and maybe then it has a chance of working. It seems those things appear to skin to dark the menus in File Explorer when owner drawing is disabled...
The most fundamental of the new Windows APIs are SetPreferredAppMode (uxtheme@135), to be called prior to any window creation, and AllowDarkModeForWindow (uxtheme@133), to be called on any Window that intends to use native Windows 10 dark mode support.