using System.Drawing; namespace System.Windows.Forms { public class MeasureItemEventArgs : EventArgs { public Graphics Graphics { get; } public int Index { get; } public int ItemHeight { get; set; } public int ItemWidth { get; set; } public MeasureItemEventArgs(Graphics graphics, int index, int itemHeight) { Graphics = graphics; Index = index; ItemHeight = itemHeight; ItemWidth = 0; } public MeasureItemEventArgs(Graphics graphics, int index) { Graphics = graphics; Index = index; ItemHeight = 0; ItemWidth = 0; } } public delegate void MeasureItemEventHandler(object sender, MeasureItemEventArgs e); }