/// <summary> /// Initializes a new instance of the <see cref="ImportCommandBinding<TController, TModel>"/> class. /// </summary> /// <param name="viewModel">The view model.</param> /// <param name="owner">The owner window.</param> public ImportCommandBinding(ShellViewModel viewModel, Window owner) { this.Command = ShellCommands.Import; this.CanExecute += delegate(object sender, CanExecuteRoutedEventArgs e) { e.CanExecute = ImportCommand <ShellController, ConfigurationModel> .CanOpen(viewModel); }; this.Executed += delegate(object sender, ExecutedRoutedEventArgs e) { ImportCommand <ShellController, ConfigurationModel> .Open(viewModel, owner, e.Parameter as string); }; }