18 writes to Top
PresentationFramework (9)
src\Framework\MS\Internal\Documents\FlowDocumentFormatter.cs (1)
239pageMargin.Top = lineHeight;
src\Framework\MS\Internal\Helper.cs (1)
1205itemsCorrectionFactor.Top = itemsRect.Top;
src\Framework\MS\Internal\PtsHost\ParagraphVisual.cs (1)
79_borderThickness.Top = 0.0;
src\Framework\MS\Internal\Text\TextDpi.cs (1)
182pageMargin.Top = pageSize.Height - _minSize;
src\Framework\System\Windows\Controls\VirtualizingStackPanel.cs (1)
6300inset.Top = headerDesiredSizes.PixelSize.Height + margin.Top;
src\Framework\System\Windows\Documents\FlowDocument.cs (1)
1022pageMargin.Top = lineHeight;
src\Framework\System\Windows\Shell\WindowChromeWorker.cs (3)
408templateFixupMargin.Top -= SystemParameters.WindowResizeBorderThickness.Top; 1400deviceGlassThickness.Top -= windowResizeBorderThicknessDevice.Top; 1401deviceGlassThickness.Top = Math.Max(0, deviceGlassThickness.Top);
PresentationFramework.Aero (2)
Microsoft\Windows\Themes\ListBoxChrome.cs (1)
288border.Top += 1.0;
parent\Shared\Microsoft\Windows\Themes\DataGridHeaderBorder.cs (1)
275padding.Top += 1.0;
PresentationFramework.Classic (1)
parent\Shared\Microsoft\Windows\Themes\DataGridHeaderBorder.cs (1)
275padding.Top += 1.0;
PresentationFramework.Luna (1)
parent\Shared\Microsoft\Windows\Themes\DataGridHeaderBorder.cs (1)
275padding.Top += 1.0;
PresentationFramework.Royale (1)
parent\Shared\Microsoft\Windows\Themes\DataGridHeaderBorder.cs (1)
275padding.Top += 1.0;
System.Activities.Presentation (4)
System.Activities.Presentation\System\Activities\Presentation\FreeFormEditing\ConnectorLabelMarginConverter.cs (1)
36margin.Top = labelLocation.Y;
System.Activities.Presentation\System\Activities\Presentation\FreeFormEditing\ConnectorPointsToArrowMarginConverter.cs (3)
29margin.Top = points[points.Count - 1].Y - offset; 39margin.Top -= offset; 45margin.Top += offset;
214 references to Top
PresentationFramework (139)
src\Framework\MS\Internal\AnimatedTypeHelpers.cs (11)
39InterpolateDouble(from.Top, to.Top, progress), 57AddDouble(value1.Top, value2.Top), 70value1.Top - value2.Top, 88+ Math.Pow(GetSegmentLengthDouble(from.Top, to.Top), 2.0) 108ScaleDouble(value.Top, factor), 131|| IsValidAnimationValueDouble(value.Top) 154GetZeroValueDouble(baseValue.Top),
src\Framework\MS\Internal\Documents\FlowDocumentFormatter.cs (1)
237if (DoubleUtil.IsNaN(pageMargin.Top))
src\Framework\MS\Internal\Helper.cs (3)
1097headerSize.Height = Math.Max(itemsCorrectionFactor.Top, headerSize.Height); 1227if (!(DoubleUtil.AreClose(itemsCorrectionFactor.Top, oldItemsCorrectionFactor.Top) &&
src\Framework\MS\Internal\Ink\InkCanvasSelection.cs (2)
490InkCanvas.SetTop(updatedElement, newPosition.Y - thickness.Top); // Top wasn't auto 498InkCanvas.SetTop(updatedElement, newPosition.Y - thickness.Top); // Both Top and Bottom were aut. Modify Left by default.
src\Framework\MS\Internal\PtsHost\FigureHelper.cs (2)
150value = (structuralCache.CurrentFormatContext.PageHeight - pageMargin.Top - pageMargin.Bottom) * figureLength.Value; 193value = Math.Max(1, Math.Min(value, structuralCache.CurrentFormatContext.PageHeight - pageMargin.Top - pageMargin.Bottom));
src\Framework\MS\Internal\PtsHost\FigureParagraph.cs (1)
663maxTotalHeight = StructuralCache.CurrentFormatContext.PageHeight - pageMargin.Top - pageMargin.Bottom;
src\Framework\MS\Internal\PtsHost\FlowDocumentPage.cs (5)
166pageSize.Height += pageMargin.Top + pageMargin.Bottom; 168SetContentBox(new Rect(pageMargin.Left, pageMargin.Top, _ptsPage.CalculatedSize.Width, _ptsPage.CalculatedSize.Height)); 206SetContentBox(new Rect(pageMargin.Left, pageMargin.Top, 208pageSize.Height - (pageMargin.Top + pageMargin.Bottom))); 720size.Height += _pageMargin.Top + _pageMargin.Bottom;
src\Framework\MS\Internal\PtsHost\MarginCollapsingState.cs (1)
63else if (mcsCurrent == null && DoubleUtil.IsZero(mbp.Margin.Top))
src\Framework\MS\Internal\PtsHost\MbpInfo.cs (15)
142Double.IsNaN(mbp.Margin.Top) ? defaultMargin.Top : mbp.Margin.Top, 167Double.IsNaN(mbp.Padding.Top) ? defaultPadding.Top : mbp.Padding.Top, 193get { return TextDpi.ToTextDpi(_margin.Top) + TextDpi.ToTextDpi(_border.Top) + TextDpi.ToTextDpi(_padding.Top); } 225get { return TextDpi.ToTextDpi(_border.Top) + TextDpi.ToTextDpi(_padding.Top); } 257get { return TextDpi.ToTextDpi(_border.Top); } 289get { return TextDpi.ToTextDpi(_margin.Top); } 342Double.IsNaN(_padding.Top) || 357Double.IsNaN(_margin.Top) ||
src\Framework\MS\Internal\PtsHost\ParagraphVisual.cs (3)
125if (DoubleUtil.GreaterThan(_borderThickness.Top, 0)) 129pen.Thickness = _borderThickness.Top; 156new Point(_renderBounds.Left + _borderThickness.Left, _renderBounds.Top + _borderThickness.Top),
src\Framework\MS\Internal\PtsHost\Section.cs (2)
123fsrcMargin.v = TextDpi.ToTextDpi(pageMargin.Top); 125fsrcMargin.dv = dvrPage - TextDpi.ToTextDpi(pageMargin.Top + pageMargin.Bottom);
src\Framework\MS\Internal\PtsHost\StructuralCache.cs (2)
774internal PTS.FSRECT PageMarginRect { get { return new PTS.FSRECT(new Rect(PageMargin.Left, PageMargin.Top, 776PageSize.Height - PageMargin.Top - PageMargin.Bottom)); } }
src\Framework\MS\Internal\PtsHost\SubpageParaClient.cs (2)
110mbp.Border = new Thickness(mbp.Border.Left, mbp.Border.Top, mbp.Border.Right, 0.0); 111mbp.Padding = new Thickness(mbp.Padding.Left, mbp.Padding.Top, mbp.Padding.Right, 0.0);
src\Framework\MS\Internal\PtsHost\UIElementParagraph.cs (1)
426elementHeight = StructuralCache.CurrentFormatContext.DocumentPageSize.Height - pageMargin.Top - pageMargin.Bottom - TextDpi.FromTextDpi(mbp.MBPTop + mbp.MBPBottom);
src\Framework\MS\Internal\Text\TextDpi.cs (4)
176if (pageMargin.Top >= pageSize.Height) { pageMargin.Bottom = 0.0; } 177if (pageMargin.Top + pageMargin.Bottom >= pageSize.Height) 179pageMargin.Bottom = Math.Max(0.0, pageSize.Height - pageMargin.Top - _minSize);; 180if (pageMargin.Top + pageMargin.Bottom >= pageSize.Height)
src\Framework\System\Windows\Controls\Border.cs (11)
227borders = new Thickness(UIElement.RoundLayoutValue(borders.Left, dpi.DpiScaleX), UIElement.RoundLayoutValue(borders.Top, dpi.DpiScaleY), 274borders = new Thickness(UIElement.RoundLayoutValue(borders.Left, dpi.DpiScaleX), UIElement.RoundLayoutValue(borders.Top, dpi.DpiScaleY), 509if (DoubleUtil.GreaterThan(border.Top, 0)) 518pen.Thickness = UIElement.RoundLayoutValue(border.Top, dpi.DpiScaleY); 522pen.Thickness = border.Top; 582UIElement.RoundLayoutValue(border.Top, dpi.DpiScaleY)); 597ptTL = new Point(border.Left, border.Top); 632return new Size(th.Left + th.Right, th.Top + th.Bottom); 647rt.Top + thick.Top, 649Math.Max(0.0, rt.Height - thick.Top - thick.Bottom)); 947double top = 0.5 * borders.Top;
src\Framework\System\Windows\Controls\Control.cs (1)
388&& t.Top >= 0.0d
src\Framework\System\Windows\Controls\DataGridColumnFloatingHeader.cs (1)
184delta += margin.Top;
src\Framework\System\Windows\Controls\FlowDocumentScrollViewer.cs (1)
594Math.Max(ia.OriginHeight, pagePadding.Top),
src\Framework\System\Windows\Controls\Primitives\TabPanel.cs (2)
213desiredSizeWithoutMargin.Height = Math.Max(0d, element.DesiredSize.Height - margin.Top - margin.Bottom); 268double topOffset = margin.Top;
src\Framework\System\Windows\Controls\SinglePageViewer.cs (1)
712Math.Max(ia.OriginHeight, pagePadding.Top),
src\Framework\System\Windows\Controls\TextBlock.cs (5)
1354Math.Max(0.0, constraint.Height - (padding.Top + padding.Bottom))); 1426desiredSize.Height += (padding.Top + padding.Bottom); 2068Math.Max(0.0, _referenceSize.Height - (padding.Top + padding.Bottom))); 3207Math.Max(0.0, computedSize.Height - (padding.Top + padding.Bottom))); 3223contentOffset.Y += padding.Top;
src\Framework\System\Windows\Controls\TextRangeAdaptor.cs (1)
351return margin.IsValid(true, false, false, false) ? NativeObjectLengthToPoints(margin.Top) : 0;
src\Framework\System\Windows\Controls\ToolBar.cs (1)
572extraLength = Math.Max(0.0, desiredSize.Height - toolBarPanel.DesiredSize.Height + margin.Top + margin.Bottom);
src\Framework\System\Windows\Controls\VirtualizingStackPanel.cs (19)
1261firstContainerOffsetFromViewport -= fe.Margin.Top; 2959_pixelDistanceToViewport += (isHorizontal ? inset.Left : inset.Top); 5186viewport.Y -= IsPixelBased ? inset.Top : isHeaderBeforeItems ? 1 : 0; 5354if (DoubleUtil.GreaterThanOrClose(viewport.Height, inset.Top)) 5359viewport.Height = Math.Max(0, viewport.Height - inset.Top); 5370cacheAfterSize = Math.Max(0, cacheAfterSize - (inset.Top - viewport.Height)); 5387cacheAfterSize = Math.Max(0, cacheAfterSize - inset.Top); 6300inset.Top = headerDesiredSizes.PixelSize.Height + margin.Top; 6333childRect.Offset(-margin.Left, -margin.Top); 6363DoubleUtil.AreClose(oldInset.Top, inset.Top ) && 6375|| (!isHorizontal && !(AreInsetsClose(oldInset.Top, inset.Top) && 6481return DoubleUtil.GreaterThanOrClose(inset.Top - margin.Top, inset.Bottom - margin.Bottom); 6979: new Size(childDesiredSize.Width, Math.Max(inset.Top, 0)); 7513inset.Top + itemDesiredSizes.PixelSize.Height + inset.Bottom); 10933offset += (isHorizontal ? inset.Left : inset.Top); 12805writer.Write(thickness.Top);
src\Framework\System\Windows\Documents\Block.cs (4)
560if (Double.IsNaN(t.Left) || Double.IsNaN(t.Right) || Double.IsNaN(t.Top) || Double.IsNaN(t.Bottom)) 573if (!Double.IsNaN(t.Top) && (t.Top < 0 || t.Top > maxThickness))
src\Framework\System\Windows\Documents\FlowDocument.cs (1)
1020if (DoubleUtil.IsNaN(pageMargin.Top))
src\Framework\System\Windows\Documents\Paragraph.cs (1)
243return (Double.IsNaN(margin.Left) && Double.IsNaN(margin.Right) && Double.IsNaN(margin.Top) && Double.IsNaN(margin.Bottom));
src\Framework\System\Windows\Documents\TextRange.cs (1)
1665((Thickness)value).Right, ((Thickness)value).Top, ((Thickness)value).Left, ((Thickness)value).Bottom);
src\Framework\System\Windows\Documents\TextRangeEdit.cs (5)
1064double topMargin = newThickness.Top < 0 1065? currentThickness.Top 1066: GetNewDoubleValue(null, currentThickness.Top, newThickness.Top, propertyValueAction); 1239/*top:*/((Thickness)value).Top,
src\Framework\System\Windows\Documents\TextRangeEditTables.cs (1)
1293double borderBottom = rowIndex + cell.RowSpan < rowCount ? 0.0 : border.Top;
src\Framework\System\Windows\FrameworkElement.cs (4)
4329double marginHeight = margin.Top + margin.Bottom; 4576double marginHeight = margin.Top + margin.Bottom; 4782offset.Y += finalRect.Y + margin.Top; 4932double marginHeight = margin.Top + margin.Bottom;
src\Framework\System\Windows\Input\KeyboardNavigation.cs (2)
2477double y = -deflateThickness.Top; 2479double height = uiElement.RenderSize.Height + deflateThickness.Top + deflateThickness.Bottom;
src\Framework\System\Windows\Shell\WindowChromeWorker.cs (8)
408templateFixupMargin.Top -= SystemParameters.WindowResizeBorderThickness.Top; 469templateFixupMargin.Bottom -= SystemParameters.WindowResizeBorderThickness.Top; 699rcClientArea.Top += (int)windowResizeBorderThicknessDevice.Top; 1400deviceGlassThickness.Top -= windowResizeBorderThicknessDevice.Top; 1401deviceGlassThickness.Top = Math.Max(0, deviceGlassThickness.Top); 1425cyTopHeight = (int)Math.Ceiling(deviceGlassThickness.Top), 1452if (mousePosition.Y >= windowPosition.Top && mousePosition.Y < windowPosition.Top + _chromeInfo.ResizeBorderThickness.Top + _chromeInfo.CaptionHeight) 1454onResizeBorder = (mousePosition.Y < (windowPosition.Top + _chromeInfo.ResizeBorderThickness.Top));
src\Framework\System\Windows\Standard\DpiHelper.cs (1)
77Point topLeft = LogicalPixelsToDevice(new Point(logicalThickness.Left, logicalThickness.Top), dpiScaleX, dpiScaleY);
src\Framework\System\Windows\Standard\Utilities.cs (1)
283if (!IsDoubleFiniteAndNonNegative(thickness.Top))
src\Framework\System\Windows\Thickness.cs (8)
129&& DoubleUtil.IsZero(Top) 139return DoubleUtil.AreClose(Left, Top) 158if(Left < 0d || Right < 0d || Top < 0d || Bottom < 0d) 164if(DoubleUtil.IsNaN(Left) || DoubleUtil.IsNaN(Right) || DoubleUtil.IsNaN(Top) || DoubleUtil.IsNaN(Bottom)) 170if(Double.IsPositiveInfinity(Left) || Double.IsPositiveInfinity(Right) || Double.IsPositiveInfinity(Top) || Double.IsPositiveInfinity(Bottom)) 178if(Double.IsNegativeInfinity(Left) || Double.IsNegativeInfinity(Right) || Double.IsNegativeInfinity(Top) || Double.IsNegativeInfinity(Bottom)) 197&& DoubleUtil.AreClose(Top, thickness.Top)
src\Framework\System\Windows\ThicknessConverter.cs (2)
161return new InstanceDescriptor(ci, new object[] { th.Left, th.Top, th.Right, th.Bottom }); 191sb.Append(LengthConverter.ToString(th.Top, cultureInfo));
src\Framework\System\Windows\Window.cs (2)
6988|| margin.Top + margin.Bottom >= logicalClientRc.Height) 6996LogicalToDeviceUnits(new Point(margin.Left, margin.Top)),
PresentationFramework.Aero (13)
Microsoft\Windows\Themes\ListBoxChrome.cs (9)
220double borderY = border.Top + border.Bottom; 281double borderY = border.Top + border.Bottom; 296childArrangeRect.Y = border.Top; 319double borderY = border.Top + border.Bottom; 327border.Top == 1.0 && border.Bottom == 1.0; 336bounds.Top + border.Top, 351bounds.Top + border.Top + innerBorderThickness, 499borderFigure.StartPoint = new Point(bounds.Left + thickness.Left, bounds.Top + thickness.Top); 502borderFigure.Segments.Add(new LineSegment(new Point(bounds.Right - thickness.Right, bounds.Top + thickness.Top), false));
parent\Shared\Microsoft\Windows\Themes\DataGridHeaderBorder.cs (4)
200childHeight = Math.Max(0.0, childHeight - padding.Top - padding.Bottom); 207return new Size(desiredSize.Width + padding.Left + padding.Right, desiredSize.Height + padding.Top + padding.Bottom); 236double childHeight = Math.Max(0.0, arrangeSize.Height - padding.Top - padding.Bottom); 238child.Arrange(new Rect(padding.Left, padding.Top, childWidth, childHeight));
PresentationFramework.Classic (28)
Microsoft\Windows\Themes\ClassicBorderDecorator.cs (24)
578thickness.Top >= 0 && !double.IsPositiveInfinity(thickness.Top) && 600return new Size(th.Left + th.Right, th.Top + th.Bottom); 607rt.Top + thick.Top, 609Math.Max(0.0, rt.Height - thick.Top - thick.Bottom)); 719double borderHeight = border.Top + border.Bottom; 725childArrangeRect.Y = border.Top; 749return new Thickness(t.Left * s, t.Top * s, t.Right * s, t.Bottom * s); 856yLines = GetPixelSnappingGuidelines(height, singleThickness.Top, singleThickness.Bottom, (int)classicThickness); 956if (borderThickness.Top > 0.0) 958dc.DrawRectangle(borderBrush, null, new Rect(bounds.Left, bounds.Top, bounds.Width, borderThickness.Top)); 991DrawBorder(highlight, new Thickness(singleThickness.Left, singleThickness.Top, 0, 0), dc, ref bounds); 999if (bounds.Width < 2.0 * (singleThickness.Left + singleThickness.Right) || bounds.Height < 2.0 * (singleThickness.Top + singleThickness.Bottom)) 1009if (bounds.Width < (singleThickness.Left + singleThickness.Right) || bounds.Height < (singleThickness.Top + singleThickness.Bottom)) 1018if (bounds.Width < 2.0 * (singleThickness.Left + singleThickness.Right) || bounds.Height < 2.0 * (singleThickness.Top + singleThickness.Bottom)) 1028if (bounds.Width < 2.0 * (singleThickness.Left + singleThickness.Right) || bounds.Height < 2.0 * (singleThickness.Top + singleThickness.Bottom)) 1039if (bounds.Height < singleThickness.Top + singleThickness.Bottom) 1042dc.DrawRectangle(DarkBrush, null, new Rect(bounds.Left, bounds.Top, bounds.Width, singleThickness.Top)); 1045bounds.Y += singleThickness.Top; 1046bounds.Height -= singleThickness.Top + singleThickness.Bottom; 1300if (bounds.Width < (singleThickness.Left + singleThickness.Right) || bounds.Height < (singleThickness.Top + singleThickness.Bottom)) 1308if (bounds.Width < (singleThickness.Left + singleThickness.Right) || bounds.Height < (singleThickness.Top + singleThickness.Bottom)) 1316if (bounds.Width < 2.0 * (singleThickness.Left + singleThickness.Right) || bounds.Height < 2.0 * (singleThickness.Top + singleThickness.Bottom)) 1325if (bounds.Width < (singleThickness.Left + singleThickness.Right) || bounds.Height < (singleThickness.Top + singleThickness.Bottom))
parent\Shared\Microsoft\Windows\Themes\DataGridHeaderBorder.cs (4)
200childHeight = Math.Max(0.0, childHeight - padding.Top - padding.Bottom); 207return new Size(desiredSize.Width + padding.Left + padding.Right, desiredSize.Height + padding.Top + padding.Bottom); 236double childHeight = Math.Max(0.0, arrangeSize.Height - padding.Top - padding.Bottom); 238child.Arrange(new Rect(padding.Left, padding.Top, childWidth, childHeight));
PresentationFramework.Luna (12)
Microsoft\Windows\Themes\ScrollChrome.cs (2)
248totalPadding = padding.Top + padding.Bottom; 255bounds.Y += padding.Top;
parent\Shared\Microsoft\Windows\Themes\BulletChrome.cs (6)
196double borderY = isRound ? 2.0 : thickness.Top + thickness.Bottom; 211thickness.Top == 1.0 && thickness.Bottom == 1.0; 221thickness.Top, 223Math.Max(0, bounds.Height - thickness.Top - thickness.Bottom)); 463rt.Top + thick.Top, 465Math.Max(0.0, rt.Height - thick.Top - thick.Bottom));
parent\Shared\Microsoft\Windows\Themes\DataGridHeaderBorder.cs (4)
200childHeight = Math.Max(0.0, childHeight - padding.Top - padding.Bottom); 207return new Size(desiredSize.Width + padding.Left + padding.Right, desiredSize.Height + padding.Top + padding.Bottom); 236double childHeight = Math.Max(0.0, arrangeSize.Height - padding.Top - padding.Bottom); 238child.Arrange(new Rect(padding.Left, padding.Top, childWidth, childHeight));
PresentationFramework.Royale (12)
Microsoft\Windows\Themes\ScrollChrome.cs (2)
230totalPadding = padding.Top + padding.Bottom; 237bounds.Y += padding.Top;
parent\Shared\Microsoft\Windows\Themes\BulletChrome.cs (6)
196double borderY = isRound ? 2.0 : thickness.Top + thickness.Bottom; 211thickness.Top == 1.0 && thickness.Bottom == 1.0; 221thickness.Top, 223Math.Max(0, bounds.Height - thickness.Top - thickness.Bottom)); 463rt.Top + thick.Top, 465Math.Max(0.0, rt.Height - thick.Top - thick.Bottom));
parent\Shared\Microsoft\Windows\Themes\DataGridHeaderBorder.cs (4)
200childHeight = Math.Max(0.0, childHeight - padding.Top - padding.Bottom); 207return new Size(desiredSize.Width + padding.Left + padding.Right, desiredSize.Height + padding.Top + padding.Bottom); 236double childHeight = Math.Max(0.0, arrangeSize.Height - padding.Top - padding.Bottom); 238child.Arrange(new Rect(padding.Left, padding.Top, childWidth, childHeight));
System.Activities.Core.Presentation (2)
System\Activities\Core\Presentation\FlowchartConnectionPointsAdorner.cs (1)
48origin.Y += margin.Top;
System\Activities\Core\Presentation\StateMachineConnetionPointsAdorner.cs (1)
32origin.Y += margin.Top;
System.Activities.Presentation (8)
System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\FromExpression\Framework\ValueEditors\ChoiceEditor.cs (2)
902double dropButtonTop = innerRect.Top + dropButtonInset.Top; 915double textAreaTop = innerRect.Top + textAreaInset.Top;
System.Activities.Presentation\System\Activities\Presentation\FreeFormEditing\ConnectionPoint.cs (2)
116topLeft.Offset(parent.Margin.Left, parent.Margin.Top); 118double parentHeight = parent.DesiredSize.Height - parent.Margin.Top - parent.Margin.Bottom;
System.Activities.Presentation\System\Activities\Presentation\FreeFormEditing\ConnectionPointConverter.cs (2)
30origin.Y += margin.Top; 32height = height - margin.Top - margin.Bottom;
System.Activities.Presentation\System\Activities\Presentation\FreeFormEditing\ConnectorRouter.cs (2)
132Size childSize = new Size(frameworkChild.DesiredSize.Width - margin.Left - margin.Right, frameworkChild.DesiredSize.Height - margin.Top - margin.Bottom); 133Rect rect = new Rect(Point.Add(panel.TranslatePoint(FreeFormPanel.GetLocation(child), outmostPanel), new Vector(margin.Left, margin.Top)), childSize);