protected virtual void Layout(RadSplitContainer container)
        {
            int layoutOffset    = this.GetLayoutOffset();
            int availableLength = this.layoutInfo.availableLength;
            int count           = this.layoutInfo.LayoutTargets.Count;

            for (int panelIndex = 0; panelIndex < count; ++panelIndex)
            {
                SplitPanel layoutTarget = this.layoutInfo.LayoutTargets[panelIndex];
                int        num          = layoutTarget.SizeInfo.MeasuredLength;
                if (panelIndex == count - 1)
                {
                    num = availableLength;
                }
                Rectangle rectangle;
                Rectangle bounds;
                if (this.layoutInfo.Orientation == Orientation.Vertical)
                {
                    rectangle = new Rectangle(layoutOffset, this.layoutInfo.contentRect.Top, num, this.layoutInfo.contentRect.Height);
                    bounds    = new Rectangle(rectangle.Left - this.layoutInfo.splitterLength, rectangle.Top, this.layoutInfo.splitterLength, rectangle.Height);
                }
                else
                {
                    rectangle = new Rectangle(this.layoutInfo.contentRect.Left, layoutOffset, this.layoutInfo.contentRect.Width, num);
                    bounds    = new Rectangle(rectangle.Left, rectangle.Top - this.layoutInfo.splitterLength, rectangle.Width, this.layoutInfo.splitterLength);
                }
                layoutTarget.Bounds = rectangle;
                layoutOffset       += num + this.layoutInfo.splitterLength;
                availableLength    -= num + this.layoutInfo.splitterLength;
                if (panelIndex > 0)
                {
                    container.UpdateSplitter(this.layoutInfo, panelIndex, bounds);
                }
            }
        }
        /// <summary>
        /// Performs the core layout logic. Updates each panel's bounds, keeping in mind restrictions like Minimum and Maximum size.
        /// </summary>
        /// <param name="container"></param>
        protected virtual void Layout(RadSplitContainer container)
        {
            SplitPanel panel;
            Rectangle  panelBounds;
            Rectangle  splitterBounds;

            int length    = 0;
            int offset    = this.GetLayoutOffset();
            int remaining = this.layoutInfo.availableLength;

            int count = this.layoutInfo.LayoutTargets.Count;

            for (int i = 0; i < count; i++)
            {
                panel = this.layoutInfo.LayoutTargets[i];
                SplitPanelSizeInfo sizeInfo = panel.SizeInfo;
                length = sizeInfo.measuredLength;
                if (i == count - 1)
                {
                    length = remaining;
                }

                switch (this.layoutInfo.Orientation)
                {
                case Orientation.Vertical:
                    panelBounds    = new Rectangle(offset, this.layoutInfo.contentRect.Top, length, this.layoutInfo.contentRect.Height);
                    splitterBounds = new Rectangle(panelBounds.Left - this.layoutInfo.splitterLength, panelBounds.Top, this.layoutInfo.splitterLength, panelBounds.Height);
                    break;

                default:
                    panelBounds    = new Rectangle(this.layoutInfo.contentRect.Left, offset, this.layoutInfo.contentRect.Width, length);
                    splitterBounds = new Rectangle(panelBounds.Left, panelBounds.Top - this.layoutInfo.splitterLength, panelBounds.Width, this.layoutInfo.splitterLength);
                    break;
                }

                panel.Bounds = panelBounds;
                offset      += (length + this.layoutInfo.splitterLength);
                remaining   -= (length + this.layoutInfo.splitterLength);

                if (i > 0)
                {
                    container.UpdateSplitter(this.layoutInfo, i, splitterBounds);
                }
            }
        }