src\Framework\System\Windows\Controls\VirtualizingStackPanel.cs (57)
2310if (IsScrolling && CanVerticallyScroll) { childConstraint.Height = Double.PositiveInfinity; }
2314childConstraint.Height = Double.PositiveInfinity;
3835_scrollData._extent.Height = distance;
3853pixelSize.Height = distance;
3875logicalSize.Height = distance;
5703stackPixelSize.Height += distance;
5714stackLogicalSize.Height += distance;
5751stackPixelSize.Height += childDesiredSize.Height;
5770stackPixelSize.Height += pixelDistance;
5936containerSize.Height = IsPixelBased ? DesiredSize.Height : 1;
5940containerSize.Height = uniformSize;
5966containerSize.Height = IsPixelBased ? DesiredSize.Height : 1;
5970containerSize.Height = averageSize;
6043containerSize.Height = IsPixelBased ? pixelHeight : 1;
6046containerPixelSize.Height = pixelHeight;
6052containerSize.Height = uniformOrAverageContainerSize;
6055containerPixelSize.Height = uniformOrAverageContainerPixelSize;
6773childLogicalSize.Height = itemDesiredSizes.LogicalSize.Height + logicalHeaderSize.Height;
6779childLogicalSize.Height = Math.Max(itemDesiredSizes.LogicalSize.Height, logicalHeaderSize.Height);
7156childPixelSizeInViewport.Height = Math.Max(childPixelSizeInViewport.Height, childPixelHeightInViewport);
7158childPixelSizeInCacheBeforeViewport.Height = Math.Max(childPixelSizeInCacheBeforeViewport.Height, childPixelHeightInViewport);
7160childPixelSizeInCacheAfterViewport.Height = Math.Max(childPixelSizeInCacheAfterViewport.Height, childPixelHeightInViewport);
7163childLogicalSizeInViewport.Height = Math.Max(childLogicalSizeInViewport.Height, childLogicalSize.Height);
7165childLogicalSizeInCacheBeforeViewport.Height = Math.Max(childLogicalSizeInCacheBeforeViewport.Height, childLogicalSize.Height);
7167childLogicalSizeInCacheAfterViewport.Height = Math.Max(childLogicalSizeInCacheAfterViewport.Height, childLogicalSize.Height);
7247childPixelSizeInViewport.Height += pixelSizeInViewport;
7249childPixelSizeInCacheBeforeViewport.Height += pixelSizeBeforeViewport;
7251childPixelSizeInCacheAfterViewport.Height += pixelSizeAfterViewport;
7254childLogicalSizeInViewport.Height += logicalSizeInViewport;
7256childLogicalSizeInCacheBeforeViewport.Height += logicalSizeBeforeViewport;
7258childLogicalSizeInCacheAfterViewport.Height += logicalSizeAfterViewport;
7302sz1.Height = Math.Max(sz1.Height, sz2.Height);
7306sz1.Height += sz2.Height;
8369previousChildSize.Height = itemDesiredSizes.PixelSizeInViewport.Height;
8373previousChildSize.Height += itemDesiredSizes.PixelSizeBeforeViewport.Height + itemDesiredSizes.PixelSizeAfterViewport.Height;
8380previousChildSize.Height += pixelHeaderSize.Height;
8384previousChildSize.Height = Math.Max(previousChildSize.Height, pixelHeaderSize.Height);
9489viewportSize.Height = viewport.Height;
9496viewportSize.Height--;
9513stackPixelSize.Height = _scrollData._extent.Height;
9520_scrollData._maxDesiredSize.Height = Math.Max(_scrollData._maxDesiredSize.Height, stackPixelSize.Height);
9521stackPixelSize.Height = _scrollData._maxDesiredSize.Height;
9523extentSize.Height = stackPixelSize.Height;
9527viewportSize.Height = stackPixelSize.Height;
9577stackPixelSize.Height = IsPixelBased || DoubleUtil.AreClose(computedViewportOffset.Y, 0) ?
10077viewportSize.Height = proposedViewportSize;
10104viewportSize.Height = _scrollData._viewport.Height;
10341viewportSize.Height = viewport.Height;
10348viewportSize.Height--;
10365stackPixelSize.Height = _scrollData._extent.Height;
10372_scrollData._maxDesiredSize.Height = Math.Max(_scrollData._maxDesiredSize.Height, stackPixelSize.Height);
10373stackPixelSize.Height = _scrollData._maxDesiredSize.Height;
10375extentSize.Height = stackPixelSize.Height;
10379viewportSize.Height = stackPixelSize.Height;
10429stackPixelSize.Height = IsPixelBased || DoubleUtil.AreClose(computedViewportOffset.Y, 0) ?
10664viewportSize.Height = proposedViewportSize;
10683viewportSize.Height = _scrollData._viewport.Height;
src\Framework\MS\Internal\AppModel\IconHelper.cs (11)
137|| bf.PixelWidth == size.Width && bf.PixelHeight == size.Height;
159var drawingDimensions = new Rect(0, 0, renderSize.Width, renderSize.Height);
162double renderRatio = renderSize.Width / renderSize.Height;
166if (img.Width <= renderSize.Width && img.Height <= renderSize.Height)
168drawingDimensions = new Rect((renderSize.Width - img.Width) / 2, (renderSize.Height - img.Height) / 2, img.Width, img.Height);
173drawingDimensions = new Rect((renderSize.Width - scaledRenderWidth) / 2, 0, scaledRenderWidth, renderSize.Height);
177double scaledRenderHeight = (img.Height / img.Width) * renderSize.Height;
178drawingDimensions = new Rect(0, (renderSize.Height - scaledRenderHeight) / 2, renderSize.Width, scaledRenderHeight);
188var bmp = new RenderTargetBitmap((int)renderSize.Width, (int)renderSize.Height, 96, 96, PixelFormats.Pbgra32);
444MyAbs(frame.PixelHeight, (int)size.Height, true);
476Invariant.Assert(size.Height != 0, "input param height should not be zero");
src\Framework\MS\Internal\Documents\TextBoxView.cs (4)
505desiredSize.Height = Math.Min(constraint.Height, desiredSize.Height);
541context.DrawRectangle(new SolidColorBrush(Color.FromArgb(0, 0, 0, 0)), null, new Rect(0, 0, this.RenderSize.Width, this.RenderSize.Height));
3107padding = Math.Max(0, viewport.Height - _contentSize.Height);
src\Framework\System\Windows\Controls\Border.cs (16)
238Size combined = new Size(border.Width + padding.Width, border.Height + padding.Height);
242Math.Max(0.0, constraint.Height - combined.Height));
250mySize.Height = childSize.Height + combined.Height;
255mySize = new Size(border.Width + padding.Width, border.Height + padding.Height);
444new Point(RenderSize.Width - halfThickness, RenderSize.Height - halfThickness));
473new Point(halfThickness, RenderSize.Height));
505new Point(RenderSize.Width - halfThickness, RenderSize.Height));
566new Point(0, RenderSize.Height - halfThickness),
567new Point(RenderSize.Width, RenderSize.Height - halfThickness));
587UIElement.RoundLayoutValue(RenderSize.Height - border.Bottom, dpi.DpiScaleY));
592RenderSize.Height - UIElement.RoundLayoutValue(border.Bottom, dpi.DpiScaleY));
598ptBR = new Point(RenderSize.Width - border.Right, RenderSize.Height - border.Bottom);
src\Framework\System\Windows\Controls\GridViewHeaderRowPresenter.cs (6)
253double constraintHeight = constraint.Height;
301maxHeight = Math.Max(maxHeight, child.DesiredSize.Height);
308maxHeight = Math.Max(maxHeight, _paddingHeader.DesiredSize.Height);
360rect = new Rect(accumulatedWidth, 0.0, childArrangeWidth, arrangeSize.Height);
391rect = new Rect(accumulatedWidth, 0.0, Math.Max(remainingWidth, 0.0), arrangeSize.Height);
401_indicator.Arrange(new Rect(pos, new Size(_indicator.DesiredSize.Width, arrangeSize.Height)));
src\Framework\System\Windows\Controls\Primitives\BulletDecorator.cs (9)
205new Rect(0, 0, RenderSize.Width, RenderSize.Height));
264Size desiredSize = new Size(bulletSize.Width + contentSize.Width, Math.Max(bulletSize.Height, contentSize.Height));
302contentSize.Height = Math.Max(content.DesiredSize.Height, arrangeSize.Height);
304content.Arrange(new Rect(contentOffsetX, 0, contentSize.Width, contentSize.Height));
307bulletOffsetY += Math.Max(0d, centerY - bulletSize.Height * 0.5d);
313bullet.Arrange(new Rect(0, bulletOffsetY, bullet.DesiredSize.Width, bullet.DesiredSize.Height));
380return element.RenderSize.Height;
src\Framework\System\Windows\Controls\Slider.cs (12)
947new Point((targetSize.Width - popupSize.Width) * 0.5, -popupSize.Height),
956new Point(-popupSize.Width, (targetSize.Height - popupSize.Height) * 0.5),
967new Point((targetSize.Width - popupSize.Width) * 0.5, targetSize.Height) ,
977new Point(targetSize.Width, (targetSize.Height - popupSize.Height) * 0.5),
1039if (DoubleUtil.AreClose(range, 0d) || (DoubleUtil.AreClose(trackSize.Height, thumbSize.Height)))
1045valueToSize = Math.Max(0.0, (trackSize.Height - thumbSize.Height) / range);
1051Canvas.SetTop(rangeElement, (thumbSize.Height * 0.5) + Math.Max(SelectionStart - Minimum, 0) * valueToSize);
1055Canvas.SetTop(rangeElement, (thumbSize.Height * 0.5) + Math.Max(Maximum - SelectionEnd,0) * valueToSize);
src\Framework\System\Windows\Controls\TextBlock.cs (11)
1297(DoubleUtil.AreClose(constraint.Height, _referenceSize.Height) || lineCount == 1);
1354Math.Max(0.0, constraint.Height - (padding.Top + padding.Bottom)));
1395(contentSize.Height >= (desiredSize.Height + lineHeight)) ||
1400_baselineOffset = desiredSize.Height + line.BaselineOffset;
1588ctx.DrawRectangle(background, null, new Rect(0, 0, RenderSize.Width, RenderSize.Height));
1622double contentBottom = Math.Max(0.0, RenderSize.Height - Padding.Bottom);
2068Math.Max(0.0, _referenceSize.Height - (padding.Top + padding.Bottom)));
3207Math.Max(0.0, computedSize.Height - (padding.Top + padding.Bottom)));
3256double contentBottom = Math.Max(0.0, RenderSize.Height - Padding.Bottom);
src\Framework\System\Windows\Controls\VirtualizingStackPanel.cs (297)
700_scrollData._offset.Y = ScrollContentPresenter.CoerceOffset(scrollY, _scrollData._extent.Height, _scrollData._viewport.Height);
939_scrollData._extent.Height - _scrollData._viewport.Height);
1001if (DoubleUtil.LessThan(expectedOffset, 0) || DoubleUtil.GreaterThan(expectedOffset, _scrollData._extent.Height - _scrollData._viewport.Height))
1003Debug.Assert(DoubleUtil.AreClose(actualOffset, 0) || DoubleUtil.AreClose(actualOffset, _scrollData._extent.Height - _scrollData._viewport.Height), "The actual offset should already be at the beginning or the end.");
1291firstContainerOffsetFromViewport += virtualizingElement.HeaderDesiredSizes.LogicalSize.Height;
1493newOffset.Y = ScrollContentPresenter.CoerceOffset(newOffset.Y, _scrollData._extent.Height, _scrollData._viewport.Height);
1834return _scrollData._extent.Height;
1858return _scrollData._viewport.Height;
2581double newContainerSpan = isHorizontal ? newContainerSize.Width : newContainerSize.Height;
2976viewport.Height = stackPixelSize.Height;
3328arrangeLength = Math.Max(isHorizontal ? arrangeSize.Height : arrangeSize.Width, arrangeLength);
3901(!isHorizontal && DoubleUtil.GreaterThanOrClose(DesiredSize.Height, PreviousConstraint.Height)));
4266viewport = new Rect(offsetX, offsetY, size.Width, size.Height);
4271viewport = new Rect(offsetX, offsetY, viewportSize.Width, viewportSize.Height);
4503viewport = new Rect(0, 0, constraint.Width, constraint.Height);
4754double approxSizeOfLogicalUnit = (DoubleUtil.GreaterThan(_previousStackPixelSizeInViewport.Height, 0.0) && DoubleUtil.GreaterThan(_previousStackLogicalSizeInViewport.Height, 0.0)) ?
4755_previousStackPixelSizeInViewport.Height / _previousStackLogicalSizeInViewport.Height : ScrollViewer._scrollLineDelta;
4757pixelSize = stackPixelSize.Height;
4758logicalSize = stackLogicalSize.Height;
4762pixelSizeBeforeViewport = stackPixelSizeInCacheBeforeViewport.Height;
4763pixelSizeAfterViewport = stackPixelSizeInCacheAfterViewport.Height;
4764logicalSizeBeforeViewport = stackLogicalSizeInCacheBeforeViewport.Height;
4765logicalSizeAfterViewport = stackLogicalSizeInCacheAfterViewport.Height;
4816if (DoubleUtil.GreaterThan(extendedViewport.Y + extendedViewport.Height, _scrollData._extent.Height))
4818extendedViewport.Height = _scrollData._extent.Height - extendedViewport.Y;
4851if (DoubleUtil.GreaterThan(extendedViewport.Y + extendedViewport.Height / approxSizeOfLogicalUnit, _scrollData._extent.Height))
4853extendedViewport.Height = (_scrollData._extent.Height - extendedViewport.Y) * approxSizeOfLogicalUnit;
4889viewport.Y = ScrollContentPresenter.CoerceOffset(viewport.Y, extent.Height, viewport.Height);
4890if (!IsPixelBased && !isHorizontal && DoubleUtil.IsZero(viewport.Height) && DoubleUtil.AreClose(viewport.Y, extent.Height))
4892viewport.Y = ScrollContentPresenter.CoerceOffset(viewport.Y - 1, extent.Height, viewport.Height);
5060viewport.Y -= IsPixelBased ? pixelSize.Height : logicalSize.Height;
5068if (IsPixelBased && DoubleUtil.GreaterThan(pixelSize.Height, parentViewport.Y))
5074sizeAfterStartViewportEdge = pixelSize.Height - parentViewport.Y;
5075sizeBeforeStartViewportEdge = pixelSize.Height - sizeAfterStartViewportEdge;
5085cacheBeforeSize = Math.Max(cacheBeforeSize - Math.Floor(logicalSize.Height * sizeBeforeStartViewportEdge / pixelSize.Height), 0);
5106if (DoubleUtil.GreaterThanOrClose(parentViewport.Height, pixelSize.Height))
5112viewport.Height = Math.Max(0, parentViewport.Height - pixelSize.Height);
5121sizeAfterEndViewportEdge = pixelSize.Height - sizeBeforeEndViewportEdge;
5131cacheAfterSize = Math.Max(cacheAfterSize - Math.Floor(logicalSize.Height * sizeAfterEndViewportEdge / pixelSize.Height), 0);
5143cacheAfterSize = Math.Max(cacheAfterSize - pixelSize.Height, 0);
5147cacheAfterSize = Math.Max(cacheAfterSize - logicalSize.Height, 0);
5491containerSpan = isHorizontal ? containerSize.Width : containerSize.Height;
5751stackPixelSize.Height += childDesiredSize.Height;
5836distance += containerSize.Height;
5893distance += containerSize.Height;
5894pixelDistance += containerPixelSize.Height;
5936containerSize.Height = IsPixelBased ? DesiredSize.Height : 1;
5966containerSize.Height = IsPixelBased ? DesiredSize.Height : 1;
6040double pixelHeight = DesiredSize.Height;
6087uniformOrAverageContainerSize = isHorizontal ? containerSize.Width : containerSize.Height;
6102areContainersUniformlySized = DoubleUtil.AreClose(containerSize.Height, uniformOrAverageContainerSize);
6138uniformOrAverageContainerSize = isHorizontal ? containerSize.Width : containerSize.Height;
6139uniformOrAverageContainerPixelSize = isHorizontal ? containerPixelSize.Width : containerPixelSize.Height;
6166areContainersUniformlySized = DoubleUtil.AreClose(containerSize.Height, uniformOrAverageContainerSize)
6167&& (ignoreContainerPixelSize || DoubleUtil.AreClose(containerPixelSize.Height, uniformOrAverageContainerPixelSize));
6203oldSpan = (oldValue != null) ? oldSize.Height : uniformOrAverageContainerSize;
6204newSpan = containerSize.Height;
6235oldSpan = (oldValue != null) ? oldCSD.ItemSize.Height : uniformOrAverageContainerSize;;
6236newSpan = containerSize.Height;
6300inset.Top = headerDesiredSizes.PixelSize.Height + margin.Top;
6343double bottom = DoubleUtil.AreClose(itemsSize.Height, itemsRect.Bottom) ? 0 : itemsRect.Bottom-itemsSize.Height;
6507return DoubleUtil.GreaterThanOrClose(stackLogicalSizeInCache.Height, cacheSize);
6518return DoubleUtil.GreaterThanOrClose(stackPixelSizeInCache.Height, cacheSize);
6532return DoubleUtil.GreaterThanOrClose(stackPixelSizeInViewport.Height, viewport.Height);
6635childViewport.Y = (IsPixelBased ? stackPixelSizeInCacheBeforeViewport.Height : stackLogicalSizeInCacheBeforeViewport.Height) + containerSize.Height;
6641(IsPixelBased ? stackPixelSizeInViewport.Height + stackPixelSizeInCacheAfterViewport.Height :
6642stackLogicalSizeInViewport.Height + stackLogicalSizeInCacheAfterViewport.Height);
6644childViewport.Height = Math.Max(childViewport.Height - stackPixelSizeInViewport.Height, 0.0);
6649childViewport.Height = Math.Max(childViewport.Height - stackPixelSizeInViewport.Height, 0.0);
6657Math.Max(parentCacheSize.CacheBeforeViewport - stackLogicalSizeInCacheBeforeViewport.Height, 0.0),
6660Math.Max(parentCacheSize.CacheAfterViewport - stackLogicalSizeInCacheAfterViewport.Height, 0.0));
6668Math.Max(parentCacheSize.CacheBeforeViewport - stackPixelSizeInCacheBeforeViewport.Height, 0.0),
6671Math.Max(parentCacheSize.CacheAfterViewport - stackPixelSizeInCacheAfterViewport.Height, 0.0));
6773childLogicalSize.Height = itemDesiredSizes.LogicalSize.Height + logicalHeaderSize.Height;
6779childLogicalSize.Height = Math.Max(itemDesiredSizes.LogicalSize.Height, logicalHeaderSize.Height);
6784(!isHorizontal && DoubleUtil.AreClose(itemDesiredSizes.PixelSize.Height, itemDesiredSizes.PixelSizeInViewport.Height))))
6878DoubleUtil.GreaterThan(childPixelSize.Height, 0) ? 1 : 0);
6884DoubleUtil.GreaterThan(childPixelSizeInCacheBeforeViewport.Height, 0) ? 1 : 0);
6890DoubleUtil.GreaterThan(childPixelSizeInCacheAfterViewport.Height, 0) ? 1 : 0);
6956if ((!isHorizontal && (itemDesiredSizes.PixelSize.Height > 0 ||
6957itemDesiredSizes.LogicalSize.Height > 0)) ||
6978Size frontPixelSize = isHorizontal ? new Size(Math.Max(inset.Left,0), childDesiredSize.Height)
6992Size backPixelSize = isHorizontal ? new Size(Math.Max(inset.Right,0), childDesiredSize.Height)
7010adjustedChildViewport.Y -= IsPixelBased ? frontPixelSize.Height + itemDesiredSizes.PixelSize.Height
7011: frontLogicalSize.Height + itemDesiredSizes.LogicalSize.Height;
7012adjustedChildViewport.Height = Math.Max(0, adjustedChildViewport.Height - childPixelSizeInViewport.Height);
7033DoubleUtil.GreaterThan(childPixelSizeInCacheBeforeViewport.Height, 0) ? 1 : 0);
7039DoubleUtil.GreaterThan(childPixelSizeInCacheAfterViewport.Height, 0) ? 1 : 0);
7090if (DoubleUtil.GreaterThanOrClose(childViewport.Y, childPixelSize.Height) ||
7108if (DoubleUtil.GreaterThanOrClose(childViewport.Y, childLogicalSize.Height) ||
7153double childPixelHeightInViewport = Math.Min(childViewport.Height, childPixelSize.Height - Math.Max(childViewport.Y, 0.0));
7156childPixelSizeInViewport.Height = Math.Max(childPixelSizeInViewport.Height, childPixelHeightInViewport);
7158childPixelSizeInCacheBeforeViewport.Height = Math.Max(childPixelSizeInCacheBeforeViewport.Height, childPixelHeightInViewport);
7160childPixelSizeInCacheAfterViewport.Height = Math.Max(childPixelSizeInCacheAfterViewport.Height, childPixelHeightInViewport);
7163childLogicalSizeInViewport.Height = Math.Max(childLogicalSizeInViewport.Height, childLogicalSize.Height);
7165childLogicalSizeInCacheBeforeViewport.Height = Math.Max(childLogicalSizeInCacheBeforeViewport.Height, childLogicalSize.Height);
7167childLogicalSizeInCacheAfterViewport.Height = Math.Max(childLogicalSizeInCacheAfterViewport.Height, childLogicalSize.Height);
7189pixelSizeBeforeViewport = DoubleUtil.LessThan(childViewport.Y, childPixelSize.Height) ? Math.Max(childViewport.Y, 0.0) : childPixelSize.Height;
7190pixelSizeInViewport = Math.Min(childViewport.Height, childPixelSize.Height - pixelSizeBeforeViewport);
7191pixelSizeAfterViewport = Math.Max(childPixelSize.Height - pixelSizeInViewport - pixelSizeBeforeViewport, 0.0); // Please note that due to rounding errors this subtraction can lead to negative values. Hence the Math.Max call
7207if (DoubleUtil.GreaterThanOrClose(childViewport.Y, childLogicalSize.Height))
7209pixelSizeBeforeViewport = childPixelSize.Height;
7212logicalSizeBeforeViewport = childLogicalSize.Height;
7219pixelSizeInViewport = childPixelSize.Height;
7223pixelSizeAfterViewport = childPixelSize.Height;
7226logicalSizeAfterViewport = childLogicalSize.Height;
7232Debug.Assert(DoubleUtil.AreClose(pixelSizeInViewport + pixelSizeBeforeViewport + pixelSizeAfterViewport, childPixelSize.Height), "The computed sizes within and outside the viewport should add up to the childPixelSize.");
7234if (DoubleUtil.GreaterThan(childPixelSize.Height, 0.0))
7236logicalSizeBeforeViewport = Math.Floor(childLogicalSize.Height * pixelSizeBeforeViewport / childPixelSize.Height);
7237logicalSizeAfterViewport = Math.Floor(childLogicalSize.Height * pixelSizeAfterViewport / childPixelSize.Height);
7238logicalSizeInViewport = childLogicalSize.Height - logicalSizeBeforeViewport - logicalSizeAfterViewport;
7242logicalSizeInViewport = childLogicalSize.Height - logicalSizeBeforeViewport - logicalSizeAfterViewport;
7302sz1.Height = Math.Max(sz1.Height, sz2.Height);
7306sz1.Height += sz2.Height;
7358headerDesiredSizes.PixelSize.Height + itemDesiredSizes.PixelSize.Height);
7363headerDesiredSizes.LogicalSize.Height + itemDesiredSizes.LogicalSize.Height);
7375DoubleUtil.GreaterThan(child.DesiredSize.Height, 0) ? 1 : 0);
7387computedAreContainersUniformlySized = DoubleUtil.AreClose(childSize.Height, uniformOrAverageContainerSize);
7432sumOfContainerSizes += containerSize.Height;
7513inset.Top + itemDesiredSizes.PixelSize.Height + inset.Bottom);
7530Math.Max(1, itemDesiredSizes.LogicalSize.Height))
75321 + itemDesiredSizes.LogicalSize.Height);
7546DoubleUtil.GreaterThan(child.DesiredSize.Height, 0) ? 1 : 0);
7559computedAreContainersUniformlySized = DoubleUtil.AreClose(childSize.Height, uniformOrAverageContainerSize)
7560&& (IsPixelBased || DoubleUtil.AreClose(childPixelSize.Height, uniformOrAverageContainerPixelSize));
7652sumOfContainerSizes += containerSize.Height;
7653sumOfContainerPixelSizes += containerPixelSize.Height;
8284((IsVSP45Compat || !IsVirtualizing || !HasVirtualizingChildren) ? _previousStackPixelSizeInCacheBeforeViewport.Height : _pixelDistanceToViewport);
8327rcChild.Height = Math.Max(arrangeLength, childDesiredSize.Height);
8358rcChild.Height = childDesiredSize.Height;
8369previousChildSize.Height = itemDesiredSizes.PixelSizeInViewport.Height;
8373previousChildSize.Height += itemDesiredSizes.PixelSizeBeforeViewport.Height + itemDesiredSizes.PixelSizeAfterViewport.Height;
8380previousChildSize.Height += pixelHeaderSize.Height;
8384previousChildSize.Height = Math.Max(previousChildSize.Height, pixelHeaderSize.Height);
8414rcChild.Height = Math.Max(arrangeLength, childDesiredSize.Height);
8418rcChild.Y += previousChildSize.Height;
8419rcChild.Height = childDesiredSize.Height;
8458rcChild.Height = Math.Max(arrangeLength, childDesiredSize.Height);
8510rcChild.Height = childDesiredSize.Height;
8553rcChild.Y -= childDesiredSize.Height;
8557rcChild.Y += previousChildSize.Height;
9493if (DoubleUtil.GreaterThan(stackPixelSizeInViewport.Height, constraint.Height) &&
9494viewportSize.Height > 1)
9513stackPixelSize.Height = _scrollData._extent.Height;
9520_scrollData._maxDesiredSize.Height = Math.Max(_scrollData._maxDesiredSize.Height, stackPixelSize.Height);
9521stackPixelSize.Height = _scrollData._maxDesiredSize.Height;
9523extentSize.Height = stackPixelSize.Height;
9525if (Double.IsPositiveInfinity(constraint.Height))
9527viewportSize.Height = stackPixelSize.Height;
9575if (!Double.IsPositiveInfinity(constraint.Height))
9578Math.Min(stackPixelSize.Height, constraint.Height) : constraint.Height;
9623(IsScrollActive && computedViewportOffset.Y > 0.0 && DoubleUtil.GreaterThanOrClose(computedViewportOffset.Y, _scrollData.Extent.Height-_scrollData.Viewport.Height)));
9626(IsScrollActive && computedViewportOffset.Y > 0.0 && DoubleUtil.GreaterThanOrClose(computedViewportOffset.Y, _scrollData.Extent.Height-_scrollData.Viewport.Height)))
9683if (DoubleUtil.GreaterThan(newOffset + viewportSize.Height, extentSize.Height))
9698!DoubleUtil.AreClose(isHorizontal ? stackPixelSizeInViewport.Width : stackPixelSizeInViewport.Height,
9732extentHeightChanged = !DoubleUtil.AreClose(extentSize.Height, _scrollData._extent.Height);
9762Visibility newvv = DoubleUtil.LessThanOrClose(extentSize.Height, viewportSize.Height) ? Visibility.Collapsed : Visibility.Visible;
9970DoubleUtil.GreaterThan(computedViewportOffset.Y, extentSize.Height - viewportSize.Height)))
9977"ext:", _scrollData._extent.Height, extentSize.Height,
9978"vpSz:", viewportSize.Height);
9993if (!DoubleUtil.AreClose(_scrollData._extent.Height, 0) &&
9994!DoubleUtil.AreClose(extentSize.Height, 0))
9996if (!LayoutDoubleUtil.AreClose(computedViewportOffset.Y/extentSize.Height, _scrollData._offset.Y/_scrollData._extent.Height))
9999viewportOffset.Y = (extentSize.Height * _scrollData._offset.Y) / _scrollData._extent.Height;
10006"expRat:", _scrollData._offset.Y, _scrollData._extent.Height, (_scrollData._offset.Y/_scrollData._extent.Height),
10007"actRat:", computedViewportOffset.Y, extentSize.Height, (computedViewportOffset.Y/extentSize.Height),
10051DoubleUtil.GreaterThan(stackLogicalSize.Height, stackLogicalSizeInViewport.Height))
10060lastPagePixelSize = stackPixelSizeInViewport.Height;
10063double approxSizeOfLogicalUnit = stackPixelSizeInViewport.Height / stackLogicalSizeInViewport.Height;
10065if (DoubleUtil.GreaterThan(proposedViewportSize, viewportSize.Height))
10071"pxSz:", stackPixelSizeInViewport.Height, viewport.Height,
10072"itSz:", stackLogicalSizeInViewport.Height, viewportSize.Height,
10088!DoubleUtil.AreClose(_scrollData._viewport.Height, viewportSize.Height))
10094"vpSz:", _scrollData._viewport.Height, viewportSize.Height,
10102if (DoubleUtil.AreClose(viewportSize.Height, 0))
10104viewportSize.Height = _scrollData._viewport.Height;
10120DoubleUtil.GreaterThan(computedViewportOffset.Y, extentSize.Height - viewportSize.Height)))
10126"ext:", _scrollData._extent.Height, extentSize.Height,
10127"vpSz:", viewportSize.Height);
10143if (!DoubleUtil.AreClose(_scrollData._extent.Height, 0) &&
10144!DoubleUtil.AreClose(extentSize.Height, 0))
10148if (!LayoutDoubleUtil.AreClose(computedViewportOffset.Y/extentSize.Height, _scrollData._offset.Y/_scrollData._extent.Height))
10151viewportOffset.Y = (extentSize.Height * _scrollData._offset.Y) / _scrollData._extent.Height;
10157if (!LayoutDoubleUtil.AreClose(Math.Floor(computedViewportOffset.Y)/extentSize.Height, Math.Floor(_scrollData._offset.Y)/_scrollData._extent.Height))
10160viewportOffset.Y = Math.Floor((extentSize.Height * Math.Floor(_scrollData._offset.Y)) / _scrollData._extent.Height);
10167"expRat:", _scrollData._offset.Y, _scrollData._extent.Height, (_scrollData._offset.Y/_scrollData._extent.Height),
10168"actRat:", computedViewportOffset.Y, extentSize.Height, (computedViewportOffset.Y/extentSize.Height),
10345if (DoubleUtil.GreaterThan(stackPixelSizeInViewport.Height, constraint.Height) &&
10346viewportSize.Height > 1)
10365stackPixelSize.Height = _scrollData._extent.Height;
10372_scrollData._maxDesiredSize.Height = Math.Max(_scrollData._maxDesiredSize.Height, stackPixelSize.Height);
10373stackPixelSize.Height = _scrollData._maxDesiredSize.Height;
10375extentSize.Height = stackPixelSize.Height;
10377if (Double.IsPositiveInfinity(constraint.Height))
10379viewportSize.Height = stackPixelSize.Height;
10427if (!Double.IsPositiveInfinity(constraint.Height))
10430Math.Min(stackPixelSize.Height, constraint.Height) : constraint.Height;
10479Visibility newvv = DoubleUtil.LessThanOrClose(extentSize.Height, viewportSize.Height) ? Visibility.Collapsed : Visibility.Visible;
10651DoubleUtil.GreaterThan(stackLogicalSize.Height, stackLogicalSizeInViewport.Height))
10659double approxSizeOfLogicalUnit = stackPixelSizeInViewport.Height / stackLogicalSizeInViewport.Height;
10661if (DoubleUtil.GreaterThan(proposedViewportSize, viewportSize.Height))
10675!DoubleUtil.AreClose(_scrollData._viewport.Height, viewportSize.Height))
10681if (DoubleUtil.AreClose(viewportSize.Height, 0))
10683viewportSize.Height = _scrollData._viewport.Height;
10688if (!remeasure && extentSizeChanged && !DoubleUtil.AreClose(_scrollData._extent.Height, extentSize.Height))
10695DoubleUtil.GreaterThan(computedViewportOffset.Y, extentSize.Height - viewportSize.Height))
10728!DoubleUtil.AreClose(_scrollData._extent.Height, 0) &&
10729!DoubleUtil.AreClose(extentSize.Height, 0))
10733if (!LayoutDoubleUtil.AreClose(computedViewportOffset.Y/extentSize.Height, _scrollData._offset.Y/_scrollData._extent.Height))
10736viewportOffset.Y = (extentSize.Height * _scrollData._offset.Y) / _scrollData._extent.Height;
10742if (!LayoutDoubleUtil.AreClose(Math.Floor(computedViewportOffset.Y)/extentSize.Height, Math.Floor(_scrollData._offset.Y)/_scrollData._extent.Height))
10745viewportOffset.Y = Math.Floor((extentSize.Height * Math.Floor(_scrollData._offset.Y)) / _scrollData._extent.Height);
10928offset += (isHorizontal ? desiredPixelHeaderSize.Width : desiredPixelHeaderSize.Height);
10941offset += (isHorizontal ? desiredLogicalHeaderSize.Width : desiredLogicalHeaderSize.Height);
11088viewportSize = (int)_scrollData._viewport.Height;
11147maxChildLength = Math.Max(maxChildLength, childSize.Height);
11643_viewport.Height == 0.0 &&
11645_extent.Height == 0.0 &&
11647_maxDesiredSize.Height == 0.0;
11752if (DoubleUtil.GreaterThanOrClose(newOffset, _extent.Height - _viewport.Height))
11756else if (DoubleUtil.GreaterThan(Math.Abs(newOffset - oldOffset), _viewport.Height))
12793writer.Write(size.Height);
src\Framework\System\Windows\FrameworkElement.cs (56)
3399return fe.RenderSize.Height;
3422return RenderSize.Height;
4134Double yConstr = transformSpaceBounds.Height;
4344Math.Max(availableSize.Height - marginHeight, 0));
4393frameworkAvailableSize.Height = Math.Max(mm.minHeight, Math.Min(frameworkAvailableSize.Height, mm.maxHeight));
4407Math.Max(desiredSize.Height, mm.minHeight));
4419Rect unclippedBoundsTransformed = Rect.Transform(new Rect(0, 0, unclippedDesiredSize.Width, unclippedDesiredSize.Height), ltd.Transform.Value);
4435if (desiredSize.Height > mm.maxHeight)
4444Rect childBoundsTransformed = Rect.Transform(new Rect(0, 0, desiredSize.Width, desiredSize.Height), ltd.Transform.Value);
4453double clippedDesiredHeight = desiredSize.Height + marginHeight;
4464if (clippedDesiredHeight > availableSize.Height)
4466clippedDesiredHeight = availableSize.Height;
4511sb.Height = unclippedDesiredSize.Height;
4583arrangeSize.Height = Math.Max(0, arrangeSize.Height - marginHeight);
4592transformedUnroundedDS.Height = Math.Max(0, transformedUnroundedDS.Height- marginHeight);
4602Math.Max(0, this.DesiredSize.Height - marginHeight));
4608unclippedDesiredSize.Height = Math.Max(transformedUnroundedDS.Height, unclippedDesiredSize.Height);
4622if (DoubleUtil.LessThan(arrangeSize.Height, unclippedDesiredSize.Height))
4625arrangeSize.Height = unclippedDesiredSize.Height;
4637arrangeSize.Height = unclippedDesiredSize.Height;
4656&& !DoubleUtil.IsZero(potentialArrangeSize.Height))
4660|| LayoutDoubleUtil.LessThan(potentialArrangeSize.Height, unclippedDesiredSize.Height))
4675if (DoubleUtil.LessThan(arrangeSize.Height, unclippedDesiredSize.Height))
4678arrangeSize.Height = unclippedDesiredSize.Height;
4702double effectiveMaxHeight = Math.Max(unclippedDesiredSize.Height, mm.maxHeight);
4703if (DoubleUtil.LessThan(effectiveMaxHeight, arrangeSize.Height))
4734Math.Min(innerInkSize.Height, mm.maxHeight));
4744|| DoubleUtil.LessThan(clippedInkSize.Height, innerInkSize.Height);
4749Rect inkRectTransformed = Rect.Transform(new Rect(0, 0, clippedInkSize.Width, clippedInkSize.Height), ltd.Transform.Value);
4777|| DoubleUtil.LessThan(clientSize.Height, clippedInkSize.Height);
4816NotifyPropertyChange(new DependencyPropertyChangedEventArgs(ActualHeightProperty, _actualHeightMetadata, sizeInfo.PreviousSize.Height, sizeInfo.NewSize.Height));
4838&& inkSize.Height > clientSize.Height)
4861offset.Y = (clientSize.Height - inkSize.Height) * 0.5;
4865offset.Y = clientSize.Height - inkSize.Height;
4907double maxHeightClip = (Double.IsPositiveInfinity(mm.maxHeight) ? inkSize.Height : mm.maxHeight);
4913|| DoubleUtil.LessThan(maxHeightClip, inkSize.Height));
4917inkSize.Height = Math.Min(inkSize.Height, mm.maxHeight);
4924inkRectTransformed = Rect.Transform(new Rect(0, 0, inkSize.Width, inkSize.Height), ltd.Transform.Value);
4935Math.Max(0, layoutSlotSize.Height - marginHeight));
4940|| DoubleUtil.LessThan(clippingSize.Height, inkSize.Height));
4967clippingSize.Height);
5013clippingSize.Height);
5244double maxHeightClip = (Double.IsPositiveInfinity(mm.maxHeight) ? inkSize.Height : mm.maxHeight);
5248inkSize.Height = Math.Min(inkSize.Height, mm.maxHeight);
5298return new Point(renderSize.Width * relativeOrigin.X, renderSize.Height * relativeOrigin.Y);
src\Framework\System\Windows\Shell\WindowChromeWorker.cs (9)
1226double shortestDimension = Math.Min(windowSize.Width, windowSize.Height);
1242hrgn = _CreateRoundRectRgn(new Rect(0, 0, windowSize.Width / 2 + topLeftRadius, windowSize.Height / 2 + topLeftRadius), topLeftRadius);
1246Rect topRightRegionRect = new Rect(0, 0, windowSize.Width / 2 + topRightRadius, windowSize.Height / 2 + topRightRadius);
1254Rect bottomLeftRegionRect = new Rect(0, 0, windowSize.Width / 2 + bottomLeftRadius, windowSize.Height / 2 + bottomLeftRadius);
1255bottomLeftRegionRect.Offset(0, windowSize.Height / 2 - bottomLeftRadius);
1256Assert.AreEqual(bottomLeftRegionRect.Bottom, windowSize.Height);
1262Rect bottomRightRegionRect = new Rect(0, 0, windowSize.Width / 2 + bottomRightRadius, windowSize.Height / 2 + bottomRightRadius);
1263bottomRightRegionRect.Offset(windowSize.Width / 2 - bottomRightRadius, windowSize.Height / 2 - bottomRightRadius);
1265Assert.AreEqual(bottomRightRegionRect.Bottom, windowSize.Height);
src\Framework\System\Windows\Window.cs (21)
1873Size frameworkAvailableSize = new Size(availableSize.Width, availableSize.Height);
1878frameworkAvailableSize.Height = Math.Max(mm.minHeight, Math.Min(frameworkAvailableSize.Height, mm.maxHeight));
1886Math.Max(desiredSize.Height, mm.minHeight));
1908arrangeBounds.Height = Math.Max(mm.minHeight, Math.Min(arrangeBounds.Height, mm.maxHeight));
1943childArrangeBounds.Height = Math.Max(0.0, arrangeBounds.Height - frameSize.Height);
2800if (!DoubleUtil.IsNaN(requestedHeight) && (!DoubleUtil.AreClose(sizeDeviceUnits.Height, requestedSizeDeviceUnits.Y)))
2860if (!Double.IsPositiveInfinity(minSizeDeviceUnits.Y) && (sizeDeviceUnits.Height > maxSizeDeviceUnits.Y))
2872if (sizeDeviceUnits.Height < minSizeDeviceUnits.Y)
2916DoubleUtil.DoubleToInt(sizeDeviceUnits.Height),
3495childConstraint.Height = ((constraint.Height == Double.PositiveInfinity) ? Double.PositiveInfinity : Math.Max(0.0, (constraint.Height - frameSize.Height)));
3499return new Size(childDesiredSize.Width + frameSize.Width, childDesiredSize.Height + frameSize.Height);
3933ownerSizeDeviceUnits = new Point(size.Width, size.Height);
3953topDeviceUnits = ownerRectDeviceUnits.Y + ((ownerRectDeviceUnits.Height - currentSizeDeviceUnits.Height) / 2);
3960topDeviceUnits = Math.Min(topDeviceUnits, workAreaRectDeviceUnits.bottom - currentSizeDeviceUnits.Height);
4038topDeviceUnits = (workAreaRectDeviceUnits.top + ((workAreaHeightDeviceUnits - currentSizeDeviceUnits.Height) / 2));
5187(mousePositionWRTResizeGripControl.Y > _resizeGripControl.RenderSize.Height))
6778Debug.Assert(0 != (int)_overlaySize.Height);