Hi ,
I m need of applying windows desktop theme color to my win grid. How to achieve this?
In more specific, if I change the windows desktop theme my wingrid must also change to the new color setting as windows controls do change.
Thanks
Ranga
There is no sample to this that I am aware of because, basically, I'm not sure what this sample would be showing you how to accomplish. In any of the Appearance object sub-properties that are of type Color, you have a UITypeEditor in the property grid that will allow you to choose one of the system colors. If you want to go the route of clearing out any of the colors that were applied by the grid by a preset, you just need to find the bolded items in the property grid and reset them. One thing to note is that you may have to set the UseOSThemes property to False on the grid, since certain elements are rendered with the themes (i.e. header, row selector).
-Matt
Is there any sample available to achieve this? If so kindly send me the link to download.
Thanks in advance
Ranga,
You would have to set the various appearances of your grid to use any of the colors in the SystemColors class (i.e. SystemColors.Window, SystemColors.Control, etc). There may be a preset that installs that already uses some of these, and it's also possible that many of the grid's appearances default to using system colors; by default, when you drag a grid onto the form, the default preset is applied, so you may have to reset several appearance-related properties on the grid's Override object to see this.