示例#1
0
        public override void CalcLayoutInfoRecursive(ref bool anyexpandx, ref bool anyexpandy)
        {
            Child1.CalcLayoutInfoRecursive(ref anyexpandx, ref anyexpandy);
            Child2.CalcLayoutInfoRecursive(ref anyexpandx, ref anyexpandy);
            base.CalcLayoutInfoRecursive(ref anyexpandx, ref anyexpandy);

            if (!Vertical)
            {
                LayoutInfo.Size = new Size2i(
                    Child1.LayoutInfo.Size.Width + Child2.LayoutInfo.Size.Width + DriverSplitter.SplitterWidth,
                    Math.Max(Child1.LayoutInfo.Size.Height, Child2.LayoutInfo.Size.Height)
                    );
            }
            else
            {
                LayoutInfo.Size = new Size2i(
                    Math.Max(Child1.LayoutInfo.Size.Width, Child2.LayoutInfo.Size.Width),
                    Child1.LayoutInfo.Size.Height + Child2.LayoutInfo.Size.Height + DriverSplitter.SplitterWidth
                    );
            }
        }