ViewEventArgs.cs 840 B

12345678910111213141516171819202122232425262728293031323334
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. namespace Terminal.Gui{
  7. /// <summary>
  8. /// Args for events that relate to specific <see cref="View"/>
  9. /// </summary>
  10. public class ViewEventArgs :EventArgs{
  11. /// <summary>
  12. /// Creates a new instance of the <see cref="ViewEventArgs"/> class.
  13. /// </summary>
  14. /// <param name="view"></param>
  15. public ViewEventArgs (View view)
  16. {
  17. View = view;
  18. }
  19. /// <summary>
  20. /// The view that the event is about.
  21. /// </summary>
  22. /// <remarks>
  23. /// Can be different from the sender of the <see cref="EventHandler"/>
  24. /// for example if event describes the adding a child then sender may
  25. /// be the parent while <see cref="View"/> is the child
  26. /// being added.
  27. /// </remarks>
  28. public View View { get; }
  29. }
  30. }