public AddGroupPageController() { InitializeComponent(); ObservableCollection <MajorTable> majors = new ObservableCollection <MajorTable>(); var majorController = new MajorController(); var majorsList = majorController.GetMajors(); foreach (Major m in majorsList) { majors.Add(new MajorTable { Id = m.Id, Name = m.Name }); } GroupDataGrid.ItemsSource = majors; /* for (int i = 0; i < GroupDataGrid.Items.Count; i++) * { * (DataGridRow)GroupDataGrid.Items.IndexOf(0)).Tag.ToString() = "ReadOnly"; * (DataGridRow)GroupDataGrid.Items. * GroupDataGrid.Columns[i].IsReadOnly = true; * //GroupDataGrid. * }*/ // Point relativePoint = myVisual.TransformToAncestor(rootVisual) // .Transform(new Point(0, 0)); }
private void ButtonFecr_Click(object sender, RoutedEventArgs e) { var majorController = new MajorController(); // majorController.Add("poz"); var majorsList = majorController.GetMajors(); // int k = 0; //groupController. }