private void Field_FieldSelectionChanged(object sender, FieldSelectionChangedEventArgs e) { var reportField = e.ChangedReportField; if (reportField.IsSelected) SelectedFields.Add(new ReportField { DisplayName = reportField.DisplayName, Name = reportField.Name }); else SelectedFields.Remove(SelectedFields.Where((fld) => fld.Name == reportField.Name).FirstOrDefault()); }
public void MoveFields(FieldData[] fieldsData) { foreach (var field in fieldsData) { if (field.IsSelected) { field.IsSelected = false; AvailableFields.Add(field); SelectedFields.Remove(field); } else { field.IsSelected = true; AvailableFields.Remove(field); SelectedFields.Add(field); } } }