UI.WPF.Modern icon indicating copy to clipboard operation
UI.WPF.Modern copied to clipboard

NumberBox's Background Color not working properly in Dark Mode

Open abhay991 opened this issue 1 year ago • 2 comments

Describe the bug NumberBox is not being displayed properly in dark theme mode.

To Reproduce Steps to reproduce the behavior:

  1. Create any wpf project
  2. Make sure you set dark theme at the time of launch (this is important) cause when you switch to a dark theme in runtime, it works fine.
  3. You will see only the NumberBox component is not taking dark mode effect correctly.

Expected behavior I expect to see NumberBox's textbox have proper background color.

Screenshots If applicable, add screenshots to help explain your problem.

image

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser: Chrome
  • Version 120

Notes: I have faced same issue with ModernWpf for quite long time now.

abhay991 avatar Mar 30 '24 13:03 abhay991

Hi, I can't reproduce this bug. Does this happen in the Gallery app? What version of this library are you using?

image

If possible, could you please send me your project so I can take a deeper look?

NotYoojun avatar Apr 04 '24 10:04 NotYoojun

Hi there,

Please check the latest commit: Attempts of #50 · iNKORE-NET/UI.WPF.Modern@2ff4ee2 (github.com) And see if this problem still exists.

I tried removing the theme-specific resources from NumberBox.xaml, and it works on my computer. I’m sure this is not the best solution, since this issue is because of the incorrect code of ThemeDictionary and ResourceDictionary. However, I have no idea to fix this in the best way, and I’m wondering if you guys could help me.

Best regards, Yoojun Zhou

NotYoojun avatar Jun 05 '24 04:06 NotYoojun