src\Framework\System\Windows\Controls\VirtualizingStackPanel.cs (43)
1182? elementRect.Y : elementRect.X;
1266firstContainerOffsetFromViewport = elementRect.X;
1296if (DoubleUtil.GreaterThanOrClose(elementRect.X, 0))
1329DoubleUtil.GreaterThanOrClose(elementRect.X, 0))
1333DoubleUtil.GreaterThan(elementRect.X, 0)) // this container is non-top
2580double spanBeforeViewport = Math.Max(isHorizontal ? viewport.X : viewport.Y, 0.0);
4450double offset = isHorizontal ? viewport.X : viewport.Y;
4521extendedViewport.X += viewport.X - _viewport.X;
4670pixelSizeBeforeViewport = Math.Max(pixelSizeBeforeViewport, Math.Abs(_viewport.X - _extendedViewport.X));
4674logicalSizeBeforeViewport = Math.Max(logicalSizeBeforeViewport, Math.Abs(_viewport.X - _extendedViewport.X));
4704if (DoubleUtil.LessThan(extendedViewport.X, 0.0))
4706extendedViewport.Width = Math.Max(extendedViewport.Width + extendedViewport.X, 0.0);
4710if (DoubleUtil.GreaterThan(extendedViewport.X + extendedViewport.Width, _scrollData._extent.Width))
4712extendedViewport.Width = _scrollData._extent.Width - extendedViewport.X;
4739if (DoubleUtil.LessThan(extendedViewport.X, 0.0))
4741extendedViewport.Width = Math.Max(extendedViewport.Width / approxSizeOfLogicalUnit + extendedViewport.X, 0.0) * approxSizeOfLogicalUnit;
4745if (DoubleUtil.GreaterThan(extendedViewport.X + extendedViewport.Width / approxSizeOfLogicalUnit, _scrollData._extent.Width))
4747extendedViewport.Width = (_scrollData._extent.Width - extendedViewport.X) * approxSizeOfLogicalUnit;
4880viewport.X = ScrollContentPresenter.CoerceOffset(viewport.X, extent.Width, viewport.Width);
4881if (!IsPixelBased && isHorizontal && DoubleUtil.IsZero(viewport.Width) && DoubleUtil.AreClose(viewport.X, extent.Width))
4883viewport.X = ScrollContentPresenter.CoerceOffset(viewport.X - 1, extent.Width, viewport.Width);
4963if (DoubleUtil.GreaterThan(parentViewport.X, 0))
4969if (IsPixelBased && DoubleUtil.GreaterThan(pixelSize.Width, parentViewport.X))
4975sizeAfterStartViewportEdge = pixelSize.Width - parentViewport.X;
5191if (DoubleUtil.GreaterThan(parentViewport.X, 0))
5203if (IsPixelBased && DoubleUtil.GreaterThan(0, viewport.X))
5212cacheBeforeSize = Math.Max(0, cacheBeforeSize - parentViewport.X);
5217viewport.Width = Math.Max(0, viewport.Width + viewport.X);
5447double spanBeforeViewport = Math.Max(isHorizontal ? viewport.X : viewport.Y, 0.0);
5563double oldOffset = isHorizontal ? viewport.X : viewport.Y;
6595childViewport.X = Math.Min(childViewport.X, 0) -
6609isAfterFirstItem || DoubleUtil.LessThanOrClose(childViewport.X, 0.0) ?
6620isAfterFirstItem || DoubleUtil.LessThanOrClose(childViewport.X, 0.0) ?
7097pixelSizeBeforeViewport = DoubleUtil.LessThan(childViewport.X, childPixelSize.Width) ? Math.Max(childViewport.X, 0.0) : childPixelSize.Width;
7115if (DoubleUtil.GreaterThanOrClose(childViewport.X, childLogicalSize.Width))
7182if (DoubleUtil.GreaterThanOrClose(childViewport.X, childPixelSize.Width) ||
7200if (DoubleUtil.GreaterThanOrClose(childViewport.X, childLogicalSize.Width) ||
7245double childPixelWidthInViewport = Math.Min(childViewport.Width, childPixelSize.Width - Math.Max(childViewport.X, 0.0));
11027targetRectOffset = r.X;