public override void OnNavigatedTo(object navigationParameter, NavigationMode navigationMode, Dictionary <string, object> viewModelState) { if (navigationMode == NavigationMode.New) { if (!viewModelState.ContainsKey("DanhSachTruyen")) { FirstLoadCommand.Execute(); } } base.OnNavigatedTo(navigationParameter, navigationMode, viewModelState); }
public override void OnNavigatedTo(object navigationParameter, NavigationMode navigationMode, Dictionary <string, object> viewModelState) { if (navigationParameter is ThNavParamater) { var obj = navigationParameter as ThNavParamater; CurrentChapter = obj.Chap; _tempIndexOfNumberChapterInPage = CurrentChapter.IndexNumberPageOfChapter; _truyen = new Truyen(obj.TrangTruyen); _truyen.TruyenUrl = CurrentChapter.TruyenUrl; _truyen.CurrentPageRead = CurrentChapter.PageOfChapter; FirstLoadCommand.Execute(); } base.OnNavigatedTo(navigationParameter, navigationMode, viewModelState); }
public override void OnNavigatedTo(object navigationParameter, NavigationMode navigationMode, Dictionary <string, object> viewModelState) { if (navigationParameter != null && navigationMode != NavigationMode.Back) { if (_truyen != null && navigationParameter is Truyen) { _truyen = (Truyen)navigationParameter; TrangDocTruyen = _truyen.Site; _truyen.PropertyChanged += _truyen_PropertyChanged; FirstLoadCommand.Execute(); } } base.OnNavigatedTo(navigationParameter, navigationMode, viewModelState); }