Example #1
0
        protected override Size MeasureOverride(Size availableSize)
        {
            this.Populate(this.ElementWidth(availableSize));
            double val2 = 0.0;

            if (this.Children.Count > 0)
            {
                Size availableSize1 = new Size(double.PositiveInfinity, double.PositiveInfinity);
                foreach (UIElement uiElement in this.Children)
                {
                    uiElement.Measure(availableSize1);
                }
                val2 = EnumerableFunctions.MaxOrNullable <double>(Enumerable.Select <UIElement, double>(Enumerable.Cast <UIElement>((IEnumerable)this.Children), (Func <UIElement, double>)(child => this.ElementHeight(XYAxisBasePanel.GetDesiredSize(child)) + this.ElementOffset(child)))) ?? 0.0;
            }
            if (this.Orientation == Orientation.Horizontal)
            {
                return(new Size(0.0, Math.Max(0.0, val2)));
            }
            return(new Size(Math.Max(0.0, val2), 0.0));
        }