MahApps / MahApps.Metro

A framework that allows developers to cobble together a better UI for their own WPF applications with minimal effort.
https://mahapps.com
MIT License
9.32k stars 2.45k forks source link

Change MetroDataGrid Style #1447

Closed ncampuzano closed 9 years ago

ncampuzano commented 10 years ago

I want change the MetroDataGrid Style. When is selected row in DataGrid the background shouldn't change, either borderBrush , background and foreground should keep to equal . But I want do it for all DataGrids in my application.

AleksandarDev commented 10 years ago

You can copy/paste style from MAM, change it and add it to global resource dictionaries list (same place where you have MAM dictionaries). Put it after MAM dictionaries and make sure that you don't define style x:Key, in this way it will apply to all controls of targeted type and will override MAMs style.

ncampuzano commented 10 years ago

But, Can't I do Style with parameter the BasedOn in App.xaml ? Because, with your solution, when Mahapps does update my style will be outdated. I think your solution is temporal, but it isn't the best way.

killnine commented 10 years ago

Yeah, my data grid styling looks a little weird. Anyone else get this when selecting a row?

metrodatagrid_selection