I would like to create this styel in codebehind, but I don't know how to set the binding to the datagrid row property.
<UserControl.Resources>
<Style x:Key="MyStyle" TargetType="{x:Type DataGridCell}">
<Setter Property="Background" Value="{Binding SelectedColour[0]}" />
</Style>
</UserControl.Resources>
How can I do it? Thank you Andrea