/// <summary> /// Remove the DataGroup to the list of receipeListSelected /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="RoutedEventArgs"/> instance containing the event data.</param> private void CheckBox_Unchecked(object sender, RoutedEventArgs e) { if (sender is CheckBox) { CheckBox cb = (CheckBox)sender; SampleDataGroup data = (SampleDataGroup)cb.DataContext; receipeListSelectedModel.RemoveReceipeList(data); } }