HangfireIO / Hangfire

An easy way to perform background job processing in .NET and .NET Core applications. No Windows Service or separate process required
https://www.hangfire.io
Other
9.43k stars 1.7k forks source link

DarkModeEnabled = true not having any effect #2434

Open SkinnySackboy opened 3 months ago

SkinnySackboy commented 3 months ago

Hi all,

Firstly, what a great project, IJW!

I've got a quick question about dark mode, which is the only thing I was unable to get to work. I'm setting DarkModeEnabled = true but this seems to have no effect, even in a bare bones simple application. Am I missing some additional configuration?

Thanks in advance.

PhilipDn commented 1 month ago

I'm not sure about this, but I think "DarkModeEnabled" can only be used to DISABLE dark mode for the dashboard if you have dark mode enabled for all your apps in Windows. It cannot be used to enable dark mode for the dashboard if it's not already enabled in Windows.

Try this - right-click on your Windows desktop and select "Personalize". In the Personalization control panel, select "Colors" on the left, and then under "Choose your default app mode" select "Dark". After a few seconds, all your apps (if they inherit from Windows) will switch to "dark" mode. The Hangfire dashboard will also switch to dark mode, UNLESS you specify "DarkModeEnabled = false" in which case it will run in light mode even if all the apps (including your browsers) are in dark mode.

There is also a "UseDarkModeSupportForDashboard()" option for the Hangfire configuration, but this takes "assembly" and "resource" parameters and I'm not sure what needs to be supplied for these parameters. This option does not seem to be required for "DarkModeEnabled" to work (as described above).