IRelayCommand.cs 699 B

1234567891011121314151617181920
  1. // Licensed to the .NET Foundation under one or more agreements.
  2. // The .NET Foundation licenses this file to you under the MIT license.
  3. // See the LICENSE file in the project root for more information.
  4. using System.Windows.Input;
  5. namespace CommunityToolkit.Mvvm.Input;
  6. /// <summary>
  7. /// An interface expanding <see cref="ICommand"/> with the ability to raise
  8. /// the <see cref="ICommand.CanExecuteChanged"/> event externally.
  9. /// </summary>
  10. public interface IRelayCommand : ICommand
  11. {
  12. /// <summary>
  13. /// Notifies that the <see cref="ICommand.CanExecute"/> property has changed.
  14. /// </summary>
  15. void NotifyCanExecuteChanged();
  16. void Execute(object? sender, object? parameter);
  17. }