OrientationEventArgs.cs 652 B

12345678910111213141516171819
  1. namespace Terminal.Gui;
  2. /// <summary><see cref="EventArgs"/> for <see cref="Orientation"/> events.</summary>
  3. public class OrientationEventArgs : EventArgs
  4. {
  5. /// <summary>Constructs a new instance.</summary>
  6. /// <param name="orientation">the new orientation</param>
  7. public OrientationEventArgs (Orientation orientation)
  8. {
  9. Orientation = orientation;
  10. Cancel = false;
  11. }
  12. /// <summary>If set to true, the orientation change operation will be canceled, if applicable.</summary>
  13. public bool Cancel { get; set; }
  14. /// <summary>The new orientation.</summary>
  15. public Orientation Orientation { get; set; }
  16. }