/// <summary> /// Initializes a new instance of the <see cref="PauseCommandBinding<TController, TModel>"/> class. /// </summary> /// <param name="viewModel">The view model.</param> public RefreshCommandBinding(ShellViewModel viewModel) { this.Command = ShellCommands.Refresh; this.CanExecute += delegate(object sender, CanExecuteRoutedEventArgs e) { e.CanExecute = RefreshCommand.CanExecute(viewModel); }; this.Executed += delegate(object sender, ExecutedRoutedEventArgs e) { RefreshCommand.Execute(viewModel); }; }
internal static void Execute(ShellViewModel viewModel) { RefreshCommand.Refresh(viewModel); }
internal static bool CanExecute(ShellViewModel viewModel) { return(RefreshCommand.CanRefresh(viewModel)); }