What happened to DataGridColumnHeader? It looks like it was dropped when the DataGrid was moved into PresentationFramework.
A:
Something like
<DataGrid ItemsSource="{Binding}">
<DataGrid.Columns>
<DataGridTextColumn Header="Column Name" Binding="{Binding Name, Mode=TwoWay}" />
</DataGrid.Columns>
</DataGrid>
TFD
2010-03-31 21:48:09
DataGridColumnHeader was used for custom styling across all headers.
Jonathan Allen
2010-03-31 23:22:29
Yeah, that's all in WPF styles. What's your specific problem?
TFD
2010-04-01 00:37:04
+3
A:
DataGridColumnHeader
is under the System.Windows.Controls.Primitives
namespace in the PresentationFramework.dll
assembly.
Jeff Yates
2010-04-06 17:50:22
Oh, they changed the namespace to System. I wonder why I didn't see that before.
Jonathan Allen
2010-04-07 16:25:05
@Jonathan: Sometimes it's hard to see the wood for the trees. Glad I could help.
Jeff Yates
2010-04-07 16:32:30
@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
2010-07-27 18:10:46
MSDN doesn't show a namespace in the xaml example.Tried xmlns:prim="clr-namespace:System.Windows.Controls.Primitives;assembly=PresentationFramework", doesn't work. <Style x:Key="{x:Type DataGridRowHeader}" TargetType="{x:Type DataGridRowHeader}"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type DataGridRowHeader}"> <Grid> <prim:DataGridHeaderBorder ...The only way I can get it to compile is by cheating and using the WPFToolkit xmlns.
Tom
2010-07-27 20:48:42
Did 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
2010-07-28 14:01:24
http://stackoverflow.com/questions/3365350/wpf4-datagridheaderborder-in-a-xaml-style
Tom
2010-07-29 17:28:00