MeasureItemEventArgs.cs 808 B

123456789101112131415161718192021222324252627282930313233
  1. using System.Drawing;
  2. namespace System.Windows.Forms
  3. {
  4. public class MeasureItemEventArgs : EventArgs
  5. {
  6. public Graphics Graphics { get; }
  7. public int Index { get; }
  8. public int ItemHeight { get; set; }
  9. public int ItemWidth { get; set; }
  10. public MeasureItemEventArgs(Graphics graphics, int index, int itemHeight)
  11. {
  12. Graphics = graphics;
  13. Index = index;
  14. ItemHeight = itemHeight;
  15. ItemWidth = 0;
  16. }
  17. public MeasureItemEventArgs(Graphics graphics, int index)
  18. {
  19. Graphics = graphics;
  20. Index = index;
  21. ItemHeight = 0;
  22. ItemWidth = 0;
  23. }
  24. }
  25. public delegate void MeasureItemEventHandler(object sender, MeasureItemEventArgs e);
  26. }