I've seen in several forum posts (like here: http://www.telerik.com/community/forums/wpf/gridview/binding-to-cell-of-gridview-and-datacontext-says-datarow.aspx) that the Data Context for a cell is the entire object, not just the bound property. Is there a way to change this behavior so the data context is only what the column is bound to? We are binding to complex objects that are all the same type (called ValueWithFormat) and would like to set cell properties based on this type. Here's my example cell template.
<
DataTemplate
x:Key
=
"ValueWithFormatCellTemplate"
>
<
Grid
Background
=
"{Binding BackgroundBrush}"
>
<
Border
BorderBrush
=
"{Binding BorderBrush}"
BorderThickness
=
"1"
>
<
TextBlock
FontWeight
=
"{Binding FontWeight}"
Foreground
=
"{Binding ForegroundColor}"
Text
=
"{Binding}"
ToolTip
=
"{Binding ToolTip}"
/>
</
Border
>
</
Grid
>
</
DataTemplate
>