Smrf.NodeXL.ExcelTemplate.AutoFillResultsLegendControl.OnResize C# (CSharp) Method

OnResize() protected method

protected OnResize ( EventArgs e ) : void
e System.EventArgs
return void
    OnResize
    (
        EventArgs e
    )
    {
        AssertValid();

        base.OnResize(e);

        Int32 iWidth = this.ClientRectangle.Width;

        if (
            iWidth != m_iLastResizeWidth &&
            (
                m_oAutoFillWorkbookResults.
                    EdgeColorResults.ColumnAutoFilledWithCategories
                ||
                m_oAutoFillWorkbookResults.
                    VertexColorResults.ColumnAutoFilledWithCategories
            )
           )
        {
            // The edge color or vertex color was autofilled with categories,
            // which means that the control height depends on the control
            // width, which just changed.  Recalculate the control height.

            this.Height = CalculateHeight();
        }

        m_iLastResizeWidth = iWidth;
    }