What happened to DataGridColumnHeader? It looks like it was dropped when the DataGrid was moved into PresentationFramework.
Asked
Active
Viewed 1,855 times
2 Answers
5
DataGridColumnHeader
is under the System.Windows.Controls.Primitives
namespace in the PresentationFramework.dll
assembly.

Jeff Yates
- 61,417
- 20
- 137
- 189
-
Oh, they changed the namespace to System. I wonder why I didn't see that before. – Jonathan Allen Apr 07 '10 at 16:25
-
@Jonathan: Sometimes it's hard to see the wood for the trees. Glad I could help. – Jeff Yates Apr 07 '10 at 16:32
-
How do you reference it in XAML? – Thomas Jul 27 '10 at 17:39
-
@Tom: Same as any other type, include its namespace and then reference it via that. Is there a specific scenario where this isn't working? – Jeff Yates Jul 27 '10 at 18:10
-
MSDN doesn't show a namespace in the xaml example. Tried xmlns:prim="clr-namespace:System.Windows.Controls.Primitives;assembly=PresentationFramework", doesn't work. – Thomas Jul 27 '10 at 20:48
-
Perhaps I should make a new question so I can format my text :) – Thomas Jul 27 '10 at 20:49
-
1Did you make sure you have a reference to the DLL? It's working for me, so I'm not sure what's going on. – Jeff Yates Jul 28 '10 at 14:01
-
2http://stackoverflow.com/questions/3365350/wpf4-datagridheaderborder-in-a-xaml-style – Thomas Jul 29 '10 at 17:28
0
Something like
<DataGrid ItemsSource="{Binding}">
<DataGrid.Columns>
<DataGridTextColumn Header="Column Name" Binding="{Binding Name, Mode=TwoWay}" />
</DataGrid.Columns>
</DataGrid>

TFD
- 23,890
- 2
- 34
- 51
-
DataGridColumnHeader was used for custom styling across all headers. – Jonathan Allen Mar 31 '10 at 23:22
-