Feb 24, 2012 at 8:16 PM
Edited Feb 25, 2012 at 3:45 PM
Hi, Thank you for responding.... I FOUND my mistake in painting the background of your PropertyGrid.
I originally posted this issue to David who was kind enough to respond but who had no solution--I finally found a way to change the background color of the PropertyGrid and it is posted as my response to David's response to my original question about this
I assumed that the PropertyGrid had a parent that also need to be colored BUT it was my own fault because I was loading the library from an older copy of the DLL without my changes in the constructor of the PropertyGrid. Usually I add the DLL
of the library from the directory where it is created to..
Please accept my apology!
// FIX ---> This is how to change background color of PropertyGrid !!!
drawingHost.PropertyGrid.Margin = new Thickness(0);
drawingHost.PropertyGrid.Background = new SolidColorBrush(Color.FromArgb(200, 213, 220, 232)); drawingHost.PropertyGrid.Parent.SetValue(BackgroundProperty,
new SolidColorBrush(Color.FromArgb(200, 213, 220, 232)));
This "solution" I found was actually working on the OLDER copy of the library where the DLL had it set to yellow in the constructor of the PropertyGrid !
It was my fault. But this mistake does point out the need to make sure you are loading the NEW version of the library in VisualStudio.