ComponentFactory.Krypton.Toolkit.KryptonListBox.OnListBoxMeasureItem C# (CSharp) Method

OnListBoxMeasureItem() private method

private OnListBoxMeasureItem ( object sender, System.Windows.Forms.MeasureItemEventArgs e ) : void
sender object
e System.Windows.Forms.MeasureItemEventArgs
return void
        private void OnListBoxMeasureItem(object sender, MeasureItemEventArgs e)
        {
            UpdateContentFromItemIndex(e.Index);

            // Ask the view element to layout in given space, needs this before a render call
            using (ViewLayoutContext context = new ViewLayoutContext(this, Renderer))
            {
                Size size = _drawButton.GetPreferredSize(context);
                e.ItemWidth = size.Width;
                e.ItemHeight = size.Height;
            }
        }
KryptonListBox