/// <summary> /// Initializes a new instance of the <see cref="OpenRecentCommandBinding<TController, TModel>"/> class. /// </summary> /// <param name="viewModel">The view model.</param> public OpenRecentCommandBinding(ShellViewModel viewModel, Window owner) { this.Command = ShellCommands.OpenRecent; this.CanExecute += delegate(object sender, CanExecuteRoutedEventArgs e) { e.CanExecute = OpenRecentCommand.CanExecute(viewModel); }; this.Executed += delegate(object sender, ExecutedRoutedEventArgs e) { OpenRecentCommand.Execute(viewModel, owner); }; }
internal static void Execute(ShellViewModel viewModel, Window window) { OpenRecentCommand.Open(viewModel, window); }
internal static bool CanExecute(ShellViewModel viewModel) { return(OpenRecentCommand.CanOpen(viewModel)); }