Why doesn't my binding update whenever EditingElementStyle AND ElementStyle are set to a custom styl
- by Pakman
In my Visual Studio 2010 WPF application, I have the following (simplified) style:
<Style x:Key="MyStyle" TargetType="{x:Type CheckBox}">
<Setter Property="Background" Value="Blue" />
</Style>
If I use it as the ElementStyle AND EditingElementStyle in my DataGridCheckBoxColumn:
<DataGridCheckBoxColumn Binding="{Binding IsEnabled}"
ElementStyle="{StaticResource MyStyle}"
EditingElementStyle="{StaticResource MyStyle}" />
Then my binding, IsEnabled, does not toggle when I check/uncheck a row's checkbox. If I remove either ElementStyle, EditingElementStyle, or both, then the binding updates no problem. Why is this?!
Note: sometimes clicking around will produce an update to the binding (detected via debugging) - this is not the same as clicking another row to "commit" the value, though!
Thanks!