I am trying to use the Infragistics ThemeManager to set my application theme when my application starts. I am using WPF, MVVM, and Infragistics 14.2. The issue I am having is that, when I use a bootstrapper to start up my application, when my window displays, there is about a half second lag before the theme applied with the ThemeManager starts to take effect.
When the window first appears, it is not using a theme, and buttons, text boxes, etc. have the default WPF control appearance. Then, after a half-second delay, the Infragistics theme takes over, and the controls switch from their default appearance to the Infragistics theme that I applied with the ThemeManager.
I do not have this issue when I start my application with a StartupUri that points to a window, however, I need to start my application with a bootstrapper to hook up all of my dependencies.
I have attached a Solution with two projects, one named StylesWindow, and the other named StylesBootstrapper.
In the StylesWindow project, the app.xaml indicates that the StartupUri should point to "MainWindowView.xaml". In the constructor of MainWindowView.xaml.cs, I set the ThemeManager application theme to the IGTheme. If you set the solution to start with this project, the window will open with the applied IGTheme the way that it should.
In the StylesBootstrapper project, the app.xaml does not have a StartupUri, but instead I add my bootstrapper class to the ApplicationResources, which creates an instance of my bootstrapper, which sets the application theme, resolves dependencies, and starts the application. If you set the solution to start with this project, the window opens, but first shows with no theme applied, then after about half a second, the theme is applied and all of the controls appear as they should.
I need to use a bootstrapper with my application, so is there something I can do to get rid of the delay before the theme is applied? Do I need to set the application theme somewhere else, or implement the bootstrapper some other way?
Note: it seems that there are some errors silently occurring in PresentationFramework.dll and System.Xaml.dll from what I see in the Output window when I run the StylesBootstrapper project.
Thanks.
I have created a support ticket on your behalf with number CAS-153506-Z9N2D7 in order to link the development issue(#188454) to it so that you are automatically updated when a Service Release containing your fix is available for download.
Thanks,
Great, I will keep an eye out for the SR.
I've tested you sample app against our latest internal builds and the issue is not reproducible. I've also reproduced the issue with the latest SR for 14.2 (build WPF.Nightly_14.2.20142.2081) to ensure it is reproducible on my machine.
So you're not seeing this issue in the next SR.
Thanks for the response. Let me know if my sample works correctly when tested against the build that has the fix in it. Just want to make sure that the fix addresses my specific issue.
Hi Jonathan,
Thank you for your interest in the ThemeManager.
The issue that you're describing seem to be exactly the same as an issue that we've fixed lately - unfortunately the fix is not available yet. I'll test your sample app against our internal builds to verify the fix is fixing your issue exactly.
The fix should be present in the upcoming SR that is to be expected around the mid of April.