SizeChangedEventArgs.cs 729 B

12345678910111213141516171819202122232425262728293031
  1. using System;
  2. namespace Terminal.Gui {
  3. /// <summary>
  4. /// Args for events about Size (e.g. Resized)
  5. /// </summary>
  6. public class SizeChangedEventArgs : EventArgs {
  7. /// <summary>
  8. /// Creates a new instance of the <see cref="SizeChangedEventArgs"/> class.
  9. /// </summary>
  10. /// <param name="size"></param>
  11. public SizeChangedEventArgs (Size size)
  12. {
  13. Size = size;
  14. }
  15. /// <summary>
  16. /// Gets the size the event describes. This should
  17. /// reflect the new/current size after the event
  18. /// resolved.
  19. /// </summary>
  20. public Size Size { get; }
  21. /// <summary>
  22. /// Set to <see langword="true"/> to cause the resize to be cancelled, if appropriate.
  23. /// </summary>
  24. public bool Cancel { get; set; }
  25. }
  26. }