protected override void HandleOnNavigatedTo(NavigationEventArgs e) { base.HandleOnNavigatedTo(e); if (this._isInitialized) { return; } this._viewModel = new StickersStoreViewModel(); this.DataContext = (object)this._viewModel; this._viewModel.Reload(); this._isInitialized = true; }
protected override void HandleOnNavigatedTo(NavigationEventArgs e) { base.HandleOnNavigatedTo(e); if (this._isInitialized) { return; } IDictionary <string, string> queryString = ((Page)this).NavigationContext.QueryString; long result1 = 0; bool result2 = false; if (queryString.ContainsKey("UserOrChatId")) { long.TryParse(queryString["UserOrChatId"], out result1); } if (queryString.ContainsKey("IsChat")) { bool.TryParse(queryString["IsChat"], out result2); } this._viewModel = new StickersStoreViewModel(result1, result2); base.DataContext = this._viewModel; this._viewModel.Reload(true); this._isInitialized = true; }