private async void GoToNextPage(object sender, ExecuteEventArgs args) { int index = this.group.Items.IndexOf(this.viewmodel) + 1; this.viewmodel = this.group.Items[index] as ArticleDataItem; await this.InvokeAndNotifyOnError(this.viewmodel.OnSelectedAsync(this, this.progress)); NotifyAppBarCommands(); }
private async void OnRefreshCommandExecuteRaised(object sender, ExecuteEventArgs args) { var pivotItem = this.mainPivot.SelectedItem as FrameworkElement; var viewmodel = pivotItem.DataContext as IContentViewModel; if (viewmodel != null) await viewmodel.OnRefreshAsync(this, this.Progress); }
private async void OnRefreshCommandExecute(object sender, ExecuteEventArgs args) { await this.viewmodel.OnRefreshAsync(this, this.Progress); NotifyCommands(); }
private void OnLogoutCommandExecuted(object sender, ExecuteEventArgs args) { var response = MessageBox.Show("Are you sure you want to logout?", "Logout?", MessageBoxButton.OKCancel); if (response == MessageBoxResult.OK) { App.UserContext.Logout(new WPSettingsModel()); MessageBox.Show("Restart the application to complete.", "Logout Complete.", MessageBoxButton.OK); } }