-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TrayIcon content does not react to DynamicResource changes #19
Comments
I'm interested in finding out what causes this behavior too. |
I'm also having similar issues using MahApps styles for the ContextMenu and MenuItem, for some reason only the foreground hover brush is changed when you change themes, but the foreground/background is not. |
Same |
Same here, I'm setting the MenuItem's header to a dynamicResource, it just does not change when the dynamicResource changes. |
Maybe someone can make a minimalistic example project for this? |
As a solution: subscribe to TrayContextMenuOpen event of TaskbarIcon, and call UpdateDefaultStyle for context menu that required to be updated. Or call UpdateDefaultStyle when theme changed. |
Popup control that host context menu or other controls can't correctly get dynamic resources changes from Application merged resource I guess. Popup on the same visual level where Application exists. |
Working as intended now, much thanks! |
I need to look into this again, I am also faced with the issue, so maybe I can add something to support a style update. Btw. example link mentioned above moved to here: https://github.com/Erapchu/SinglePass.WPF/blob/master/SinglePass.WPF/Views/TrayIcon.xaml.cs |
I renamed repo, thanks @Lakritzator
|
@NikasZalias This should be fixed now with #117 by using @Erapchu solution |
How can I make my TrayIcon react to Theme changes? When I change my app theme from light to dark or vice versa, tray icon stays the same until I restart app. Why is it like that?
The text was updated successfully, but these errors were encountered: