Foregroundcolor is not correct

Hello

I'm trying to use the Office-Dark-Style on SfDataGrid. The foreground color (text) of the header is black instead of white. I can reproduce the same issue with the normal wpf button. In the style is designed, that if the IsPressed event is fireing, the foreground color of the button should be white. It works with the ButtonAdv, but not with the button and not with the grid. Do you know why do we have this behaviour? I added a example to visualize the issue.

Kindest Regards
Benjamin

Attachment: SyncfusionWpfApp1_769b70d3.zip

2 Replies

JG Jai Ganesh S Syncfusion Team April 13, 2018 04:09 AM UTC

Hi Benjamin,

We can reproduce the reported foreground color preservation issue with the given application. This issue was reproduced due to when the flag ApplyStylesOnApplication defined as true. This flag can be used to apply the Visual Style to all its child elements and its child windows. In this case, DataGrid has applied with the specified theme and we have used the textblock as child element for the HeaderCell to display text. So due to this flag get enabled, this textblock has been overridden with the default style, causes the foreground issue. We have logged the defect report for this issue and fix for this issue will be available in our 2018 Volume 2 release which will be available in end of May, 2018. At the moment, can you avoid to specify the ApplyStylesOnApplication flag as true for resolving the reported issue.

Regards,
Jai Ganesh
 



JR Jegan Raj M Syncfusion Team May 10, 2018 07:22 AM UTC

Hi Benjamin,

Currently we are checking the issue with SfSkinManager while applying theme by using the property "ApplyStylesOnApplication". As there is TextBlock in each control like in Button, SfDataGrid header, it overrides the style from normal TextBlock style.

We are working on this to separate these styles and we would include this fix in Vol 2 SP1, 2018 release which will be available in end of June 2018. Until then we suggest using the work around by enabling the property ApplyStylesOnApplication to apply style.

Thanks for your patience.

Regards,
Jegan Raj M

Loader.
Up arrow icon