private Span GetRelativeSpan() { Debug.Assert(IsContainer && !VariantByContainer); var originOffset = GridTrackOwner.GetGridSpan(Template.RowRange).StartTrack.StartOffset; return(new Span(GridTrack.StartOffset - originOffset, GridTrack.EndOffset - originOffset)); }
private double GetContainerViewsLength(int count) { Debug.Assert(count >= 0 && count <= MaxContainerCount); if (count == 0) { return(0); } return(VariantByContainer ? VariantLengthHandler.GetContainerViewsLength(GridTrack, count) : GridTrackOwner.GetGridSpan(Template.RowRange).MeasuredLength *count); }
private Span GetExtentSpan() { Debug.Assert(GridTrackOwner == ScrollableManager.GridTracksMain); Debug.Assert(!IsContainer); if (GridTrack.IsHead) { return(new Span(GridTrack.StartOffset, GridTrack.EndOffset)); } Debug.Assert(GridTrack.IsTail); var delta = GetContainerViewsLength(MaxContainerCount); if (!GridTrackOwner.VariantByContainer && MaxContainerCount > 0) { delta -= GridTrackOwner.GetMeasuredLength(Template.ContainerRange); } return(new Span(GridTrack.StartOffset + delta, GridTrack.EndOffset + delta)); }