IAction.cs 761 B

12345678910111213141516
  1. namespace Avalonia.Xaml.Interactivity;
  2. /// <summary>
  3. /// Interface implemented by all custom actions.
  4. /// </summary>
  5. public interface IAction
  6. {
  7. /// <summary>
  8. /// Executes the action.
  9. /// </summary>
  10. /// <param name="sender">The <see cref="object"/> that is passed to the action by the behavior. Generally this is <seealso cref="IBehavior.AssociatedObject"/> or a target object.</param>
  11. /// <param name="parameter">The value of this parameter is determined by the caller.</param>
  12. /// <remarks> An example of parameter usage is EventTriggerBehavior, which passes the EventArgs as a parameter to its actions.</remarks>
  13. /// <returns>Returns the result of the action.</returns>
  14. object? Execute(object? sender, object? parameter);
  15. }