Kinnara / ModernWpf

Modern styles and controls for your WPF applications
MIT License
4.45k stars 446 forks source link

NumberBox does not respect ThemeManager theme #631

Open dostjh opened 10 months ago

dostjh commented 10 months ago

I implemented NumberBox in my application that is set up to work in Dark Mode. However, NumberBox did not respect the theme.

Specifying ThemeManager.RequestedTheme on the control itself can be used as a workaround.

Bug <ui:NumberBox Header="Clients to start" Value="{Binding NumberOfClientsToStart, Mode=TwoWay}" InputScope="Number" SpinButtonPlacementMode="Inline" Text="Clients to start"/> image

Workaround <ui:NumberBox Header="Clients to start" Value="{Binding NumberOfClientsToStart, Mode=TwoWay}" InputScope="Number" SpinButtonPlacementMode="Inline" Text="Clients to start" ui:ThemeManager.RequestedTheme="Dark"/> image

TomHedwig commented 7 months ago

I met the same problem. @dostjh Additionally, VS would prompt a binding error like that:

Severity Count Data Context Binding Path Target Target Type Description
Error 1 null Fill GeometryDrawing.Brush Brush Cannot find governing FrameworkElement or FrameworkContentElement for target element.