Mahapps.metro: Checkboxes using Dark theme within DataGrid column appear unchecked (Server 2012 R2)

Created on 6 Jun 2020  路  10Comments  路  Source: MahApps/MahApps.Metro

Describe the bug

On Windows Server 2012 R2, using a Dark theme, checked DataGridCheckBoxColumn appears unchecked.

Steps to reproduce

On Windows Server 2012 R2, using a Dark theme,

 <DataGridCheckBoxColumn Binding="{Binding IsSelected}" Header="Include" />

Or, download https://certifytheweb.com, add a contact using New Certificate, then Add new Certificate with at least one domain. Include column should be checked in light or dark mode (changed under settings).

Expected behavior

image

Actual behavior

The checkboxes in this image are checked, but they don't look it until the theme is set back to light.

image

Environment

MahApps.Metro version: v2.0.1
Windows build number:  Windows 2012 R2 standard (via AWS lightsail)
Visual Studio: 2019 16.7.0
Target Framework: v4.6.2

_Originally posted by @webprofusion-chrisc in https://github.com/MahApps/MahApps.Metro/issues/3833#issuecomment-640007729_

Bug

Most helpful comment

Chuck Norris doesn't implement data grid improvements, the IL reconfigures dynamically according to his will.

All 10 comments

@webprofusion-chrisc It seems like that you use a different style for the CheckBox. So can you show this style?

@punker76 hmm, I do? Maybe! I did have a couple of naive style hacks (some of the borders were too white and the tab item grey was hard to read) but I don't know if they are affecting this:

https://github.com/webprofusion/certify/blob/development/src/Certify.UI/App.xaml

This is the actual usage in-situ: https://github.com/webprofusion/certify/blob/65e7257b50358e885d1f1bd26b8c6773d299522a/src/Certify.UI/Controls/ManagedCertificate/CertificateDomains.xaml#L218

Thanks! I just figured this out at the exact same time, I reproduced it using the MahApps.Metro.Demo and removing those attributes. I'll do that. Does this still count as a bug (i.e. should there be a default instead of just not being set)?

@webprofusion-chrisc I think this is not possible due to the way the DataGrid is implemented. 馃檨

@webprofusion-chrisc @timunie I found a way to do this.

@punker76 Did you ask Chuck Norris? I read abot it on a MS page that said it is not possible.

If it works this would be a huge improvement.

Chuck Norris doesn't implement data grid improvements, the IL reconfigures dynamically according to his will.

@webprofusion-chrisc this has now been fixed, and it will be released in the next version of MahApps.Metro

@punker76 fantastic! Much appreciated, I know this was quite complicated but hopefully it makes it easier for people to use.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

webprofusion-chrisc picture webprofusion-chrisc  路  11Comments

ghost picture ghost  路  18Comments

seb30 picture seb30  路  12Comments

SamOxyPlot picture SamOxyPlot  路  14Comments

StickNitro picture StickNitro  路  11Comments