public void showListSubject(List <DepartmentSummaryModel> items) { this.Dispatcher.Invoke(() => { icListSubject.ItemsSource = ListSubjectContext.FromDepartmentSummary(items, GoToListSubjectofDepartment); }); }
public static List <ListSubjectContext> FromDepartmentSummary(List <DepartmentSummaryModel> departmentSummaries, Action <DepartmentSummaryModel> goToListSubjectofDepartment) { var list = new List <ListSubjectContext>(); foreach (var summary in departmentSummaries) { var context = new ListSubjectContext(); context.DepartmentSummary = summary; context._command = new ListSubjectCommand(goToListSubjectofDepartment); list.Add(context); } return(list); }