StrataFrame Forum

Infragistics Ultragrid and UltraTabbedMdiManager theming

http://forum.strataframe.net/Topic15105.aspx

By Jiri Brazda - 3/22/2008

Is it possible to use Ultragrid and UltraTabbedMdiManager with Strataframe wrapper for Infragistics? Is it possible to get the theme of ultragrid changed when the application theme is changed by setting:

MicroFour.StrataFrame.UI.Windows.Forms.ApplicationTheme.Theme = ApplicationThemeName.BlueSkies

I have examined the wrapper class and haven't found wrapper for such controls :-(

By Trent L. Taylor - 3/24/2008

Good news...you can actually do both.  The one Infragistics control that we use in our medical application is the UltraGrid and we just subclassed it and added our ThemeSupport by just setting the desired properties to get the desired look.  I would give you ours, but it has FAR more logic that you need here.  You can access all of the themed properties to pull from and get the desired effect:

MyGrid.ForeColor = MicroFour.StrataFrame.UI.WIndows.Forms.ApplicationTheme.ThemeProperties.GroupTitleTextColor

You can also handle the ApplicationThemeChanged event on the ApplicationTheme object to force a refresh or to reset your properties when the theme changes.

AddHandler MicroFour.StrataFrame.UI.Windows.Forms.ApplicationTheme.ApplicationThemeChanged, Addressof HandleMyThemeChanged

Finally, look at the Application Themes sample that comes with the framework, this will help give you some more ideas on how to add theme support to any 3rd party or custom control.

By Jiri Brazda - 3/27/2008

Hi Trent,

thank You for Your answer. However I would like to have the whole theme (not manually by setting each property) applied automatically to all grids or other IG controls in my application. I'm using MDI main form with multiple child forms and when changing theme during runtime, all StrataFrame themed controls in all opened forms are changed appropriatelly. Is it possible to achieve the same behavior with IG components like ultragrid? And even when it is necessary to specify each property - is it possible to automatically set these properties to all existing controls in all opened forms?

Thanks

By Jiri Brazda - 3/27/2008

One more question about theming - when applying different themes it applies correspondent colors to all controls except one thing - I have found that when applying SandDunes theme, the ThemedMenuStrip color is set to blue color which doesn't seem to me to belong to the SandDunes theme...
By Ivan George Borges - 3/27/2008

This one might help you in some way:

http://forum.strataframe.net/FindPost5320.aspx

By Trent L. Taylor - 3/27/2008

all StrataFrame themed controls in all opened forms are changed appropriatelly. Is it possible to achieve the same behavior with IG components like ultragrid?

You will have to manually implement the theme logic to the controls that you want to have it if they are not SF controls.  We did this for some 3rd party stuff in our medical software by just creating a class, inherited the desired control, and setting the properties.  There is no possible way that we (SF) could just know which properties to set on a 3rd party class dynamically.

As for the colors changing automatically, all you need to do is handle the ApplicationThemeChanged event and refresh the control.

I have found that when applying SandDunes theme, the ThemedMenuStrip color is set to blue color which doesn't seem to me to belong to the SandDunes theme...

Hmmm...couldn't reproduce this...it works fine on my side.  You may have the ThemeSupport property set to a value other than Full or ColorsOnly.  I have verified this and I know that this works as it should.

By Jiri Brazda - 3/27/2008

Ok, I will manage IG controls themes manually.

Regarding to the second point - the following is the prinscreen of the application where SandDunes theme is applied - everything is OK except the backcolor of menu. ThemeSupport of ThemedMenuStrip control is set to Full. With other themes it is OK.

By Trent L. Taylor - 3/27/2008

Thanks, we'll look into it.