Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MahApps Metro and DataGridExtensions

In a project that I am starting I am using the 2 following libraries:

MahApps.Metro - http://mahapps.com/MahApps.Metro/

DataGridExtensions - https://github.com/dotnet/DataGridExtensions

DatagridExtensions has some pretty nice datagrid filtering tools. The only problem is that using it removes the Metro style from the datagrid. Is there any way I can keep the Metro Styling on the datagrid and use the extensions.

The only .xaml file I could find in the DataGridExtensions library was the generic.xaml file. I modified this to include BasedOn in any styles in there, as this has worked in the past:

e.g.

<Style TargetType="CheckBox" BasedOn="{StaticResource {x:Type CheckBox}}>
like image 487
Nick Williams Avatar asked Feb 03 '14 22:02

Nick Williams


1 Answers

Setting a default header style solved the problem for me:

<Style TargetType="{x:Type DataGridColumnHeader}"
       BasedOn="{StaticResource MetroDataGridColumnHeader}" />
like image 165
Lucas Trzesniewski Avatar answered Sep 21 '22 15:09

Lucas Trzesniewski