protected override SizeF ArrangeOverride(SizeF finalSize) { this.Layout.Arrange(this.GetClientRectangle(finalSize)); PinnedColumnsContainerElement containerElement1 = this.leftPinnedColumns; PinnedColumnsContainerElement containerElement2 = this.rightPinnedColumns; if (this.RightToLeft) { containerElement1 = this.rightPinnedColumns; containerElement2 = this.leftPinnedColumns; } float x1 = 0.0f; containerElement1.Arrange(new RectangleF(x1, 0.0f, containerElement1.DesiredSize.Width, finalSize.Height)); if ((double)containerElement1.DesiredSize.Width > 0.0) { x1 += containerElement1.DesiredSize.Width + (float)this.elementSpacing; } this.scrollableColumns.Arrange(new RectangleF(x1, 0.0f, this.scrollableColumns.DesiredSize.Width, finalSize.Height)); float x2 = x1 + this.scrollableColumns.DesiredSize.Width; if ((double)containerElement2.DesiredSize.Width > 0.0) { x2 += (float)this.elementSpacing; } containerElement2.Arrange(new RectangleF(x2, 0.0f, containerElement2.DesiredSize.Width, finalSize.Height)); return(finalSize); }
protected override void CreateChildElements() { base.CreateChildElements(); this.leftPinnedColumns = this.CreateLeftPinnedColumnsContainer(); this.leftPinnedColumns.Context = (GridRowElement)this; this.Children.Add((RadElement)this.leftPinnedColumns); this.scrollableColumns = this.CreateScrollableColumnsContainer(); this.scrollableColumns.Context = (GridRowElement)this; this.Children.Add((RadElement)this.scrollableColumns); this.rightPinnedColumns = this.CreateRightPinnedColumnsContainer(); this.rightPinnedColumns.Context = (GridRowElement)this; this.Children.Add((RadElement)this.rightPinnedColumns); }
protected override SizeF MeasureElements( SizeF availableSize, SizeF clientSize, Padding borderThickness) { SizeF empty = SizeF.Empty; PinnedColumnsContainerElement containerElement1 = this.leftPinnedColumns; PinnedColumnsContainerElement containerElement2 = this.rightPinnedColumns; if (this.RightToLeft) { containerElement1 = this.rightPinnedColumns; containerElement2 = this.leftPinnedColumns; } containerElement1.Measure(availableSize); float num1 = 0.0f; if ((double)containerElement1.DesiredSize.Width > 0.0) { num1 = containerElement1.DesiredSize.Width + (float)this.elementSpacing; } availableSize.Width -= num1; empty.Height = containerElement1.DesiredSize.Height; empty.Width = num1; containerElement2.Measure(availableSize); float num2 = (double)containerElement2.DesiredSize.Width <= 0.0 ? 0.0f : containerElement2.DesiredSize.Width + (float)this.elementSpacing; availableSize.Width -= num2; empty.Height = Math.Max(empty.Height, containerElement2.DesiredSize.Height); empty.Width += num2; this.scrollableColumns.Measure(availableSize); empty.Height = Math.Max(empty.Height, this.scrollableColumns.DesiredSize.Height); empty.Width += this.scrollableColumns.DesiredSize.Width; if (float.IsInfinity(availableSize.Height)) { empty.Height += (float)(this.Padding.Vertical + borderThickness.Vertical); } return(empty); }