Beispiel #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="EditCurrentConfigurationCommandBinding&lt;TController, TModel&gt;"/> class.
        /// </summary>
        /// <param name="viewModel">The view model.</param>
        public EditCurrentConfigurationCommandBinding(ShellViewModel viewModel)
        {
            this.Command = ShellCommands.EditCurrentConfiguration;

            this.CanExecute += delegate(object sender, CanExecuteRoutedEventArgs e)
            {
                e.CanExecute = EditCurrentConfigurationCommand.CanExecute(viewModel, e.Parameter);
            };

            this.Executed += delegate(object sender, ExecutedRoutedEventArgs e)
            {
                EditCurrentConfigurationCommand.Execute(viewModel);
            };
        }