/// <inheritdoc />
        protected override Size MeasureOverride(Size availableSize)
        {
            // after the column headers are measured we should allow the measurement of the cells.
            this.Owner.CellsPanel.isDirectMeasure = false;

            if (this.skipSingleMeasurePass)
            {
                this.skipSingleMeasurePass = false;
                return(this.desiredSize);
            }

            if (this.Owner == null)
            {
                return(base.MeasureOverride(availableSize));
            }

            var size = new Telerik.Core.RadSize(Math.Max(availableSize.Width, this.Owner.CellsHostAvaialbleSize.Width), Math.Max(availableSize.Height, this.Owner.CellsHostAvaialbleSize.Height));

            this.Owner.Model.pendingMeasureFlags &= ~InvalidateMeasureFlags.Header;
            this.desiredSize = this.Owner.OnHeaderRowMeasure(this.Owner.CellsHostAvaialbleSize).ToSize();

            ////Force sync between PhysicalOffset and Scrollview Offset in case header binding is used and width is auto, causing changing scrollviewer extend.
            this.Owner.UpdateHorizontalPosition();

            return(this.desiredSize);
        }
Example #2
0
 public static Size ToSize(this RadSize size)
 {
     return(new Size(size.Width, size.Height));
 }