ComponentFactory.Krypton.Toolkit.KryptonSplitContainer.OnResize C# (CSharp) Method

OnResize() protected method

Raises the Resize event.
protected OnResize ( EventArgs e ) : void
e System.EventArgs An EventArgs that contains the event data.
return void
        protected override void OnResize(EventArgs e)
        {
            // Do not alter the distance whilst size is changing because of initialization
            if (!IsInitializing)
            {
                // Caluclate new percentage based on the new size
                if (Orientation == Orientation.Vertical)
                    _splitterDistance = (int)(Width * _splitterPercent);
                else
                    _splitterDistance = (int)(Height * _splitterPercent);
            }

            // Let base class raise events
            _resizing = true;
            base.OnResize(e);
            _resizing = false;

            // We must have a layout calculation
            ForceControlLayout();
        }