This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
I find that when the DataGrid is enabled or disabled the proper foreground does not necessarily flow down to the cells. I am using WpfElements nightly build from about 8/22/2013. With the first demo (below) the cell foregrounds get stuck with the disabled foreground. In the second demo the cell foregrounds get stuck with the enabled foregrounds. I think this is caused by the cell foregrounds being set in DataGridRow.RestoreState from the column foregrounds, so that the normal inheritance of the Foreground property is disrupted. When I comment out the following lines in DataGrid.cs:
and replace the following line in DataGridRow.cs
with
it seems to solve this problem. This way, unless the foreground is explicitly overridden by the column the normal inheritance of the foreground should occur. However, I don't know if this might screw something else up. Here is the XAML for the first demo:
Here is the XAML for the second demo:
Here is the code behind for both:
} |
|
|
Thanks Peter I've tried out your fix and haven't come across any issues, so this will be available in the next nightly build. Jason Fauchelle |
|