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
Runnign two different versions of Infragistics controls within the same application

We have upgraded an application from using the 2008 Win Forms Infragistics controls to using the 2015 Infragistics controls. This application leverages the AppStylist and the style manager for application theming. The 2015 controls are working well. However, this application also consumes components from a library that was build using 2008 Infragistics controls. The 2015 style manager is causing some unusual UI visibility issues on some of the 2008 controls. 

Is it possible to prevent the 2015 style manger from interfering with the 2008 controls or to load two different style managers withing the same application at the same time? 

  • 467470
    Suggested Answer
    Offline posted


    There's no way to just affect a particular version. But you can limit the effects of an isl when you load it into memory.

    The StyleManager.Load method has an optional parameter called StyleLibraryName. This is just any arbitrary string name that you choose.

    StyleManager.Load(filename, true, "MyStyleLibrary");  

    When you do this, the library is loading with the name you specified and only controls whose StyleLibraryName property is set to the same string will pick up the styling.

    this.ultraGrid1.StyleLibraryName = "MyStyleLibrary";

    So you would have to go through all of the controls in your current application and set the StyleLibaryName to some string and then load the Style library with that name. It's generally easier to do this at run-time by looping through all of the controls on you form(s) recursively and looking for controls that derive from UltraControlBase (which is where the StyleLibraryName is).

Reply Children
No Data