private void NavToHome() { _studentViewModel.LoadStudents(); Menu = _menuViewModel; ClockViewModel = _clockViewModel; CurrentViewModel = _studentViewModel; }
private void OnNav(NavigationTarget target) { CurrentTab = target; switch (target) { case NavigationTarget.Student: _studentViewModel.LoadStudents(); CurrentViewModel = _studentViewModel; break; case NavigationTarget.Grade: _gradeViewModel.LoadGrades(); CurrentViewModel = _gradeViewModel; break; case NavigationTarget.Chart: CurrentViewModel = _chartViewModel; break; case NavigationTarget.Test: _testViewModel.LoadTests(); CurrentViewModel = _testViewModel; break; case NavigationTarget.Settings: CurrentViewModel = _settingsViewModel; break; default: CurrentViewModel = _testViewModel; break; } }
private void StudentViewControl_Loaded(object sender, RoutedEventArgs e) { StudentViewModel studentViewModelObject = new StudentViewModel(); studentViewModelObject.LoadStudents(); StudentViewControl.DataContext = studentViewModelObject; }
private void StudentViewControl_Loaded(object sender, RoutedEventArgs e) { var obj = new StudentViewModel(); var type = obj.GetType(); var method = type.GetMethod("Print"); method.Invoke(obj, null); StudentViewModel studentViewModelObject = new StudentViewModel(); studentViewModelObject.LoadStudents(); StudentViewControl.DataContext = studentViewModelObject; }