RadGriwView header text losses contrast in Windows 11 Contrast mode

0 Answers 59 Views
GridView Styling
boon
Top achievements
Rank 1
boon asked on 06 May 2022, 01:15 PM | edited on 06 May 2022, 01:25 PM

I have a RadGridView in my application and did not explicitly set the style for it. It works well in normal contrast mode but when turn on the Aquatic high contrast mode in Windows 11, the contrast between the text and background on the header becomes minimal like  below.

 

I tried changing the style like below but the text will stay at the defined color regardless of the contrast mode.

<Style TargetType="telerik:GridViewHeaderCell" BasedOn="{StaticResource GridViewHeaderCellStyle}">
                <Setter Property="Foreground" Value="Red"/>
                <Setter Property="HorizontalContentAlignment" Value="Center"/>
 </Style>

 

Dilyan Traykov
Telerik team
commented on 10 May 2022, 01:03 PM

Hello boon,

Thank you for the provided images and code snippet.

I tried to replicate the same issue from the first screenshot you provided, however, the RadGridView control is displayed as expected at my end, even with the Aquatic contrast theme:

In addition, the style you provided is also applied as expected at my end:

With this said, can you please have a look at the attached project and let me know how it differs from the setup at your end? If possible, please modify the project to demonstrate the issue and send it back to me so that I can further investigate.

boon
Top achievements
Rank 1
commented on 11 May 2022, 01:15 AM

Hi Dilyan,

Thank you for the reply and sample code. I have found what my problem was. 
The style of the RadGridView control was set somewhere in the app in resources, however that explicit style (not setting the background and foreground color) did not have a BasedOn GridViewHeaderCellStyle attribute and  perhaps the control have no default color that in turn causing the problem.

After setting the BasedOn attribute, the color contrast are preserved as desired.

Dilyan Traykov
Telerik team
commented on 11 May 2022, 03:27 PM

Hi boon,

I'm glad to hear that you've found the source of the issue and managed to resolve it.

No answers yet. Maybe you can help?

Tags
GridView Styling
Asked by
boon
Top achievements
Rank 1
Share this question
or