views:

23

answers:

1

I found some styles for WPF DataGrid online and all of them are for pre-release DataGrid. Now, I'm using .NET4 DataGrid, I got a compile error complaining DataGridHeaderBorder cannot be found. Based on Microsoft, it is in Microsoft.Windows.Themes namespace. No matter what I try, I can't make it work.

A: 

This seems to be bug in .NET4 according to here. There is also a workaround. Just add a namespace reference like this:

xmlns:dg="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero">

You may have to manually add a reference to PresentationFramework.Aero in your project.

miliu