Silverlight datagrid template column

933 Views Asked by At

I'm fairly new to Silverligt 5 and xaml for that matter and I have come across a problem. I have a datagrid containing a template column. This template consists in a bunch of TextBlocks, images and other controls. I've customized the way the grid looks by overriding the grid/row/cell style using the VisualStateManager. Everything works fine when changing for instance the row background and borders on MouseOver. However I didn't find a way to change the foreground color of just one of the TextBlocks in the column template. So I'm not trying to set the foreground of the cell it self but only for one of the many controls(a TextBlock) in the column template. When the user is hovering a grid row, I want - apart from changing the background of the entire row, to also change the foreground color of this particular TextBlock.

Hope this makes sense

1

There are 1 best solutions below

0
On BEST ANSWER

You need define style for DataGridColumnHeader Template look here : MSDN