Hi. I would like to apply a different styleset to different cells (columns, really) within the same UltraGrid. Is this possible? I can't find a way to do this.
Thanks, Jim
Perfect, works like a charm. Thanks Mike!
Hi Jim,
Well, it looks like we all learn something new every day. While checking into your question I discovered a feature that I was unaware of. There is a StyleResourceName property on the Appearance object. So you can already do what you want here.
All you have to do is set the Appearance.StyleResourceName on the column.CellAppearance (or whatever appearance you like) to the name of a Resource that exists in the isl. There is also a StyleLibraryName property in case you are loading multiple style libraries.
Thanks for the answer Mike.
That's too bad... The power of your app styling framework is in allowing developers to set up the UI without having to deal with the specific appearance values of any given style, since your ASF abstracts those values to the style library.
For example, if I needed to have a particular column styled differently than the others to visually call out its contents, I would expect to be able to define a styleset for that particular column in AppStylist, and the designer who creates themes would be responsible for defining the appearance of that syleset in each style library they create. If instead the developer has to code the specific colors/fonts used in that column, that seems to defeat the purpose of your app styling framework, which separates the designer and developer roles. That appearance info for each should really be abstracted to the style.
It sounds like it's not possible to wire a grid column to a styleset using a simple property. Is it possible to write code that taps into values from an AppStylist styleset and manually hooks those into the Appearance settings for the grid column? That's not ideal, but it would at least allow us to abstract the appearance styling to AppStylist and pull it out at run time. I'm not sure if that's what you meant when you said we could apply Appearances, or if you were referring to manually setting specific appearance values in the code.
Thanks Mike, I appreciate your help!
Jim
You can, of course, apply Appearances to columns in your application code. :)
No, this is not possible, as the StyleSetName property is on the control and applies to the whole control. AppStylist is intended to allow you to stle your application as a whole, so it's really not very good at styling individual data-based elements like cells or individual rows, unless it's based on some global state. Since the columns come from the data, there's no way AppStylist can recognize any individual column.