I want to know if I can get the Item source item from a checked change event in WPF?
XAML
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<CheckBox IsChecked="{Binding Active, Mode=TwoWay}" Checked="CheckBox_Checked" HorizontalAlignment="Center"></CheckBox>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
Sample C# (on the lines of correct answer.. I hope)
private void CheckBox_Checked(object sender, RoutedEventArgs e)
{
**// Its not e.source, most events it's e.item...but the checked event doesn't use this..**
Customer c = e.Source as Customer;
if(c != null)
.....
}
Thanks