I may not be able to do what I'm trying to accomplish...but here's the issue:
I started a new AppStyle by utilizing the "Nautilus.isl" as the beginning template. I like the look and feel overall and "tweaked" it ever so slightly until I got the desired results. One feature I'd like to have on my Grid is an alternating row color...which when adding a grid without styling is easier using the override on the RowAlternateAppearance property. But AppStyle appears to be an image - in my opinion - that circumvents code I've added to set the alternate color on a grid's band.
Now...if I start with a blank Style Library - with or without themes - it works great. I can set the Alternate Item properties and see the results in the AppStyle designer. However, if I start with a template to use as my base - the best I can achieve is an outline on the row - which is why I assume an image is sitting on top of the cells. Here's an example with the Alternate Item Background color set to red - to standout - and the results:
Is there a way to get the background color I want to fill the cells across the row, or is starting with a template as my base design simply the wrong approach if I want to do this?
Thanks
Hi,
I took a look at the Nautilus style and I notice that the GridRow UIRole does indeed have an ImageBackground assigned to it. However, when I removed this, that doesn't seem to make any difference to the AlternateItem state on the row. It still doesn't show through.
It looks to me like the row color is not visible because the cells are covering it. This is why you see a border around the row - that's the only part of the row not covered by a cell.
Sure enough, the Base role in this style library has it's background color set to White. This gives every cell a solid white BackColor which covers the row color.
So one easy way to get around this is to go to the GridCell UIRole and, on the Background chunk, set the Alpha to Transparent. Or, you could set the Background color to Transparent. The latter might be better, actually, since that way you could still override it if you want to color an individual cell in your application.
First of all...Thanks Mike. I appreciate you taking a look at this.
I still can't get it to work...even with the GridCell UIRole changes. Whatever is blocking the cell row color still overrides any of my settings. There are so many properties to consider within these controls that it takes a lot of work to drill down and find what you need sometimes. At this point I've wasted way too much time on something as stupid as the "alternate row color" that could be put to use on something else - know what I mean? - so I've moved on. I changed my starting library to the VS2008 template and the alternate color works great.
Sometimes development is all about compromise and keeping focus on the end goal...and while I prefer the Nautilus style, there's a work around with VS2008 that allows greater control of the grid both in the AppStyle designer and in code - so it's all good.
Thanks again!