NumberBox's Background Color not working properly in Dark Mode
Describe the bug NumberBox is not being displayed properly in dark theme mode.
To Reproduce Steps to reproduce the behavior:
- Create any wpf project
- 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.
- 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.
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.
Hi, I can't reproduce this bug. Does this happen in the Gallery app? What version of this library are you using?
If possible, could you please send me your project so I can take a deeper look?
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