SizeChangedEventArgs.cs 679 B

123456789101112131415161718192021222324
  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) => Size = size;
  12. /// <summary>
  13. /// Gets the size the event describes. This should reflect the new/current size after the event.
  14. /// </summary>
  15. public Size Size { get; }
  16. /// <summary>
  17. /// Set to <see langword="true" /> to cause the resize to be cancelled, if appropriate.
  18. /// </summary>
  19. public bool Cancel { get; set; }
  20. }