protected override void CreateChildElements() { base.CreateChildElements(); this.scrollableRows = new ScrollableVirtualRowsContainer(); this.Children.Add((RadElement)this.scrollableRows); this.topPinnedRows = new StackLayoutElement(); this.topPinnedRows.Orientation = Orientation.Vertical; this.topPinnedRows.ElementSpacing = -1; this.Children.Add((RadElement)this.topPinnedRows); this.bottomPinnedRows = new StackLayoutElement(); this.bottomPinnedRows.Orientation = Orientation.Vertical; this.bottomPinnedRows.ElementSpacing = -1; this.Children.Add((RadElement)this.bottomPinnedRows); }
private float GetParentRowOffset() { float num1 = 0.0f; RadElement parent = this.Parent; int rowIndex = this.rowIndex; while (parent != null) { ScrollableVirtualRowsContainer virtualRowsContainer = parent as ScrollableVirtualRowsContainer; VirtualGridRowElement virtualGridRowElement = parent as VirtualGridRowElement; if (virtualRowsContainer != null) { int num2 = -1; IEnumerator enumerator = ((IEnumerable)virtualRowsContainer.TableElement.RowScroller).GetEnumerator(); try { if (enumerator.MoveNext()) { num2 = (int)enumerator.Current; } } finally { (enumerator as IDisposable)?.Dispose(); } if (num2 != -1) { num1 += virtualRowsContainer.ScrollOffset.Height + (float)virtualRowsContainer.TableElement.RowScroller.GetItemOffset(rowIndex) - (float)virtualRowsContainer.TableElement.RowScroller.GetItemOffset(num2) + (float)virtualRowsContainer.TableElement.RowsViewState.GetItemSize(rowIndex, true, false) + virtualRowsContainer.TableElement.ViewElement.TopPinnedRows.DesiredSize.Height; } else { continue; } } if (virtualGridRowElement != null) { rowIndex = virtualGridRowElement.rowIndex; } parent = parent.Parent; } return(num1); }