public MainVM() { model = new Model(); PageManager.SetModel(model); CurrentPage = PageManager.GetPageByType(PageType.StudentList); PageManager.CurrentPageChanged += PageManager_CurrentPageChanged; OpenGroupList = new MvvmCommand(() => PageManager.ChangePageTo(PageType.GroupList), () => true); OpenStudentList = new MvvmCommand(() => PageManager.ChangePageTo(PageType.StudentList), () => true); }
void PageManager_CurrentPageChanged(object sender, PageType e) { CurrentPage = PageManager.GetPageByType(e); NotifyPropertyChanged("CurrentPage"); }