private void IsCheckBox_Checked(object sender, RoutedEventArgs e) { if (_updatedConfigValues == null) { return; } winControls.CheckBox checkBox = (winControls.CheckBox)sender; string configKey = GetConfigKey(checkBox.Name, checkBox.GetType()); string configValue = checkBox.IsChecked.ToString(); _updatedConfigValues[configKey] = configValue; }