iNKORE-NET / UI.WPF.Modern

Modern (Fluent 2) styles and controls for your WPF applications
https://docs.inkore.net/ui-wpf-modern
GNU Lesser General Public License v2.1
323 stars 29 forks source link

NumberBox's Background Color not working properly in Dark Mode #50

Open abhay991 opened 3 months ago

abhay991 commented 3 months ago

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):

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

NotYoojun commented 3 months ago

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 commented 4 weeks ago

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