Posted 16 years ago
by Mike Strobel
-
Software Engineer,
CDC Software
Version: 4.5.0481
Platform: .NET 3.5
Environment: Windows Vista (32-bit)
When testing our theme support this morning, I noticed a glitch in which changing the WPF Studio theme at runtime causes the RibbonWindow chrome to render incorrectly. Specifically, if I started with the Classic theme and then switched to an Office2007 theme (in my case Office2007Blue), the Classic chrome remained in place for any windows that were already Initialized (but not Loaded) when the theme changed. However, the elements within the chrome (e.g. the Maximize, Minimize, and Close buttons) rendered with the Office2007 theme.
Screenshot
Note that we are setting the theme via the ThemeManager.CurrentTheme property. Also, it seems to only happen when the Windows theme is set to "Windows Standard", "Windows Classic", or one of the high contrast modes.
Verified with a simple sample application:
Mike
Screenshot
Note that we are setting the theme via the ThemeManager.CurrentTheme property. Also, it seems to only happen when the Windows theme is set to "Windows Standard", "Windows Classic", or one of the high contrast modes.
Verified with a simple sample application:
- Create a new WPF application in Visual Studio using the "WPF Application" project template.
- Change Window1 from a System.Windows.Window to a RibbonWindow.
- Modify the constructor as follows:
public Window1()
{
InitializeComponent();
ThemeManager.CurrentTheme = CommonThemeName.Classic.ToString();
ThemeManager.CurrentTheme = CommonThemeName.Office2007Blue.ToString();
} - Change your Windows theme to "Windows Standard".
- Run the application.
Mike