I'm using a ToolStrip ( no I don't want to use the Infragistics control for this particular case) and I'd like to set its background to the color of a themed infragistics control. Is it possible to retrieve the different colors of a loaded theme ?
Hi David,
ResolveAppearance is a method that exists on many different objects and sub-objects. So you would need to find the one you want. Then you declare an AppearanceData and an AppearancePropFlags and pass them into the method. The AppearanceData will be returned with the appearance properties you requested and the AppearancePropFlags will be modified so that any resolved properties are stripped out of the flagged enum value.
To get information directly from the Application style, I think you have to declate an ApplicationStyleLibrary object and use a method on this object to load the current style from the Style Manager. Then you can examine the library and get any style information you need. But it's a large and complex object and I can't really document the entire thing here.
Hi Mike,
I have tried contacting the tech support with this issue, but it seems that they and I are speaking different languages. I need almost this same exact ability...
I need to be able to extract from a grid different properites of different Appearances so taht I can apply the same values to an HTML exported version of the data (since you all do not have HTML export yet)...so for example, when exporting the grid to HTML, I want to set the Column Headers, Row, and Alternating Row BackColors to match what the user had in the grid. Can you please tell me how to use the ResolveAppearance method or the more difficut method extracting it from the style manager if the ResolveAppearance would not work?
Thanks,
David
Okay, I was referring to the XPThemes colors. There's no color table for Application Styles.
It's possible to get the colors directly from the StyleManager, but it's quite complicated and it will be much easier to use a control's ResolveAppearance.
I tried the ResolveAppearance method as sugested by Mr Snyder and it worked very well. However, it would be better if i could just get a color from a theme without the need to create a specific control to get the color from.
I'm not sure that i fully understand what you are refering to with color tables.I loaded the theme from an .isl file created with AppStylist (Created from the templates that come with Infragistics controls). Is it possible to have the color table informations with that kind of theme ?
Thanks
Depending on what control and what kind of theme you are referring to, you might also be able to get the color from an exposed color table, like the XPThemes colors.