Hi!
I have an application and the default theme is White.
If I change the theme to Aero or to a Office 2010 theme and back to White the Close, Minimize, Maximize buttons remains having the Aero or Office 2010 theme style.
Kind regards,
Daniel
Hi!
I have an application and the default theme is White.
If I change the theme to Aero or to a Office 2010 theme and back to White the Close, Minimize, Maximize buttons remains having the Aero or Office 2010 theme style.
Kind regards,
Daniel
Hi Daniel,
The buttons should be updating styles on theme changes and we haven't been able to reproduce that issue. Our control template for the Window class uses Buttons for the title bar buttons and we specifically reference the Style to use like this:
Style="{DynamicResource {x:Static themes:SharedResourceKeys.WindowTitleBarButtonBaseStyleKey}}"
Aero and non-Aero themes have separate Style and template definitions for WindowTitleBarButtonBaseStyleKey. However the appropriate one should be applied per above on theme changes.
In the past, you mentioned you are running a MFC application. Interoping WPF in other application frameworks has occasionally seen oddities occur in areas like themes, airspace, and focus. I wonder if that MFC infrastructure is somehow causing the problem here, since it always has worked in pure WPF apps. As a workaround, perhaps you could try to locate the buttons in the visual tree (look for Buttons with the attached WindowChrome.ElementKind property values of MinimizeTitleBarButton, RestoreTitleBarButton, MaximizeTitleBarButton, CloseTitleBarButton), and try to update their Style properties manually?
Hi!
The problem was:
I have one executable and one assembly.
In the executable I have the ribbon window and in assembly I have everything else (a custom control with the ribbon and everything).
It seems that I need to do ThemesAeroThemeCatalogRegistrar.Register(); inside the executable and not inside the assembly so that the ribbon window buttons to work correctly.
Kind regards,
Daniel
Please log in to a validated account to post comments.