Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
100
Theme application delay at program startup
posted

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.

Styles Experimenting.zip
Parents
No Data
Reply
  • 6759
    Verified Answer
    Offline posted

    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.

    Thanks, 

Children