140 writes to Y
PresentationCore (66)
Core\CSharp\MS\Internal\Ink\Bezier.cs (1)
78p.Y *= StrokeCollectionSerializer.HimetricToAvalonMultiplier;
Core\CSharp\MS\Internal\Ink\CuspData.cs (2)
49point.Y *= StrokeCollectionSerializer.AvalonToHimetricMultiplier; 69point2.Y *= StrokeCollectionSerializer.AvalonToHimetricMultiplier;
Core\CSharp\MS\Internal\Ink\Lasso.cs (1)
725intersectionPoint.Y = points[i].Y + (intersection - i) * (points[i + 1].Y - points[i].Y);
Core\CSharp\MS\Internal\Media\ParserStreamGeometrycontext.cs (3)
427point2.Y = XamlSerializationHelper.ReadDouble(br); 444point2.Y = XamlSerializationHelper.ReadDouble(br); 447point3.Y = XamlSerializationHelper.ReadDouble(br);
Core\CSharp\MS\Internal\Media3D\GeneralTransform2Dto3Dto2D.cs (2)
1125if (ptRelToCapture.Y <= _visualBounds.Top + 1) ptRelToCapture.Y -= BUFFER_SIZE; 1127if (ptRelToCapture.Y >= _visualBounds.Bottom - 1) ptRelToCapture.Y += BUFFER_SIZE;
Core\CSharp\MS\Internal\TextFormatting\FullTextLine.cs (1)
689origin.X = origin.Y = 0;
Core\CSharp\MS\Internal\TextFormatting\LineServicesCallbacks.cs (1)
1450drawingLineOrigin.Y += unitValue * textDecoration.PenOffset;
Core\CSharp\MS\Internal\TextFormatting\LineServicesRun.cs (3)
340origin.Y += vectorToOrigin.Y; 373origin.Y += vectorToOrigin.Y; 407origin.Y += vectorToOrigin.Y;
Core\CSharp\System\Windows\Input\MouseDevice.cs (2)
1520_positionRelativeToOver.Y = 0; 1523_lastPosition.Y = rawMouseInputReport.Y;
Core\CSharp\System\Windows\Interop\HwndMouseInputProvider.cs (2)
338currentPosition.Y -= 65536; 345currentPosition.Y = ((currentPosition.Y * (nVirtualHeight - 1)) - (nVirtualTop * 65536)) / nVirtualHeight;
Core\CSharp\System\Windows\Interop\HwndSource.cs (1)
1674relevantPt.Y = rect.Height;
Core\CSharp\System\Windows\Media\Effects\BlurEffect.cs (2)
44topLeft.Y = contentBounds.TopLeft.Y - radius; 46bottomRight.Y = contentBounds.BottomRight.Y + radius;
Core\CSharp\System\Windows\Media\Effects\DropShadowEffect.cs (4)
44topLeft.Y = contentBounds.TopLeft.Y - radius; 46bottomRight.Y = contentBounds.BottomRight.Y + radius; 67topLeft.Y -= offsetY; 72bottomRight.Y -= offsetY;
Core\CSharp\System\Windows\Media\Effects\ShaderEffect.cs (2)
37topLeft.Y = contentBounds.TopLeft.Y - PaddingTop; 39bottomRight.Y = contentBounds.BottomRight.Y + PaddingBottom;
Core\CSharp\System\Windows\Media\EllipseGeometry.cs (13)
405points[2].Y = points[3].Y = points[4].Y = center.Y + radiusY; 406points[1].Y = points[5].Y = center.Y + mid; 407points[0].Y = points[6].Y = points[12].Y = center.Y; 408points[7].Y = points[11].Y = center.Y - mid; 409points[8].Y = points[9].Y = points[10].Y = center.Y - radiusY;
Core\CSharp\System\Windows\Media\FormattedText.cs (1)
1218lineOrigin.Y += height;
Core\CSharp\System\Windows\Media\ParsersCommon.cs (2)
596case 'v': _lastPoint.Y += ReadNumber(! AllowComma); break; 597case 'V': _lastPoint.Y = ReadNumber(! AllowComma); break;
Core\CSharp\System\Windows\Media\RectangleGeometry.cs (21)
515points[2].Y = points[3].Y = points[4].Y = points[5].Y = rect.Y; 516points[1].Y = points[6].Y = rect.Y + bezierY; 517points[0].Y = points[7].Y = rect.Y + radiusY; 518points[15].Y = points[8].Y = rect.Bottom - radiusY; 519points[14].Y = points[9].Y = rect.Bottom - bezierY; 520points[13].Y = points[12].Y = points[11].Y = points[10].Y = rect.Bottom; 532points[0].Y = points[1].Y = points[4].Y = rect.Y; 533points[2].Y = points[3].Y = rect.Bottom;
Core\CSharp\System\Windows\Media3D\MeshGeometry3D.cs (2)
152ptMin.Y = txy; 156ptMax.Y = txy;
PresentationFramework (33)
src\Framework\MS\Internal\Documents\DocumentPageTextView.cs (1)
225offset.Y = GetYOffsetAtNextPage(offset.Y, count, out pagesMoved);
src\Framework\MS\Internal\Documents\TextBoxView.cs (1)
2016point.Y -= this.VerticalAlignmentOffset;
src\Framework\MS\Internal\Documents\TextDocumentView.cs (2)
834point.Y -= subpageParagraphResult.ContentOffset.Y; 1048point.Y -= subpageParagraphResult.ContentOffset.Y;
src\Framework\MS\Internal\Ink\InkCanvasSelection.cs (2)
463originalPosition.Y = top; 467originalPosition.Y = bottom;
src\Framework\MS\Internal\Ink\SelectionEditingBehavior.cs (4)
233newPoint.Y = _selectionRect.Bottom - MinimumHeightWidthSize; 244newPoint.Y = _selectionRect.Top + MinimumHeightWidthSize; 259_previousLocation.Y = newPoint.Y; 269_previousLocation.Y = newPoint.Y;
src\Framework\MS\Internal\PtsHost\SectionVisual.cs (2)
62rulePositions[(index-1)*2].Y = v; 64rulePositions[(index-1)*2+1].Y = v + dv;
src\Framework\System\Windows\Controls\Border.cs (4)
691rightTop.Y = v; 692rightBottom.Y = v; 707leftBottom.Y = v; 708leftTop.Y = v;
src\Framework\System\Windows\Controls\Primitives\Thumb.cs (1)
320_originThumbPoint.Y = 0;
src\Framework\System\Windows\Controls\Primitives\Track.cs (3)
520offset.Y = isDirectionReversed ? decreaseButtonLength + thumbLength : 0.0; 527offset.Y = isDirectionReversed ? 0.0 : increaseButtonLength + thumbLength; 534offset.Y = isDirectionReversed ? decreaseButtonLength : increaseButtonLength;
src\Framework\System\Windows\Controls\TextBlock.cs (1)
1671lineOffset.Y += lineMetrics.Height;
src\Framework\System\Windows\Controls\TextBox.cs (2)
1433point.Y = lineHeight * lineIndex + (lineHeight / 2) - VerticalOffset; // use a point in the middle of the line, to be safe 1462point.Y = lineHeight * lineIndex + (lineHeight / 2) - VerticalOffset; // use a point in the middle of the line, to be safe
src\Framework\System\Windows\Documents\FixedTextView.cs (1)
1073bottom.Y += height;
src\Framework\System\Windows\Documents\Glyphs.cs (3)
223_glyphRunOrigin.Y = OriginY; 225_glyphRunOrigin.Y = -alignmentRect.Y; 390glyphRunProperties.glyphOffsets[i].Y = parsedGlyphData.offsetY * fromEmToMil;
src\Framework\System\Windows\Documents\RubberbandSelector.cs (2)
152pt.Y = 0; 156pt.Y = pageSize.Height;
src\Framework\System\Windows\Input\KeyboardNavigation.cs (2)
2661startPoint.Y = _horizontalBaseline; 2668startPoint.Y = _horizontalBaseline;
src\Framework\System\Windows\Window.cs (2)
8100pt.Y = rect.bottom - rect.top; 8480Y = LogicalTopLeft.Y * dpiScaleY
System.Activities.Core.Presentation (22)
System\Activities\Core\Presentation\FlowchartConnectionPointsAdorner.cs (3)
48origin.Y += margin.Top; 71actualPoint.Y += ConnectionPoint.DrawingLargeSide / 2; 96actualPoint.Y += ConnectionPoint.DrawingLargeSide / 2;
System\Activities\Core\Presentation\FlowchartDesigner.Container.cs (2)
334panelPoint.Y = panelPoint.Y < 0 ? 0 : panelPoint.Y; 445topLeft.Y = topLeft.Y > viewStatePoint.Y ? viewStatePoint.Y : topLeft.Y;
System\Activities\Core\Presentation\FlowchartDesigner.Helpers.cs (5)
274pt.Y -= pt.Y % FreeFormPanel.GridSize; 276pt.Y = pt.Y < 0 ? 0 : pt.Y; 293location.Y -= element.DesiredSize.Height / 2; 300location.Y -= shapeAnchorPoint.Y; 316location.Y = (correction == FreeFormPanel.GridSize) ? 0 : correction;
System\Activities\Core\Presentation\FlowchartDesigner.xaml.cs (2)
2014newLocation.Y = FreeFormPanel.ZeroIfNegative(newLocation.Y); 2135point.Y += (((WorkflowViewElement)modelItem.View).ActualHeight + interval);
System\Activities\Core\Presentation\StateContainerEditor.CompositeView.cs (3)
395pastePoint.Y = pastePoint.Y < 0 ? 0 : pastePoint.Y; 452topLeft.Y = topLeft.Y > location.Y ? location.Y : topLeft.Y; 516newLocation.Y = newLocation.Y < 0 ? 0 : newLocation.Y;
System\Activities\Core\Presentation\StateContainerEditor.Utilities.cs (5)
133location.Y -= InitialNodeHeight / 2; 138location.Y -= shapeAnchorPoint.Y; 154location.Y = (correction == FreeFormPanel.GridSize) ? 0 : correction; 162pt.Y -= pt.Y % FreeFormPanel.GridSize; 164pt.Y = pt.Y < 0 ? 0 : pt.Y;
System\Activities\Core\Presentation\StateContainerEditor.xaml.cs (1)
2108newLocation.Y = FreeFormPanel.ZeroIfNegative(newLocation.Y);
System\Activities\Core\Presentation\StateMachineConnetionPointsAdorner.cs (1)
32origin.Y += margin.Top;
System.Activities.Presentation (19)
System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\FromExpression\Framework\ValueEditors\RenderUtils.cs (2)
27spineLeftTop.Y += halfThickness; 29spineRightBottom.Y -= halfThickness;
System.Activities.Presentation\System\Activities\Presentation\DragDropHelper.cs (1)
755topLeftPoint.Y = location.Y;
System.Activities.Presentation\System\Activities\Presentation\FreeFormEditing\AutoSplitHelper.cs (4)
94dropLocation.Y = dropLocation.Y < 0 ? 0 : dropLocation.Y; 129dropLocation.Y = targetLocation.Y + targetSize.Height + ShapeMargin; 133dropLocation.Y = targetLocation.Y - droppedSize.Height - ShapeMargin; 142dropLocation.Y = targetLocation.Y + ((targetSize.Height - droppedSize.Height) / 2);
System.Activities.Presentation\System\Activities\Presentation\FreeFormEditing\ConnectionPointConverter.cs (1)
30origin.Y += margin.Top;
System.Activities.Presentation\System\Activities\Presentation\FreeFormEditing\ConnectorLabelMarginConverter.cs (1)
35labelLocation.Y = (int)(labelLocation.Y - labelBorderHeight / 2 + EPS);
System.Activities.Presentation\System\Activities\Presentation\FreeFormEditing\ConnectorRouter.cs (3)
431r1.Y -= margin.Height; 481r3.Y += margin.Height; 1274newPoint.Y = int.MaxValue;
System.Activities.Presentation\System\Activities\Presentation\MiniMap\MiniMapControl.xaml.cs (1)
212this.mousePosition.Y = 0;
System.Activities.Presentation\System\Activities\Presentation\View\ExtensionSurface.cs (4)
309position.Y = CalculateInBoundsValue(position.Y, window.DesiredSize.Height, this.ActualHeight, this.selectedChild.Value.Y); 319this.canvasOffset.Y = 0; 328this.canvasOffset.Y = Math.Min(this.canvasOffset.Y, p.Y); 332this.canvasOffset.Y = Math.Abs(this.canvasOffset.Y);
System.Activities.Presentation\System\Activities\Presentation\View\ExtensionWindow.cs (2)
222offset.Y = targetPosition.Y - windowPosition.Y; 488topLeft.Y = absolutePosition.Y;
982 references to Y
PresentationCore (267)
Core\CSharp\MS\Internal\AnimatedTypeHelpers.cs (11)
120from.Location.Y + ((to.Location.Y - from.Location.Y) * progress)); 196value1.Y + value2.Y); 298value1.Y - value2.Y); 546value.Y * factor); 568value.Location.Y * factor); 662if (IsInvalidDouble(value.X) || IsInvalidDouble(value.Y)) 693if ( IsInvalidDouble(value.Location.X) || IsInvalidDouble(value.Location.Y)
Core\CSharp\MS\Internal\Ink\CuspData.cs (1)
183return new Vector(_points[i].Point.X, _points[i].Point.Y);
Core\CSharp\MS\Internal\Ink\Lasso.cs (15)
136if (!DoubleUtil.AreClose(_points[last].Y,point.Y)) 138isHigher = (point.Y < _points[last].Y); 148if (DoubleUtil.AreClose(lassoPoint.Y, point.Y)) 155if ((0 != i) && DoubleUtil.AreClose(prevLassoPoint.Y, point.Y) && 163else if (isHigher != (point.Y < lassoPoint.Y)) 177double x = prevLassoPoint.X + (lassoSegment.X / lassoSegment.Y) * (point.Y - prevLassoPoint.Y); 725intersectionPoint.Y = points[i].Y + (intersection - i) * (points[i + 1].Y - points[i].Y);
Core\CSharp\MS\Internal\Ink\StrokeNode.cs (26)
766double a1 = line1End.Y - line1Start.Y; 768double c1 = (line1End.X * line1Start.Y) - (line1Start.X * line1End.Y); 769double a2 = line2End.Y - line2Start.Y; 771double c2 = (line2End.X * line2Start.Y) - (line2Start.X * line2End.Y); 803if (line1Start.Y < line1End.Y) 805line1YMin = Math.Floor(line1Start.Y); 806line1YMax = Math.Ceiling(line1End.Y); 810line1YMin = Math.Floor(line1End.Y); 811line1YMax = Math.Ceiling(line1Start.Y); 814if (line2Start.Y < line2End.Y) 816line2YMin = Math.Floor(line2Start.Y); 817line2YMax = Math.Ceiling(line2End.Y); 821line2YMin = Math.Floor(line2End.Y); 822line2YMax = Math.Ceiling(line2Start.Y); 838(long)line1End.Y == (long)line2Start.Y) 840return new Point(line1End.X, line1End.Y); 1073double yDiff = (_thisNode.Position.Y - _lastNode.Position.Y) * findex; 1079_lastNode.Position.Y + yDiff);
Core\CSharp\MS\Internal\Ink\StrokeRenderer.cs (5)
967Size ellipseSize = new Size(sizePoint.X / 2/*width*/, sizePoint.Y / 2/*height*/); 1010double dy = (currentPosition.Y * 1000) - (previousPosition.Y * 1000); 1049double dy = (currentPosition.Y * 1000) - (previousPosition.Y * 1000);
Core\CSharp\MS\Internal\Media\ParserStreamGeometrycontext.cs (6)
152XamlSerializationHelper.WriteDouble(_bw, point2.Y); 166XamlSerializationHelper.WriteDouble(_bw, point2.Y); 169XamlSerializationHelper.WriteDouble(_bw, point3.Y); 654isScaledIntegerY = XamlSerializationHelper.CanConvertToInteger(point.Y, ref intValueY); 659SerializeDouble(point.Y, isScaledIntegerY, intValueY); 684XamlSerializationHelper.WriteDouble(_bw, points[i].Y);
Core\CSharp\MS\Internal\Media\XamlSerializationHelper.cs (1)
291WriteDouble( writer, curPoint.Y);
Core\CSharp\MS\Internal\Media3D\GeneralTransform2Dto3Dto2D.cs (44)
61_p1Transformed = new Point(projPoint1.X, projPoint1.Y); 62_p2Transformed = new Point(projPoint2.X, projPoint2.Y); 517(Math.Max(visEdgeStart.Y, visEdgeEnd.Y) < Math.Min(uv1.Y, uv2.Y)) || 518(Math.Min(visEdgeStart.Y, visEdgeEnd.Y) > Math.Max(uv1.Y, uv2.Y)))) 619if (Math.Abs(visUV1.X - visUV2.X) > Math.Abs(visUV1.Y - visUV2.Y)) 676if (visUV1.Y <= visUV2.Y) 687if (triUV1.Y <= triUV2.Y) 706if (minVisUV.Y < minTriUV.Y) 714p1 = minTri3D + (minVisUV.Y - minTriUV.Y) / (maxTriUV.Y - minTriUV.Y) * (maxTri3D - minTri3D); 718if (maxVisUV.Y > maxTriUV.Y) 726p2 = minTri3D + (maxVisUV.Y - minTriUV.Y) / (maxTriUV.Y - minTriUV.Y) * (maxTri3D - minTri3D); 752double dy = p2.Y - p1.Y; 770double numer = (o.X - p1.X) * dy / dx - o.Y + p1.Y; 776double b0 = -o.X * dy / dx + o.Y; 777double b1 = -p1.X * dy / dx + p1.Y; 935(Math.Max(visEdgeStart.Y, visEdgeEnd.Y) < Math.Min(uv1.Y, uv2.Y)) || 936(Math.Min(visEdgeStart.Y, visEdgeEnd.Y) > Math.Max(uv1.Y, uv2.Y)))) 1125if (ptRelToCapture.Y <= _visualBounds.Top + 1) ptRelToCapture.Y -= BUFFER_SIZE; 1127if (ptRelToCapture.Y >= _visualBounds.Bottom - 1) ptRelToCapture.Y += BUFFER_SIZE;
Core\CSharp\MS\Internal\Media3D\M3DUtil.cs (8)
32double w = barycentric.Y; 374-(((2*point.Y)/size.Height) - 1)); 601double D = triUVVertices[0].Y - triUVVertices[2].Y; 602double E = triUVVertices[1].Y - triUVVertices[2].Y; 603double F = triUVVertices[2].Y - p.Y;
Core\CSharp\MS\Internal\TextFormatting\DrawingState.cs (1)
65_baseGuidelineY = lineOrigin.Y + currentLine.Baseline;
Core\CSharp\MS\Internal\TextFormatting\FormattedTextSymbols.cs (2)
256drawingContext.PushGuidelineY1(currentOrigin.Y); 276boundingBox.Y += glyphRun.BaselineOrigin.Y;
Core\CSharp\MS\Internal\TextFormatting\FullTextLine.cs (2)
2517LSPOINT pt = new LSPOINT((int)ptQuery.X, (int)ptQuery.Y); 2700boundingBox.Y -= origin.Y;
Core\CSharp\MS\Internal\TextFormatting\LineServicesCallbacks.cs (18)
1372unitValue = (lineOrigin.Y - baselineOrigin.Y); 1410Draw.SetGuidelineY(baselineOrigin.Y); 1429drawingLineOrigin.Y // reference point of scaling 1459drawingContext.PushGuidelineY2(baselineOrigin.Y, drawingLineOrigin.Y - drawingPenThickness * 0.5 - baselineOrigin.Y); 1478drawingLineOrigin.Y - drawingPenThickness * 0.5, 1504new Point(drawingLineOrigin.X + lineLength, drawingLineOrigin.Y) 1521lineOrigin.Y + unitValue * textDecoration.PenOffset - penThickness * 0.5, 1573Draw.SetGuidelineY(glyphRun.BaselineOrigin.Y); 1966Draw.SetGuidelineY(glyphRun.BaselineOrigin.Y); 2658currentLine.Formatter.IdealToReal((lsrunOrigin.y + lsrun.BaselineMoveOffset), currentLine.PixelsPerDip) + Draw.VectorToLineOrigin.Y 2672objectBounds.Y += baselineOrigin.Y; 2683objectBounds.Location.Y, 2691objectBounds.Location.Y + objectBounds.Size.Height, 2702Draw.SetGuidelineY(baselineOrigin.Y); 2715baselineOrigin.Y,
Core\CSharp\MS\Internal\TextFormatting\LineServicesRun.cs (11)
271inkBoundingBox.Y += glyphRun.BaselineOrigin.Y; 340origin.Y += vectorToOrigin.Y; 344xy = new Point(line.Formatter.IdealToReal(line.ParagraphWidth, line.PixelsPerDip) - vectorToOrigin.X - u + origin.X, v + origin.Y); 348xy = new Point(u + vectorToOrigin.X + origin.X, v + origin.Y); 373origin.Y += vectorToOrigin.Y; 377xy = new Point(line.Formatter.IdealToReal(line.ParagraphWidth - u, line.PixelsPerDip) - vectorToOrigin.X + origin.X, line.Formatter.IdealToReal(v, line.PixelsPerDip) + origin.Y); 381xy = new Point(line.Formatter.IdealToReal(u, line.PixelsPerDip) + vectorToOrigin.X + origin.X, line.Formatter.IdealToReal(v, line.PixelsPerDip) + origin.Y); 407origin.Y += vectorToOrigin.Y; 418nominalY = v + TextFormatterImp.RealToIdeal(origin.Y); 452if(DoubleUtil.AreClose(rect.TopLeft.Y, rect.BottomRight.Y))
Core\CSharp\MS\Internal\TextFormatting\SimpleTextLine.cs (5)
602double y = origin.Y + Baseline; 642boundingBox.Y -= origin.Y; 1838inkBoundingBox.Y += glyphRun.BaselineOrigin.Y; 1879lineOrigin.Y - penThickness * 0.5, 1890drawingContext.PushGuidelineY2(y, lineOrigin.Y - penThickness * 0.5 - y);
Core\CSharp\MS\Internal\TextFormatting\ThousandthOfEmRealPoints.cs (3)
61_yArray[i] = pointValues[i].Y; 94_yArray[index] = value.Y; 106if (_xArray[i] == item.X && _yArray[i] == item.Y)
Core\CSharp\System\Windows\Automation\Peers\AutomationPeer.cs (1)
2408private static object GetClickablePoint(AutomationPeer peer) { Point pt = peer.GetClickablePoint(); return new double[] {pt.X, pt.Y}; }
Core\CSharp\System\Windows\Ink\Stroke.cs (5)
393double yVal = bezierPoint.Y > StylusPoint.MaxXY ? 395(bezierPoint.Y < StylusPoint.MinXY ? StylusPoint.MinXY : bezierPoint.Y); 971tempEnd.Y = endPoint.Y; 976tempBegin.Y = begPoint.Y;
Core\CSharp\System\Windows\Ink\Stroke2.cs (4)
736double newWidth = Math.Sqrt(w.X * w.X + w.Y * w.Y); 737double newHeight = Math.Sqrt(h.X * h.X + h.Y * h.Y);
Core\CSharp\System\Windows\Input\ManipulationInertiaStartingEventArgs.cs (1)
251processor.InitialOriginY = (float)ManipulationOrigin.Y;
Core\CSharp\System\Windows\Input\ManipulationLogic.cs (3)
258new Point(e.ManipulationOrigin.X, e.ManipulationOrigin.Y), 549Y = (float)center.Y, 605_currentManipulators[id] = new Manipulator2D(id, (float)position.X, (float)position.Y);
Core\CSharp\System\Windows\Input\MouseDevice.cs (6)
989(int) ptClient.Y, 1912return MS.Internal.DoubleUtil.AreClose(A.X, B.X) && MS.Internal.DoubleUtil.AreClose(A.Y, B.Y); 2203hwndHit = UnsafeNativeMethods.WindowFromPoint((int)ptScreen.X, (int)ptScreen.Y); 2275(Math.Abs(newPosition.Y - _lastClick.Y) < doubleClickDeltaY);
Core\CSharp\System\Windows\Interop\HwndMouseInputProvider.cs (3)
337if (currentPosition.Y > 32767) 345currentPosition.Y = ((currentPosition.Y * (nVirtualHeight - 1)) - (nVirtualTop * 65536)) / nVirtualHeight; 1410_latestMovePoint.y = ((int)currentPosition.Y) & 0x0000FFFF; //Ensure that this number will pass through.
Core\CSharp\System\Windows\Interop\HwndPanningFeedback.cs (1)
99_deviceOffsetY = (int)deviceOffset.Y;
Core\CSharp\System\Windows\Interop\HwndSource.cs (9)
1043NativeMethods.RECT rect = new NativeMethods.RECT(0, 0, (int)pt.X, (int)pt.Y); 1070size = new Point(DoubleUtil.DoubleToInt(size.X), DoubleUtil.DoubleToInt(size.Y)); 1074size = new Point(Math.Ceiling(size.X), Math.Ceiling(size.Y)); 1376return new Size(convertedPt.X, convertedPt.Y); 1665Point relevantPt = new Point(pt.X, pt.Y); 1671NativeMethods.RECT rect = new NativeMethods.RECT(0, 0, (int)pt.X, (int)pt.Y); 1684(_sizeToContent == SizeToContent.Height ? double.PositiveInfinity : relevantPt.Y)); 1711if (_sizeToContent == SizeToContent.Width) sz = new Size(rootUIElement.DesiredSize.Width, relevantPt.Y); 1713else sz = new Size(relevantPt.X, relevantPt.Y);
Core\CSharp\System\Windows\Media\Animation\DoubleAnimationUsingPath.cs (6)
198pathValue = CalculateAngleFromTangentVector(pathTangent.X, pathTangent.Y); 206pathValue = pathPoint.Y; 287_accumulatingValue = CalculateAngleFromTangentVector(endTangent.X, endTangent.Y) 288- CalculateAngleFromTangentVector(startTangent.X, startTangent.Y); 296_accumulatingValue = endPoint.Y - startPoint.Y;
Core\CSharp\System\Windows\Media\Animation\KeySpline.cs (2)
289_By = 3 * _controlPoint1.Y; 290_Cy = 3 * _controlPoint2.Y;
Core\CSharp\System\Windows\Media\Animation\KeySplineConverter.cs (4)
127keySpline.ControlPoint1.X, keySpline.ControlPoint1.Y, 128keySpline.ControlPoint2.X, keySpline.ControlPoint2.Y 138keySpline.ControlPoint1.Y, 140keySpline.ControlPoint2.Y,
Core\CSharp\System\Windows\Media\Animation\MatrixAnimationUsingPath.cs (6)
281angle = DoubleAnimationUsingPath.CalculateAngleFromTangentVector(pathTangent.X, pathTangent.Y); 303matrix.Translate(pathPoint.X, pathPoint.Y); 339_accumulatingAngle = DoubleAnimationUsingPath.CalculateAngleFromTangentVector(endTangent.X, endTangent.Y) 340- DoubleAnimationUsingPath.CalculateAngleFromTangentVector(startTangent.X, startTangent.Y); 343_accumulatingOffset.Y = endPoint.Y - startPoint.Y;
Core\CSharp\System\Windows\Media\Animation\PointAnimationUsingPath.cs (2)
241_accumulatingVector.Y = endPoint.Y - startPoint.Y;
Core\CSharp\System\Windows\Media\Effects\BlurEffect.cs (2)
44topLeft.Y = contentBounds.TopLeft.Y - radius; 46bottomRight.Y = contentBounds.BottomRight.Y + radius;
Core\CSharp\System\Windows\Media\Effects\DropShadowEffect.cs (2)
44topLeft.Y = contentBounds.TopLeft.Y - radius; 46bottomRight.Y = contentBounds.BottomRight.Y + radius;
Core\CSharp\System\Windows\Media\Effects\Effect.cs (2)
141worldBounds.Top + unitPoint.Y * worldBounds.Height); 158(worldPoint.Y - worldBounds.Top) / worldBounds.Height);
Core\CSharp\System\Windows\Media\Effects\ShaderEffect.cs (3)
37topLeft.Y = contentBounds.TopLeft.Y - PaddingTop; 39bottomRight.Y = contentBounds.BottomRight.Y + PaddingBottom; 929newVal.g = (float)p.Y;
Core\CSharp\System\Windows\Media\EllipseGeometry.cs (7)
107currentCenter.Y - Math.Abs(currentRadiusY), 186center.Y - Math.Abs(radiusY)-0.5*strokeThickness, 405points[2].Y = points[3].Y = points[4].Y = center.Y + radiusY; 406points[1].Y = points[5].Y = center.Y + mid; 407points[0].Y = points[6].Y = points[12].Y = center.Y; 408points[7].Y = points[11].Y = center.Y - mid; 409points[8].Y = points[9].Y = points[10].Y = center.Y - radiusY;
Core\CSharp\System\Windows\Media\FormattedText.cs (4)
1698rect.Y += lineOrigin.Y; 1807new Point(origin.X + drawingOffset.X, origin.Y + drawingOffset.Y), 1816double blackBoxBottom = origin.Y + currentLine.Height + currentLine.OverhangAfter;
Core\CSharp\System\Windows\Media\GlyphRun.cs (9)
1356double horBaselineOriginY = -glyphOffset.Y; 1517double horBaselineOriginY = -glyphOffset.Y; 1617double originY = -GetGlyphOffset(i).Y; 1624glyphGeometry.Transform = new TranslateTransform(originX + _baselineOrigin.X, originY + _baselineOrigin.Y); 1701_baselineOrigin.Y - Ascent, 1710_baselineOrigin.Y - Ascent, 1918command.Origin.Y = (float)_baselineOrigin.Y; 2017pOffsets[2*i+1] = (float)_glyphOffsets[i].Y; 2026float y = (float)_glyphOffsets[i].Y;
Core\CSharp\System\Windows\Media\GlyphsSerializer.cs (1)
211offset = (int)Math.Round(_offsets[glyph].Y * _milToEm);
Core\CSharp\System\Windows\Media\ParsersCommon.cs (3)
494y += _lastPoint.Y; 5072 * _lastPoint.Y - _secondLastPoint.Y);
Core\CSharp\System\Windows\Media3D\MatrixCamera.cs (2)
122Point4D origin4D = new Point4D(np.X,np.Y,0,1) * cameraToWorld; 185viewportMatrix.TranslatePrepend(new Vector3D(-p.X,viewSize.Height-p.Y,0));
Core\CSharp\System\Windows\Media3D\MeshGeometry3D.cs (3)
148double txy = txPt.Y; 150if (ptMin.Y > txy) 154else if (ptMax.Y < txy)
Core\CSharp\System\Windows\Media3D\OrthographicCamera.cs (2)
183Point3D origin = new Point3D(np.X*(w/2), np.Y*(h/2), -zn); 203viewportMatrix.TranslatePrepend(new Vector3D(-p.X, viewSize.Height-p.Y, 0));
Core\CSharp\System\Windows\Media3D\PerspectiveCamera.cs (2)
142Vector3D rayDirection = new Vector3D(np.X/w, np.Y/h, -1); 210viewportMatrix.TranslatePrepend(new Vector3D(-p.X, viewSize.Height - p.Y, 0));
Core\CSharp\System\Windows\Media3D\RayMeshGeometry3DHitTestResult.cs (1)
132get { return _barycentricCoordinate.Y; }
Core\CSharp\System\Windows\Media3D\Viewport2DVisual3D.cs (5)
177uv.Y * descBounds.Height + descBounds.Top); 230texCoord1.Y * vertexWeight1 + 231texCoord2.Y * vertexWeight2 + 232texCoord3.Y * vertexWeight3); 260(pt.Y - descBounds.Top) / (descBounds.Bottom - descBounds.Top));
Core\CSharp\System\Windows\UIElement.cs (6)
1298bool hasOrigin = (origin.X != 0d || origin.Y != 0d); 1300t.Children.Add(new TranslateTransform(-(finalRect.Width * origin.X), -(finalRect.Height * origin.Y))); 1306finalRect.Height * origin.Y)); 1421&& (!DoubleUtil.IsNaN(v.Y) && !Double.IsPositiveInfinity(v.Y) && !Double.IsNegativeInfinity(v.Y)));
Shared\MS\Internal\PointUtil.cs (1)
410return new NativeMethods.POINT(DoubleUtil.DoubleToInt(point.X), DoubleUtil.DoubleToInt(point.Y));
PresentationFramework (376)
src\Framework\MS\Internal\Annotations\Anchoring\AttachedAnnotation.cs (1)
206if (!Double.IsInfinity(pt.X) && !Double.IsInfinity(pt.Y))
src\Framework\MS\Internal\Annotations\Anchoring\FixedTextSelectionProcessor.cs (4)
229value += fp.Segments[i].Start.X.ToString(NumberFormatInfo.InvariantInfo) + TextSelectionProcessor.Separator[0] + fp.Segments[i].Start.Y.ToString(NumberFormatInfo.InvariantInfo); 238value += fp.Segments[i].End.X.ToString(NumberFormatInfo.InvariantInfo) + TextSelectionProcessor.Separator[0] + fp.Segments[i].End.Y.ToString(NumberFormatInfo.InvariantInfo); 337if (double.IsNaN(start.X) || double.IsNaN(start.Y)) 356if (double.IsNaN(end.X) || double.IsNaN(end.Y))
src\Framework\MS\Internal\AppModel\RootBrowserWindow.cs (3)
480uint heightDeviceUnits = (uint)Math.Round(sizeDeviceUnits.Y); 724UpdateHeight(requestedSizeDeviceUnits.Y); 892size = new Size(ptLogicalUnits.X, ptLogicalUnits.Y);
src\Framework\MS\Internal\Controls\InkCanvasSelectionAdorner.cs (1)
419visibleRect = new Rect(center.X - size / 2, center.Y - size / 2, size, size);
src\Framework\MS\Internal\Controls\StickyNote\StickyNoteAnnotations.cs (5)
1033if (double.IsInfinity(anchor.X) || double.IsInfinity(anchor.Y)) 1038if ((double.IsNaN(anchor.X)) || (double.IsNaN(anchor.Y))) 1053transformations.Children.Add(new TranslateTransform(anchor.X, anchor.Y)); 1592if (!(double.IsNaN(anchor.X)) && !(double.IsNaN(anchor.Y)) && PositionTransform != null) 1594ret = new Rect(anchor.X + PositionTransform.X + _deltaX, anchor.Y + PositionTransform.Y + _deltaY, Width, Height);
src\Framework\MS\Internal\Documents\DocumentGridContextMenu.cs (1)
134contextMenu.VerticalOffset = uiScopeMouseDownPoint.Y;
src\Framework\MS\Internal\Documents\DocumentPageTextView.cs (1)
225offset.Y = GetYOffsetAtNextPage(offset.Y, count, out pagesMoved);
src\Framework\MS\Internal\Documents\DocumentViewerHelper.cs (1)
448cm.VerticalOffset = contextMenuOffset.Y;
src\Framework\MS\Internal\Documents\MultiPageTextView.cs (6)
455else if (DoubleUtil.LessThan(point.Y, 0)) 463else if (DoubleUtil.GreaterThan(point.Y, _viewer.RenderSize.Height)) 1107if (point.Y >= textViewBounds.Top && point.Y <= textViewBounds.Bottom) 1113vert = Math.Min(Math.Abs(point.Y - textViewBounds.Top), Math.Abs(point.Y - textViewBounds.Bottom));
src\Framework\MS\Internal\Documents\TextBoxView.cs (5)
1650if (point.Y < 0) 1654if (point.Y >= _lineHeight * _lineMetrics.Count) 1671if (point.Y < lineY) 1675else if (point.Y >= lineY + _lineHeight) 2012point = new Point(point.X + _scrollData.HorizontalOffset, point.Y + _scrollData.VerticalOffset);
src\Framework\MS\Internal\Documents\TextDocumentView.cs (9)
1954foundHit = snapToText || (point.Y >= columnBox.Top && point.Y <= columnBox.Bottom); 2017if (point.Y < paragraphBox.Top) 2026else if (point.Y > paragraphBox.Bottom) 2034if (point.Y < nextParagraphBox.Top) 2038if (point.Y > paragraphBox.Bottom + gap / 2 && paragraphs[paragraphIndex + 1].HasTextContent) 2064if (point.Y < nextParagraphBox.Top) 2115double distance = Math.Abs(point.X - midPoint.X) + Math.Abs(point.Y - midPoint.Y);
src\Framework\MS\Internal\Documents\TextParagraphView.cs (7)
603lineIndex = Math.Max(Math.Min((int)(point.Y / approximatedLineHeight), lines.Count - 1), 0); 608if (point.Y < lineBox.Y) 622else if (point.Y > lineBox.Y + lineBox.Height) 630if (point.Y < nextLineBox.Y) 634if (point.Y > lineBox.Y + lineBox.Height + gap / 2) 671if (point.Y < lineBox.Y - siblingOverhang / 2) 689if (point.Y > lineBox.Y + lineBox.Height + siblingOverhang / 2)
src\Framework\MS\Internal\Ink\InkCanvasSelection.cs (4)
490InkCanvas.SetTop(updatedElement, newPosition.Y - thickness.Top); // Top wasn't auto 494InkCanvas.SetBottom(updatedElement, ( bottom - ( newPosition.Y - originalPosition.Y ) )); // Bottom wasn't not auto 498InkCanvas.SetTop(updatedElement, newPosition.Y - thickness.Top); // Both Top and Bottom were aut. Modify Left by default.
src\Framework\MS\Internal\Ink\LassoHelper.cs (12)
218if (false == DoubleUtil.AreClose(_lasso[last].Y, point.Y)) 220isHigher = point.Y < _lasso[last].Y; 232if (DoubleUtil.AreClose(lassoPoint.Y, point.Y)) 240if ((0 != i) && DoubleUtil.AreClose(prevLassoPoint.Y, point.Y) 248else if (isHigher != (point.Y < lassoPoint.Y)) 267double x = prevLassoPoint.X + (lassoSegment.X / lassoSegment.Y) * (point.Y - prevLassoPoint.Y);
src\Framework\MS\Internal\Ink\LassoSelectionBehavior.cs (12)
531double maxY = point1.Y > point2.Y ? point1.Y : point2.Y; 532double minY = point1.Y < point2.Y ? point1.Y : point2.Y; 544double y = point1.Y - point2.Y; 566double height = elementPoints.UpperLeft.Y - elementPoints.LowerLeft.Y;
src\Framework\MS\Internal\Ink\PenCursorManager.cs (1)
238int yHotspot = (int)Math.Round(hotspot.Y - drawingBounds.Top);
src\Framework\MS\Internal\Ink\SelectionEditingBehavior.cs (8)
147|| !DoubleUtil.AreClose(curPoint.Y, _previousLocation.Y) ) 231if ( newPoint.Y > _selectionRect.Bottom - MinimumHeightWidthSize ) 242if ( newPoint.Y < _selectionRect.Top + MinimumHeightWidthSize ) 249Rect newRect = CalculateRect(newPoint.X - _previousLocation.X, newPoint.Y - _previousLocation.Y); 259_previousLocation.Y = newPoint.Y; 269_previousLocation.Y = newPoint.Y;
src\Framework\MS\Internal\LayoutDump.cs (7)
230if (point.X != 0 || point.Y != 0) 262if (point.X != 0 || point.Y != 0) 312if (point.X != 0 || point.Y != 0) 387writer.WriteAttributeString("Top", point.Y.ToString("F", CultureInfo.InvariantCulture)); 556if (!DoubleUtil.IsZero(offset.X) || !DoubleUtil.IsZero(offset.Y)) 568if (!DoubleUtil.IsZero(point.X) && !DoubleUtil.IsZero(point.Y)) 920if (point.X != 0 || point.Y != 0)
src\Framework\MS\Internal\PtsHost\CellParaClient.cs (2)
506_rectTable.Y += ptAdjust.Y; 509_rectCell.Y += ptAdjust.Y;
src\Framework\MS\Internal\PtsHost\SectionVisual.cs (2)
80!DoubleUtil.AreClose(rulePositions[index].Y, _rulePositions[index].Y))
src\Framework\MS\Internal\PtsHost\TableParaClient.cs (1)
663int v = TextDpi.ToTextDpi(point.Y);
src\Framework\MS\Internal\Text\Line.cs (1)
130line.Draw(ctx, new Point(lineOffset.X + delta, lineOffset.Y), (_mirror ? InvertAxes.Horizontal : InvertAxes.None));
src\Framework\MS\Internal\Text\TextDpi.cs (1)
79fspoint.v = ToTextDpi(point.Y);
src\Framework\System\Windows\Controls\Border.cs (15)
602if (ptBR.X > ptTL.X && ptBR.Y > ptTL.Y) 688if (rightTop.Y > rightBottom.Y) 704if (leftBottom.Y < leftTop.Y) 715Vector offset = new Vector(rect.TopLeft.X, rect.TopLeft.Y); 735double radiusY = rightTop.Y - rect.TopRight.Y; 747radiusY = rect.BottomRight.Y - rightBottom.Y; 759radiusY = rect.BottomLeft.Y - leftBottom.Y; 771radiusY = leftTop.Y - rect.TopLeft.Y;
src\Framework\System\Windows\Controls\DataGrid.cs (10)
6449if ((pt.Y >= rowBounds.Top) && (pt.Y <= rowBounds.Bottom)) 6571Vector v = new Vector(pt.X - (cellBounds.Width * 0.5), pt.Y - (cellBounds.Height * 0.5)); 6584if ((rowPt.Y >= rowBounds.Top) && (rowPt.Y <= rowBounds.Bottom)) 6592distance = Math.Abs(pt.Y - cellBounds.Top); 6597else if ((rowPt.Y >= rowBounds.Top) && (rowPt.Y <= rowBounds.Bottom)) 6681if (pt.Y < bounds.Top) 6685else if (pt.Y > bounds.Bottom)
src\Framework\System\Windows\Controls\DocumentViewer.cs (4)
1409if (point.Y > gridRect.Y + gridRect.Height) 1411verticalOffset += (point.Y - (gridRect.Y + gridRect.Height)); 1413else if (point.Y < gridRect.Y) 1415verticalOffset -= (gridRect.Y - point.Y);
src\Framework\System\Windows\Controls\GridViewColumnHeader.cs (2)
841return !((pos.X >= 0) && (pos.X <= ActualWidth) && (pos.Y >= 0) && (pos.Y <= ActualHeight));
src\Framework\System\Windows\Controls\GridViewHeaderRowPresenter.cs (2)
1584return DoubleUtil.LessThanOrClose(-floatingHeader.Height * arrange, currentPos.Y) && 1585DoubleUtil.LessThanOrClose(currentPos.Y, floatingHeader.Height * (arrange + 1));
src\Framework\System\Windows\Controls\InkCanvas.cs (3)
1915DoubleUtil.IsNaN(point.Y) || 1917Double.IsInfinity(point.Y) ) 2231InkCanvasSelection.CommitChanges(Rect.Offset(bounds, -bounds.Left + point.X, -bounds.Top + point.Y), false);
src\Framework\System\Windows\Controls\ItemsControl.cs (2)
3309if (mousePosition.Y < bounds.Top) 3314else if (mousePosition.Y >= bounds.Bottom)
src\Framework\System\Windows\Controls\PopupControlService.cs (1)
194if (RaiseContextMenuOpeningEvent(directlyOver, pt.X, pt.Y,e.UserInitiated))
src\Framework\System\Windows\Controls\Primitives\BulletDecorator.cs (1)
377return lr[0].LayoutBox.Height + ancestorOffset.Y * 2d;
src\Framework\System\Windows\Controls\Primitives\ButtonBase.cs (2)
159if ((pos.X >= 0) && (pos.X <= ActualWidth) && (pos.Y >= 0) && (pos.Y <= ActualHeight))
src\Framework\System\Windows\Controls\Primitives\DataGridColumnHeadersPresenter.cs (7)
572_columnHeaderDragCurrentPosition.Y - _columnHeaderDragStartPosition.Y); 701return DoubleUtil.LessThanOrClose(-height * dragFactor, _columnHeaderDragCurrentPosition.Y) && 702DoubleUtil.LessThanOrClose(_columnHeaderDragCurrentPosition.Y, height * (dragFactor + 1)); 713DragStartedEventArgs dragStartedEventArgs = new DragStartedEventArgs(_columnHeaderDragStartPosition.X, _columnHeaderDragStartPosition.Y); 850_columnHeaderDragCurrentPosition.Y - _columnHeaderDragStartPosition.Y,
src\Framework\System\Windows\Controls\Primitives\Popup.cs (6)
2459top = bottom = interestPoints[0].Y; 2464double y = interestPoints[i].Y; 2690&& (p.Y >= monitorInfo.rcWork.top) 2691&& (p.Y <= monitorInfo.rcWork.bottom))) 3073return new NativeMethods.POINT((int)devicePoint.X, (int)devicePoint.Y); 3759return new NativeMethods.POINTSTRUCT((int)screenOrigin.X, (int)screenOrigin.Y);
src\Framework\System\Windows\Controls\Primitives\TextBoxBase.cs (1)
1628rect.Y -= offset.Y;
src\Framework\System\Windows\Controls\Primitives\Thumb.cs (7)
153RaiseEvent(new DragCompletedEventArgs(_previousScreenCoordPosition.X - _originScreenCoordPosition.X, _previousScreenCoordPosition.Y - _originScreenCoordPosition.Y, true)); 239RaiseEvent(new DragStartedEventArgs(_originThumbPoint.X, _originThumbPoint.Y)); 273RaiseEvent(new DragCompletedEventArgs(pt.X - _originScreenCoordPosition.X, pt.Y - _originScreenCoordPosition.Y, false)); 311thumbCoordPosition.Y - _originThumbPoint.Y));
src\Framework\System\Windows\Controls\Primitives\TickBar.cs (25)
466dc.DrawLine(pen, startPoint, new Point(startPoint.X + tickLen, startPoint.Y)); 467dc.DrawLine(pen, new Point(startPoint.X, endPoint.Y), 468new Point(startPoint.X + tickLen, endPoint.Y)); 473yLines.Add(startPoint.Y - 0.5); 475yLines.Add(endPoint.Y - 0.5); 501double y = adjustedTick * logicalToPhysical + startPoint.Y; 517double y = i * logicalToPhysical + startPoint.Y; 533double y0 = (SelectionStart - Minimum) * logicalToPhysical + startPoint.Y; 546y0 = (SelectionEnd - Minimum) * logicalToPhysical + startPoint.Y; 573dc.DrawLine(pen, startPoint, new Point(startPoint.X, startPoint.Y + tickLen)); 574dc.DrawLine(pen, new Point(endPoint.X, startPoint.Y), 575new Point(endPoint.X, startPoint.Y + tickLen)); 580yLines.Add(startPoint.Y); 582yLines.Add(endPoint.Y + tickLen); 583yLines.Add(endPoint.Y + tickLen2); 609new Point(x, startPoint.Y), 610new Point(x, startPoint.Y + tickLen2)); 625new Point(x, startPoint.Y), 626new Point(x, startPoint.Y + tickLen2)); 639Point pt0 = new Point(x0, startPoint.Y); 640Point pt1 = new Point(x0, startPoint.Y + tickLen2); 641Point pt2 = new Point(x0 + Math.Abs(tickLen2) * progression, startPoint.Y + tickLen2); 652pt0 = new Point(x0, startPoint.Y); 653pt1 = new Point(x0, startPoint.Y + tickLen2); 654pt2 = new Point(x0 - Math.Abs(tickLen2) * progression, startPoint.Y + tickLen2);
src\Framework\System\Windows\Controls\Primitives\Track.cs (3)
78val = Value + ValueFromDistance(pt.X - ThumbCenterOffset, pt.Y - (RenderSize.Height * 0.5)); 82val = Value + ValueFromDistance(pt.X - (RenderSize.Width * 0.5), pt.Y - ThumbCenterOffset); 540ThumbCenterOffset = offset.Y + (thumbLength * 0.5);
src\Framework\System\Windows\Controls\ScrollViewer.cs (2)
1723DoubleUtil.LessThan(manipulatorPosition.Y, 0) || 1725DoubleUtil.GreaterThan(manipulatorPosition.Y, viewportHeight))
src\Framework\System\Windows\Controls\SinglePageViewer.cs (2)
885else if (DoubleUtil.LessThan(point.Y, pageRect.Top)) 893else if (DoubleUtil.GreaterThan(point.Y, pageRect.Bottom))
src\Framework\System\Windows\Controls\StickyNote.cs (2)
1161verticalChange = Math.Min(Math.Max(minBoundary.Y, verticalChange), maxBoundary.Y);
src\Framework\System\Windows\Controls\TextBlock.cs (4)
1630double nextLineBottomOffset = GetLine(i + 1).Height + lineMetrics.Height + lineOffset.Y; 1643(DoubleUtil.LessThanOrClose(lineMetrics.Height + lineOffset.Y, contentBottom) || i == 0)) 1765if (point.X < 0 || point.Y < 0) return this; 1779if (lineOffset + lineMetrics.Height > point.Y)
src\Framework\System\Windows\Controls\ToolBarTray.cs (9)
545int hittestBand = GetBandFromOffset(fHorizontal ? pointRelativeToToolBarTray.Y : pointRelativeToToolBarTray.X); 555toolBarPosition = pointRelativeToToolBarTray.Y - pointRelativeToToolBar.Y; 579if (DoubleUtil.LessThan((fHorizontal ? pointRelativeToPreviousToolBar.X : pointRelativeToPreviousToolBar.Y), 0)) 604if (DoubleUtil.LessThan(toolBarsTotalMinimum, pointRelativeToToolBarTray.Y - pointRelativeToToolBar.Y)) 606ShrinkToolBars(band, 0, toolBarIndex - 1, pointRelativeToToolBarTray.Y - pointRelativeToToolBar.Y - toolBarsTotalMinimum); 627if (DoubleUtil.GreaterThanOrClose((fHorizontal ? pointRelativeToNextToolBar.X : pointRelativeToNextToolBar.Y), 0))
src\Framework\System\Windows\Controls\VirtualizingStackPanel.cs (6)
8477rcChild.Y = previousChildOffset.Y; 8491rcChild.Y = previousChildOffset.Y; 8529rcChild.Y = previousChildOffset.Y - distance; 8543rcChild.Y = previousChildOffset.Y + distance; 9467computedViewportOffset = new Vector(viewport.Location.X, viewport.Location.Y); 10321computedViewportOffset = new Vector(viewport.Location.X, viewport.Location.Y);
src\Framework\System\windows\Documents\CaretElement.cs (8)
408if (targetPoint.Y < 0 || targetPoint.Y + targetRect.Height > scrollerHeight) 410if (targetPoint.Y < 0) 413deltaToScroll = Math.Abs(targetPoint.Y); 419deltaToScroll = targetPoint.Y + targetRect.Height - scrollerHeight; 1006double deviceHeight = source.CompositionTarget.TransformToDevice.Transform(new Point(0, _height)).Y; 1115bool win32Return = SafeNativeMethods.SetCaretPos(ConvertToInt32(win32CaretPoint.X), ConvertToInt32(win32CaretPoint.Y)); 1129win32Return = SafeNativeMethods.SetCaretPos(ConvertToInt32(win32CaretPoint.X), ConvertToInt32(win32CaretPoint.Y));
src\Framework\System\Windows\Documents\CompositionAdorner.cs (5)
247Point startPoint = new Point(compositionLine.StartPoint.X + clauseGap, compositionLine.StartPoint.Y - halfLineHeight); 248Point endPoint = new Point(compositionLine.EndPoint.X - clauseGap, compositionLine.EndPoint.Y - halfLineHeight); 274Point pathPoint = new Point(startPoint.X, startPoint.Y - halfLineHeight); 287pathPoint = new Point(pathPoint.X + squiggleGap, pathPoint.Y + halfLineHeight); 292pathPoint = new Point(pathPoint.X + squiggleGap, pathPoint.Y - halfLineHeight);
src\Framework\System\Windows\Documents\FixedPageStructure.cs (3)
167double absVerDistance = Math.Max(0, (pt.Y > lineResult.LayoutBox.Y) ? (pt.Y - lineResult.LayoutBox.Bottom) : (lineResult.LayoutBox.Y - pt.Y));
src\Framework\System\Windows\Documents\FixedSOMLineCollection.cs (5)
66_AddLineToRanges(_verticals, point1.X, point1.Y, point2.Y); 71Debug.Assert(point1.Y == point2.Y); 72_AddLineToRanges(_horizontals, point1.Y, point1.X, point2.X);
src\Framework\System\Windows\Documents\FixedSOMPageConstructor.cs (7)
104if (p.Y < _yMin) 106_yMin = p.Y; 108else if (p.Y > _yMax) 110_yMax = p.Y; 128_yMin = _yMax = startPoint.Y; 862else if (startP.Y == endP.Y)
src\Framework\System\Windows\Documents\FixedTextBuilder.cs (3)
887if (IsSameLine(currentPt.Y - prevPt.Y, box1.Height, box2.Height)) 1322designRect.Offset(run.BaselineOrigin.X, run.BaselineOrigin.Y);
src\Framework\System\Windows\Documents\FixedTextView.cs (12)
84if (point.Y == Double.MaxValue && point.X == Double.MaxValue) 861double verticalDistance = Math.Max(0, (transformedPt.Y > alignmentRect.Y) ? (transformedPt.Y - alignmentRect.Bottom) : (alignmentRect.Y - transformedPt.Y)); 886if (point.Y < this.FixedPage.Height / 2) 942double invSlope = (pt2.X - pt1.X) / (pt2.Y - pt1.Y); 953distance = (pt1.Y > box.Y) ? (pt1.Y - box.Bottom) : (box.Y - pt1.Y); 958xoff = pt1.X + invSlope * (centerY - pt1.Y); 1014designRect.Offset(run.BaselineOrigin.X, run.BaselineOrigin.Y);
src\Framework\System\Windows\Documents\Glyphs.cs (3)
129inkBoundingBox.Y += _glyphRunOrigin.Y; 143context.PushGuidelineY1(_glyphRunOrigin.Y); 168designRect.Offset(_glyphRunOrigin.X, _glyphRunOrigin.Y);
src\Framework\System\Windows\Documents\HighlightVisual.cs (1)
340dc.PushGuidelineY1(gr.BaselineOrigin.Y);
src\Framework\System\Windows\Documents\ImmComposition.cs (6)
790candform.rcArea.top = ConvertToInt32(milPointTopLeft.Y); 791candform.rcArea.bottom = ConvertToInt32(milPointBottomRight.Y); 792candform.ptCurrentPos = new NativeMethods.POINT(ConvertToInt32(milPointCaret.X), ConvertToInt32(milPointCaret.Y)); 915compform.rcArea.top = ConvertToInt32(milPointTopLeft.Y); 916compform.rcArea.bottom = ConvertToInt32(milPointBottomRight.Y); 917compform.ptCurrentPos = new NativeMethods.POINT(ConvertToInt32(milPointCaret.X), ConvertToInt32(milPointCaret.Y));
src\Framework\System\Windows\Documents\RubberbandSelector.cs (16)
150if (pt.Y < 0) 154else if (pt.Y > pageSize.Height) 452boundingRect.Offset(run.BaselineOrigin.X, run.BaselineOrigin.Y); 455baseline = run.BaselineOrigin.Y; 512if (pt1.Y < top) 514if (pt2.Y < top) 520else if (pt1.Y > bottom) 522if (pt2.Y > bottom) 528else if (pt2.Y < top || pt2.Y > bottom) 535double d1 = (top - pt1.Y) / (pt2.Y - pt1.Y); 536double d2 = (bottom - pt1.Y) / (pt2.Y - pt1.Y);
src\Framework\System\windows\Documents\TextEditorContextMenu.cs (5)
224contextMenu.VerticalOffset = uiScopeMouseDownPoint.Y; 349verticalOffset = ClipToBounds(minPoint.Y, verticalOffset, maxPoint.Y); 390verticalOffset = ClipToBounds(minPoint.Y, verticalOffset, maxPoint.Y);
src\Framework\System\windows\Documents\TextEditorDragDrop.cs (6)
128_dragRect = new Rect(mouseDownPoint.X - minimumHorizontalDragDistance, mouseDownPoint.Y - minimumVerticalDragDistance, minimumHorizontalDragDistance * 2, minimumVerticalDragDistance * 2); 231return !_dragRect.Contains(dragPoint.X, dragPoint.Y); 399if (pointScroller.Y < slowAreaHeight) 402if (pointScroller.Y > slowAreaHeight / 2) 413else if (pointScroller.Y > (pageHeight - slowAreaHeight)) 416if (pointScroller.Y < (pageHeight - slowAreaHeight / 2))
src\Framework\System\windows\Documents\TextEditorMouse.cs (5)
531Point targetPoint = new Point(mouseMovePoint.X, mouseMovePoint.Y); 539if (pointScroller.Y < 0 - slowAreaDelta) 545else if (pointScroller.Y > pageHeight + slowAreaDelta) 558targetPoint = new Point(targetPoint.X - slowAreaDelta, targetPoint.Y); 563targetPoint = new Point(targetPoint.X + slowAreaDelta, targetPoint.Y);
src\Framework\System\Windows\Documents\TextRangeEditTables.cs (2)
1616if (point.Y < cellInfo.TableArea.Top || point.Y > cellInfo.TableArea.Bottom)
src\Framework\System\windows\Documents\TextSelection.cs (6)
1994cursorMousePoint.Y >= objectEdgeRect.Y && cursorMousePoint.Y < objectEdgeRect.Y + objectEdgeRect.Height) 2259caretRectangle.Y += caretRectangle.Height - Math.Abs(bottom.Y - top.Y); 2260caretRectangle.Height = Math.Abs(bottom.Y - top.Y);
src\Framework\System\Windows\Documents\TextStore.cs (2)
2526rect.top = (int)(clientPoint.y + milPointTopLeft.Y); 2527rect.bottom = (int)(clientPoint.y + milPointBottomRight.Y);
src\Framework\System\Windows\FrameworkElement.cs (4)
5258bool hasOrigin = (origin.X != 0d || origin.Y != 0d); 5261TranslateTransform backOrigin = new TranslateTransform(-origin.X, -origin.Y); 5271TranslateTransform forwardOrigin = new TranslateTransform(origin.X, origin.Y); 5298return new Point(renderSize.Width * relativeOrigin.X, renderSize.Height * relativeOrigin.Y);
src\Framework\System\Windows\Input\KeyboardNavigation.cs (2)
2624double deltaY = p1.Y - p2.Y;
src\Framework\System\Windows\Interop\HwndHost.cs (2)
1297_desiredSize = new Size(ptLowerRight.X - ptUpperLeft.X, ptLowerRight.Y - ptUpperLeft.Y);
src\Framework\System\Windows\Shapes\Shape.cs (1)
568stretchMatrix.ScaleAt(xScale, yScale, geometryBounds.Location.X, geometryBounds.Location.Y);
src\Framework\System\Windows\Shell\WindowChromeWorker.cs (7)
556_window.Top = adjustedTopLeft.Y; 965_window.Top = _windowPosAtStartOfUserMove.Y; 1452if (mousePosition.Y >= windowPosition.Top && mousePosition.Y < windowPosition.Top + _chromeInfo.ResizeBorderThickness.Top + _chromeInfo.CaptionHeight) 1454onResizeBorder = (mousePosition.Y < (windowPosition.Top + _chromeInfo.ResizeBorderThickness.Top)); 1457else if (mousePosition.Y < windowPosition.Bottom && mousePosition.Y >= windowPosition.Bottom - (int)_chromeInfo.ResizeBorderThickness.Bottom)
src\Framework\System\Windows\Standard\DpiHelper.cs (4)
65return new Size { Width = pt.X, Height = pt.Y }; 72return new Size(pt.X, pt.Y); 80return new Thickness(topLeft.X, topLeft.Y, bottomRight.X, bottomRight.Y);
src\Framework\System\Windows\SystemCommands.cs (1)
124uint cmd = NativeMethods.TrackPopupMenuEx(hmenu, TPM_LEFTBUTTON | TPM_RETURNCMD, (int)physicalScreenLocation.X, (int)physicalScreenLocation.Y, hwnd, IntPtr.Zero);
src\Framework\System\Windows\SystemParameters.cs (1)
6355double captionHeightInDips = Standard.DpiHelper.DevicePixelsToLogical(new Point(0, captionHeight), SystemParameters.DpiX / 96.0, SystemParameters.Dpi / 96.0).Y;
src\Framework\System\Windows\Window.cs (48)
2615param.SetPosition((int)screenTopLeft.X, (int)screenTopLeft.Y); 2766_actualTop = currentLocationLogicalUnits.Y; 2800if (!DoubleUtil.IsNaN(requestedHeight) && (!DoubleUtil.AreClose(sizeDeviceUnits.Height, requestedSizeDeviceUnits.Y))) 2807sizeDeviceUnits.Height = requestedSizeDeviceUnits.Y; 2830if (!DoubleUtil.IsNaN(requestedTop) && (!DoubleUtil.AreClose(yDeviceUnits, requestedLocationDeviceUnits.Y))) 2833yDeviceUnits = requestedLocationDeviceUnits.Y; 2860if (!Double.IsPositiveInfinity(minSizeDeviceUnits.Y) && (sizeDeviceUnits.Height > maxSizeDeviceUnits.Y)) 2863sizeDeviceUnits.Height = maxSizeDeviceUnits.Y; 2872if (sizeDeviceUnits.Height < minSizeDeviceUnits.Y) 2875sizeDeviceUnits.Height = minSizeDeviceUnits.Y; 3000if (CalculateWindowLocation(ref xDeviceUnits, ref yDeviceUnits, new Size(newSizeDeviceUnits.X, newSizeDeviceUnits.Y))) 3122DoubleUtil.DoubleToInt(ptDeviceUnits.Y), 3188UpdateHwndSizeOnWidthHeightChange(newWidth, sizeLogicalUnits.Y); 3571mm.minHeight = Math.Max(this.MinHeight, minSizeLogicalUnits.Y); 3576mm.maxHeight = Math.Min(this.MinHeight, maxSizeLogicalUnits.Y); 3582mm.maxHeight = Math.Min(MaxHeight, maxSizeLogicalUnits.Y); 3586mm.maxHeight = maxSizeLogicalUnits.Y; 3938ownerRectDeviceUnits = new Rect(ownerLocationDeviceUnits.X, ownerLocationDeviceUnits.Y, 3939ownerSizeDeviceUnits.X, ownerSizeDeviceUnits.Y); 4102return new Rect(locationDeviceUnits.X, locationDeviceUnits.Y, sizeDeviceUnits.X, sizeDeviceUnits.Y); 4116return new Rect(locationLogicalUnits.X, locationLogicalUnits.Y, sizeLogicalUnits.X, sizeLogicalUnits.Y); 4825SetValue(FrameworkElement.HeightProperty, ptLogicalUnits.Y); 4897_windowMaxHeightDeviceUnits = Math.Max(_windowMaxHeightDeviceUnits, windowSize.Y); 4991!DoubleUtil.AreClose(_actualTop, ptLogicalUnits.Y)) 4994_actualTop = ptLogicalUnits.Y; 5103mmi.ptMinTrackSize.y = DoubleUtil.DoubleToInt(minSizeDeviceUnits.Y); 5106mmi.ptMaxTrackSize.y = DoubleUtil.DoubleToInt(maxSizeDeviceUnits.Y); 5185(mousePositionWRTResizeGripControl.Y < 0 ) || 5187(mousePositionWRTResizeGripControl.Y > _resizeGripControl.RenderSize.Height)) 6026if (minHeight > logicalSize.Y) 6064if (maxHeight < logicalSize.Y) 6130UpdateHwndSizeOnWidthHeightChange(minWidth, logicalSize.Y); 6167UpdateHwndSizeOnWidthHeightChange(maxWidth, logicalSize.Y); 6214newTop = TransformWorkAreaScreenArea(new Point(0, newTop), TransformType.ScreenAreaToWorkArea).Y; 6216newTop = (LogicalToDeviceUnits(new Point(0, newTop))).Y; 6296retPt = new Point(pt.X + deltaX, pt.Y + deltaY); 6300retPt = new Point(pt.X - deltaX, pt.Y - deltaY); 6531DoubleUtil.DoubleToInt(ptDeviceUnits.Y), 7489if (!double.IsNaN(_prePanningLocation.X) && !double.IsNaN(_prePanningLocation.Y) && (_swh != null)) 7494return new Point(point.X - (_prePanningLocation.X - windowLocation.X), point.Y - (_prePanningLocation.Y - windowLocation.Y)); 8102return new Size(pt.X,pt.Y); 8135return new Size(Math.Max(0.0, pt.X), Math.Max(0.0, pt.Y)); 8480Y = LogicalTopLeft.Y * dpiScaleY
System.Activities.Core.Presentation (72)
System\Activities\Core\Presentation\FlowchartConnectionPointsAdorner.cs (3)
52actualPoint = new Point(connPoint.Location.X - origin.X, connPoint.Location.Y - origin.Y); 67actualPoint = new Point(trueConnectionPoint.Location.X - origin.X, trueConnectionPoint.Location.Y - origin.Y); 95actualPoint = new Point(falseConnectionPoint.Location.X - origin.X, falseConnectionPoint.Location.Y - origin.Y);
System\Activities\Core\Presentation\FlowchartDesigner.Container.cs (13)
323if (pastePoint.X > 0 && pastePoint.Y > 0) 334panelPoint.Y = panelPoint.Y < 0 ? 0 : panelPoint.Y; 407(locationOfShape.Y < point.Y + FreeFormPanel.GridSize && 408locationOfShape.Y > point.Y - FreeFormPanel.GridSize)) 445topLeft.Y = topLeft.Y > viewStatePoint.Y ? viewStatePoint.Y : topLeft.Y; 452OffSetViewState(new Vector(newOrigin.X - topLeft.X, newOrigin.Y - topLeft.Y), modelItemsInMetaData);
System\Activities\Core\Presentation\FlowchartDesigner.Helpers.cs (9)
274pt.Y -= pt.Y % FreeFormPanel.GridSize; 276pt.Y = pt.Y < 0 ? 0 : pt.Y; 300location.Y -= shapeAnchorPoint.Y; 301oldCenter = new Point(location.X + element.DesiredSize.Width / 2, location.Y + element.DesiredSize.Height / 2); 306location.Offset(newCenter.X - oldCenter.X, newCenter.Y - oldCenter.Y); 313if (location.Y < 0) 315double correction = FreeFormPanel.GridSize - ((location.Y * (-1)) % FreeFormPanel.GridSize);
System\Activities\Core\Presentation\FlowchartDesigner.xaml.cs (6)
1487Fx.Assert(newPoint.X.IsNoLessThan(0) && newPoint.Y.IsNoLessThan(0), 1560if (anchorPoint.X < 0 && anchorPoint.Y < 0) 1569anchorPoint.Offset(-relativeLocations[view].X, -relativeLocations[view].Y); 2014newLocation.Y = FreeFormPanel.ZeroIfNegative(newLocation.Y); 2645Double detY = shapeLocation.Y - (lastShape.Y + FreeFormPanel.GridSize);
System\Activities\Core\Presentation\FlowchartResizeGrip.cs (2)
87currentPosition.Offset(this.offset.X, this.offset.Y); 90flowchartDesigner.FlowchartHeight = Math.Min(Math.Max(panel.RequiredHeight, currentPosition.Y), flowchartGrid.MaxHeight);
System\Activities\Core\Presentation\StateContainerEditor.CompositeView.cs (15)
389if (pastePoint.X > 0 && pastePoint.Y > 0) 395pastePoint.Y = pastePoint.Y < 0 ? 0 : pastePoint.Y; 452topLeft.Y = topLeft.Y > location.Y ? location.Y : topLeft.Y; 455OffsetLocationViewStates(new Vector(point.X - topLeft.X, point.Y - topLeft.Y), itemsPasted, GetTransitionModelItems(itemsPasted), false); 516newLocation.Y = newLocation.Y < 0 ? 0 : newLocation.Y; 574(locationOfShape.Y < point.Y + FreeFormPanel.GridSize && 575locationOfShape.Y > point.Y - FreeFormPanel.GridSize))
System\Activities\Core\Presentation\StateContainerEditor.Utilities.cs (9)
138location.Y -= shapeAnchorPoint.Y; 139oldCenter = new Point(location.X + element.DesiredSize.Width / 2, location.Y + element.DesiredSize.Height / 2); 144location.Offset(newCenter.X - oldCenter.X, newCenter.Y - oldCenter.Y); 151if (location.Y < 0) 153double correction = FreeFormPanel.GridSize - ((location.Y * (-1)) % FreeFormPanel.GridSize); 162pt.Y -= pt.Y % FreeFormPanel.GridSize; 164pt.Y = pt.Y < 0 ? 0 : pt.Y;
System\Activities\Core\Presentation\StateContainerEditor.xaml.cs (12)
816return locationPts.All<Point>((p) => { return p.X.IsNoLessThan(0) && p.Y.IsNoLessThan(0); }); 1787Vector offset = new Vector(newLocation.X - oldLocation.X, newLocation.Y - oldLocation.Y); 1896if (anchorPoint.X < 0 && anchorPoint.Y < 0) 1904anchorPoint.Offset(-relativeLocations[view].X, -relativeLocations[view].Y); 1966if (anchorPoint.X > view.DesiredSize.Width || anchorPoint.Y > view.DesiredSize.Height) 2108newLocation.Y = FreeFormPanel.ZeroIfNegative(newLocation.Y); 2265Fx.Assert(newPoint.X.IsNoLessThan(0) && newPoint.Y.IsNoLessThan(0), 2461midPoint = new Point(location.X, location.Y + size.Height / 2); 2464midPoint = new Point(location.X + size.Width, location.Y + size.Height / 2); 2467midPoint = new Point(location.X + size.Width / 2, location.Y); 2470midPoint = new Point(location.X + size.Width / 2, location.Y + size.Height);
System\Activities\Core\Presentation\StateContainerResizeGrip.cs (2)
134currentPosition.Offset(this.offset.X, this.offset.Y); 136stateContainerEditor.StateContainerHeight = Math.Min(Math.Max(panel.RequiredHeight, currentPosition.Y), stateContainerGrid.MaxHeight);
System\Activities\Core\Presentation\StateMachineConnetionPointsAdorner.cs (1)
36actualPoint = new Point(connPoint.Location.X - origin.X, connPoint.Location.Y - origin.Y);
System.Activities.Presentation (240)
System.Activities.Presentation\System\Activities\Presentation\Annotations\AnnotationAdorner.cs (5)
84Fx.Assert(anchorPoint.Y >= canvas.Y && anchorPoint.Y <= canvas.Y + canvas.Height, "Y axis of anchorPoint not within canvas"); 92if (anchorPoint.Y + desiredSize.Height <= canvas.Y + canvas.Height) 98if (anchor == AdornerLocation.None && anchorPoint.Y - desiredSize.Height >= canvas.Y) 105if (anchor == AdornerLocation.None && anchorPoint.X - desiredSize.Width >= canvas.X && anchorPoint.Y - desiredSize.Height >= canvas.Y)
System.Activities.Presentation\System\Activities\Presentation\CutCopyPasteHelper.cs (1)
487if (clickPoint.X > 0 && clickPoint.Y > 0)
System.Activities.Presentation\System\Activities\Presentation\DragDropHelper.cs (6)
753if (location.Y < topLeftPoint.Y) 755topLeftPoint.Y = location.Y; 763locations[viewElement] = Vector.Add(new Vector(-topLeftPoint.X, -topLeftPoint.Y), locations[viewElement]); 858Margin = new Thickness(locations[viewElement].X, locations[viewElement].Y, 0, 0), 932this.offsetY = offset.Y * scaleFactor;
System.Activities.Presentation\System\Activities\Presentation\FreeFormEditing\AutoConnectAdorner.cs (2)
152else if (position.Y < 0 && this.highlightedDirection != AutoConnectDirections.Top) 157else if (position.Y > size.Height && this.highlightedDirection != AutoConnectDirections.Bottom)
System.Activities.Presentation\System\Activities\Presentation\FreeFormEditing\AutoConnectHelper.cs (11)
56Rect rect = new Rect(new Point(location.X - HitRegionOffset, location.Y - HitRegionOffset), new Size(size.Width + (HitRegionOffset * 2), size.Height + (HitRegionOffset * 2))); 91rects.Add(new Rect(new Point(targetLocation.X - HitRegionOffset, targetLocation.Y + ((targetSize.Height - DropTargetWidth) / 2)), new Size(HitRegionOffset, DropTargetWidth))); 92rects.Add(new Rect(new Point(targetLocation.X + targetSize.Width, targetLocation.Y + ((targetSize.Height - DropTargetWidth) / 2)), new Size(HitRegionOffset, DropTargetWidth))); 93rects.Add(new Rect(new Point(targetLocation.X + ((targetSize.Width - DropTargetWidth) / 2), targetLocation.Y - HitRegionOffset), new Size(DropTargetWidth, HitRegionOffset))); 94rects.Add(new Rect(new Point(targetLocation.X + ((targetSize.Width - DropTargetWidth) / 2), targetLocation.Y + targetSize.Height), new Size(DropTargetWidth, HitRegionOffset))); 125dropPoint = new Point(location.X - DropPointOffset - droppedSize.Width, location.Y + ((size.Height - droppedSize.Height) / 2)); 128dropPoint = new Point(location.X + size.Width + DropPointOffset, location.Y + ((size.Height - droppedSize.Height) / 2)); 131dropPoint = new Point(location.X + ((size.Width - droppedSize.Width) / 2), location.Y - DropPointOffset - droppedSize.Height); 134dropPoint = new Point(location.X + ((size.Width - droppedSize.Width) / 2), location.Y + DropPointOffset + size.Height); 141dropPoint = new Point(dropPoint.X < 0 ? 0 : dropPoint.X, dropPoint.Y < 0 ? 0 : dropPoint.Y);
System.Activities.Presentation\System\Activities\Presentation\FreeFormEditing\AutoSplitHelper.cs (25)
25Point srcCenter = new Point(srcLocation.X + (srcSize.Width / 2), srcLocation.Y + (srcSize.Height / 2)); 26Point destCenter = new Point(destLocation.X + (destSize.Width / 2), destLocation.Y + (destSize.Height / 2)); 70double distToSrc = DesignerGeometryHelper.ManhattanDistanceBetweenPoints(mousePosition, new Point(srcLocation.X + (srcSize.Width / 2), srcLocation.Y + (srcSize.Height / 2))); 71double distToDest = DesignerGeometryHelper.ManhattanDistanceBetweenPoints(mousePosition, new Point(destLocation.X + (destSize.Width / 2), destLocation.Y + (destSize.Height / 2))); 94dropLocation.Y = dropLocation.Y < 0 ? 0 : dropLocation.Y; 115else if (mousePosition.Y >= targetLocation.Y && mousePosition.Y <= targetLocation.Y + targetSize.Height) 127if (dropLocation.Y >= targetLocation.Y && dropLocation.Y <= targetLocation.Y + targetSize.Height + ShapeMargin) 129dropLocation.Y = targetLocation.Y + targetSize.Height + ShapeMargin; 131else if (dropLocation.Y + droppedSize.Height + ShapeMargin >= targetLocation.Y && dropLocation.Y <= targetLocation.Y) 133dropLocation.Y = targetLocation.Y - droppedSize.Height - ShapeMargin; 142dropLocation.Y = targetLocation.Y + ((targetSize.Height - droppedSize.Height) / 2); 158double distY = Math.Abs(shapeCenter.Y - mousePosition.Y); 165return shapeCenter.Y < mousePosition.Y ? EdgeLocation.Top : EdgeLocation.Bottom;
System.Activities.Presentation\System\Activities\Presentation\FreeFormEditing\ConnectionPoint.cs (10)
121return new List<Point> { topLeft, new Point(topLeft.X, topLeft.Y + parentHeight) }; 125return new List<Point> { new Point(topLeft.X + parentWidth, topLeft.Y), new Point(topLeft.X + parentWidth, topLeft.Y + parentHeight) }; 127else if (this.Location.Y == topLeft.Y) 129return new List<Point> { topLeft, new Point(topLeft.X + parentWidth, topLeft.Y) }; 131else if (this.Location.Y == topLeft.Y + parentHeight) 133return new List<Point> { new Point(topLeft.X, topLeft.Y + parentHeight), new Point(topLeft.X + parentWidth, topLeft.Y + parentHeight) };
System.Activities.Presentation\System\Activities\Presentation\FreeFormEditing\ConnectionPointConverter.cs (1)
33Point connectionPointLocation = new Point(width * widthFraction + origin.X, height * heightFraction + origin.Y);
System.Activities.Presentation\System\Activities\Presentation\FreeFormEditing\ConnectorEditor.cs (18)
300Point location = (slope < 1) ? new Point(next.Location.X, current.Location.Y) : new Point(current.Location.X, next.Location.Y); 320next.Location = (slope < 1) ? new Point(next.Location.X, previous.Location.Y) : new Point(previous.Location.X, next.Location.Y); 330previous.Location = (slope < 1) ? new Point(previous.Location.X, next.Location.Y) : new Point(next.Location.X, previous.Location.Y); 414editPointOffset *= (previous.Location.Y < this.activeEditPoint.Location.Y) ? 1 : -1; 418Point editPointLocation = (orientation == Orientation.Horizontal) ? new Point(previous.Location.X + editPointOffset, previous.Location.Y) : new Point(previous.Location.X, previous.Location.Y + editPointOffset); 435editPointOffset *= (this.activeEditPoint.Location.Y < next.Location.Y) ? -1 : 1; 439Point editPointLocation = (orientation == Orientation.Horizontal) ? new Point(next.Location.X + editPointOffset, next.Location.Y) : new Point(next.Location.X, next.Location.Y + editPointOffset); 510previous.Location = (orientation == Orientation.Horizontal) ? new Point(previous.Location.X, newPoint.Y) : new Point(newPoint.X, previous.Location.Y); 515next.Location = (orientation == Orientation.Horizontal) ? new Point(next.Location.X, newPoint.Y) : new Point(newPoint.X, next.Location.Y);
System.Activities.Presentation\System\Activities\Presentation\FreeFormEditing\ConnectorLabelMarginConverter.cs (2)
35labelLocation.Y = (int)(labelLocation.Y - labelBorderHeight / 2 + EPS); 36margin.Top = labelLocation.Y;
System.Activities.Presentation\System\Activities\Presentation\FreeFormEditing\ConnectorPointsToArrowMarginConverter.cs (1)
29margin.Top = points[points.Count - 1].Y - offset;
System.Activities.Presentation\System\Activities\Presentation\FreeFormEditing\ConnectorPointsToArrowTransformConverter.cs (2)
47if (destPoint.Y > srcPoint.Y)
System.Activities.Presentation\System\Activities\Presentation\FreeFormEditing\ConnectorPointsToSegmentsConverter.cs (4)
37Vector firstSegmentPointingVector = new Vector(pointCollection[i].X - pointCollection[i - 1].X, pointCollection[i].Y - pointCollection[i - 1].Y); 38Vector secondSegmentPointingVector = new Vector(pointCollection[i + 1].X - pointCollection[i].X, pointCollection[i + 1].Y - pointCollection[i].Y);
System.Activities.Presentation\System\Activities\Presentation\FreeFormEditing\ConnectorRouter.cs (76)
179excludedLines.Add(new Point(connector.Points[i].X, connector.Points[i].Y)); 180excludedLines.Add(new Point(connector.Points[i + 1].X, connector.Points[i + 1].Y)); 197int smallerIndex = (srcEdge[0].X < srcEdge[1].X || srcEdge[0].Y < srcEdge[1].Y) ? 0 : 1; 202int smallerIndex = (destEdge[0].X < destEdge[1].X || destEdge[0].Y < destEdge[1].Y) ? 0 : 1; 238Point intermediatePoint = (slope < 1) ? new Point(destPoint.X, srcPoint.Y) : new Point(srcPoint.X, destPoint.Y); 263points[index1].Y.IsEqualTo(points[index3].Y)) 288if (p.X != int.MinValue && p.X != int.MaxValue && p.Y != int.MinValue && p.Y != int.MaxValue) 303if (!segments[i - 1].X.IsEqualTo(segments[i].X) && !segments[i - 1].Y.IsEqualTo(segments[i].Y)) 412r1 = new Point(Z.X, topCover.A.Y); 416r2 = new Point(rightCover.A.X, Z.Y); 420r3 = new Point(Z.X, bottomCover.A.Y); 424r4 = new Point(leftCover.A.X, Z.Y); 432if (r1.Y > Z.Y) 482if (r3.Y < Z.Y) 563if (((orientation == Orientation.Vertical) ? direction.X : direction.Y).IsEqualTo(0)) 574side = (direction.Y < 0) ? DesignerEdges.Bottom : DesignerEdges.Top; 584escapePoint = new Point(p.X + direction.X * margin.Width, Z.Y); 588escapePoint = new Point(Z.X, p.Y + direction.Y * margin.Height); 959Point k = new Point(a1.X + i * margin.Width * direction.X, a1.Y + i * margin.Height * direction.Y); 1070if (!point1.X.IsEqualTo(point2.X) && !point1.Y.IsEqualTo(point2.Y)) 1107if (!a.X.IsEqualTo(b.X) && !a.Y.IsEqualTo(b.Y)) 1126Point bottom = new Point(p.X, (bottomCover != null) ? bottomCover.A.Y : int.MinValue); 1127Point top = new Point(p.X, (topCover != null) ? topCover.A.Y : int.MaxValue); 1138Point left = new Point((leftCover != null) ? leftCover.A.X : int.MinValue, p.Y); 1139Point right = new Point((rightCover != null) ? rightCover.A.X : int.MaxValue, p.Y); 1148(p.Y.IsNoLessThan(Math.Min(this.point1.Y, this.point2.Y)) && p.Y.IsNoGreaterThan(Math.Max(this.point1.Y, this.point2.Y))); 1181double k = ((this.orientation == Orientation.Horizontal) ? p.X : p.Y); 1182double k1 = ((this.orientation == Orientation.Horizontal) ? this.point1.X : this.point1.Y); 1183double k2 = ((this.orientation == Orientation.Horizontal) ? this.point2.X : this.point2.Y); 1185return new Point((this.orientation == Orientation.Horizontal) ? k : p.X, (this.orientation == Orientation.Horizontal) ? p.Y : k); 1205if (this.point1.Y > this.point2.Y) 1243if (horizontal.A.Y < Math.Min(vertical.A.Y, vertical.B.Y) || horizontal.A.Y > Math.Max(vertical.A.Y, vertical.B.Y)) 1248return new Point(vertical.A.X, horizontal.A.Y); 1253if ((this.orientation == Orientation.Horizontal && !p.Y.IsEqualTo(this.point1.Y)) || (this.orientation == Orientation.Vertical && !p.X.IsEqualTo(this.point1.X))) 1258double k = (this.orientation == Orientation.Horizontal) ? p.X : p.Y; 1259double k1 = (this.orientation == Orientation.Horizontal) ? this.point1.X : this.point1.Y; 1260double k2 = (this.orientation == Orientation.Horizontal) ? this.point2.X : this.point2.Y; 1267Point newPoint = new Point(p.X, p.Y); 1283return (this.orientation == Orientation.Horizontal) ? p.Y.IsEqualTo(this.point1.Y) : p.X.IsEqualTo(this.point1.X); 1391int currentDistance = (int)((side == DesignerEdges.Bottom) ? p.Y - segment.A.Y : segment.A.Y - p.Y); 1427int currentDistance = (int)((side == DesignerEdges.Bottom) ? p.Y - segment.A.Y : segment.A.Y - p.Y); 1448originalDistance = (int)(originalCover.A.Y - escape.Y); 1472newDistance = (int)Math.Abs(newCover.A.Y - escape.Y);
System.Activities.Presentation\System\Activities\Presentation\FreeFormEditing\ConnectorStartDotConverter.cs (2)
29return new Point((point.X - radius), point.Y); 33return new Point((point.X + radius), point.Y);
System.Activities.Presentation\System\Activities\Presentation\FreeFormEditing\DesignerGeometryHelper.cs (12)
17return Math.Abs(begin.X - end.X) + Math.Abs(begin.Y - end.Y); 22return Math.Sqrt(Math.Pow(point2.X - point1.X, 2) + Math.Pow(point2.Y - point1.Y, 2)); 38return new Point(Math.Round((point1.X + point2.X) / 2), Math.Round((point1.Y + point2.Y) / 2)); 50if (start.Y == end.Y) 55return ((end.Y - start.Y) / (end.X - start.X)); 69double length = Math.Abs((points[i].X == points[i + 1].X) ? points[i].Y - points[i + 1].Y : points[i].X - points[i + 1].X);
System.Activities.Presentation\System\Activities\Presentation\FreeFormEditing\FreeFormPanel.cs (7)
254pointCollection.Add(new Point(point.X < 0 ? 0 : point.X, point.Y < 0 ? 0 : point.Y)); 345if (height < (size.Height + pt.Y)) 347height = size.Height + pt.Y; 445if (height < child.DesiredSize.Height + pt.Y) 447height = child.DesiredSize.Height + pt.Y; 461return location.X >= 0 && location.Y >= 0;
System.Activities.Presentation\System\Activities\Presentation\MiniMap\MiniMapControl.xaml.cs (5)
134double top = Math.Max(value - this.mousePosition.Y, 0.0); 171get { return this.mousePosition.Y; } 333this.lookupWindow.Center(pt.X, pt.Y); 382this.lookupWindow.SetPosition(to.X, to.Y); 385to.Y - this.lookupWindow.MousePositionY);
System.Activities.Presentation\System\Activities\Presentation\View\AutoScrollHelper.cs (4)
76if (positionInScrollViewer.Y > (scrollViewerHeight - scrollOnDragThresholdY) 78|| positionInLogicalView.Value.Y < logicalViewHeight - scrollBuffer)) 82else if (positionInScrollViewer.Y < scrollOnDragThresholdY 84|| positionInLogicalView.Value.Y > scrollBuffer))
System.Activities.Presentation\System\Activities\Presentation\View\DesignerView.xaml.cs (3)
629this.viewElementDragShadow.UpdatePosition(clientPoint.X, clientPoint.Y); 1688mousePosition.Y > 0 && mousePosition.Y < scrollViewer.ViewportHeight;
System.Activities.Presentation\System\Activities\Presentation\View\ExtensionSurface.cs (10)
309position.Y = CalculateInBoundsValue(position.Y, window.DesiredSize.Height, this.ActualHeight, this.selectedChild.Value.Y); 328this.canvasOffset.Y = Math.Min(this.canvasOffset.Y, p.Y); 332this.canvasOffset.Y = Math.Abs(this.canvasOffset.Y); 358if (IsGreater(pos.Y, size.Height, this.ActualHeight)) 360size.Height = this.ActualHeight - pos.Y; 379pos.Offset(this.canvasOffset.X, this.canvasOffset.Y); 416offsetMinusY = Math.Min(offsetMinusY, pos.Y); 420offsetPlusY = Math.Max(offsetPlusY, pos.Y + child.DesiredSize.Height);
System.Activities.Presentation\System\Activities\Presentation\View\ExtensionWindow.cs (21)
222offset.Y = targetPosition.Y - windowPosition.Y; 325if (position.X <= BorderOffset && position.Y <= BorderOffset) 330else if (position.X >= this.border.ActualWidth - BorderOffset && position.Y <= BorderOffset) 335else if (position.X <= BorderOffset && position.Y >= this.border.ActualHeight - BorderOffset) 340else if (position.X >= this.border.ActualWidth - BorderOffset && position.Y >= this.border.ActualHeight - BorderOffset) 345else if (position.Y <= (BorderOffset / 2.0)) 350else if (position.Y >= this.border.ActualHeight - (BorderOffset / 2.0)) 371this.bottomRight = new Point(topLeft.X + Width, topLeft.Y + Height); 456double initialHeight = this.bottomRight.Y - topLeft.Y; 482if (bottomRight.Y > absolutePosition.Y) 484if ((double.IsNaN(MinHeight) || double.IsInfinity(MinHeight) || bottomRight.Y - absolutePosition.Y >= MinHeight) && 485(double.IsNaN(MaxHeight) || double.IsInfinity(MaxHeight) || bottomRight.Y - absolutePosition.Y <= MaxHeight)) 487size.Height = this.bottomRight.Y - absolutePosition.Y; 488topLeft.Y = absolutePosition.Y; 496size.Height = Math.Min(Math.Max(MinHeight, current.Y), MaxHeight);
System.Activities.Presentation\System\Activities\Presentation\View\ExtensionWindowHeader.cs (1)
107moveTo.Offset(-offset.X, -offset.Y);
System.Activities.Presentation\System\Activities\Presentation\View\ExtensionWindowResizeGrip.cs (2)
58currentPosition.Offset(this.offset.X, this.offset.Y); 61newSize.Height = Math.Min(Math.Max(this.parent.MinHeight, currentPosition.Y), this.parent.MaxHeight);
System.Activities.Presentation\System\Activities\Presentation\View\RubberBandSelector.cs (5)
127Math.Abs(positionToScreen.Y - this.MouseDownPointToScreen.Y) > SystemParameters.MinimumVerticalDragDistance)) 175return new Point(point.X < -RubberBandThickness ? -RubberBandThickness : point.X, point.Y < -RubberBandThickness ? -RubberBandThickness : point.Y); 274Rect rect = new Rect(location.X, location.Y, view.ActualWidth, view.ActualHeight);
System.Activities.Presentation\System\Activities\Presentation\View\ScrollViewerPanner.cs (1)
120return mousePosition.X < this.scrollViewer.ViewportWidth && mousePosition.Y < this.scrollViewer.ViewportHeight;
System.Activities.Presentation\System\Activities\Presentation\View\SearchToolTipAdorner.cs (2)
21this.scrollViewerToScreenDistance = designerView.ScrollViewer.PointToScreen(new Point(0, 0)).Y;; 56this.AdornedElement.PointToScreen(new Point(0, 0)).Y - this.scrollViewerToScreenDistance;
System.Activities.Presentation\System\Activities\Presentation\WorkflowViewElement.cs (1)
948referencePoint.Offset(relativeLocation.X, relativeLocation.Y);
UIAutomationClient (6)
System\Windows\Automation\AutomationElement.cs (2)
963if (double.IsNaN (((Point) ptClickable).X) || double.IsNaN (((Point) ptClickable).Y)) 1375response = UiaCoreApi.UiaNodeFromPoint(pt.X, pt.Y, cacheRequest);
System\Windows\Automation\ItemContainerPattern.cs (1)
176value = new double[] { pt.X, pt.Y };
System\Windows\Automation\PropertyCondition.cs (1)
181val = new double[] { pt.X, pt.Y };
System\Windows\Automation\TextPattern.cs (2)
233if (screenLocation.X < rect.Left || screenLocation.X >= rect.Right || screenLocation.Y < rect.Top || screenLocation.Y >= rect.Bottom)
UIAutomationClientsideProviders (6)
MS\Internal\AutomationProxies\WindowsEditBoxRange.cs (4)
292Rect rect = new Rect(startPoint.X, startPoint.Y, endPoint.X - startPoint.X, clippingRectangle.Height); 298rect.Offset(mapClientToScreen.X, mapClientToScreen.Y); 735Rect rect = new Rect(startPoint.X, startPoint.Y, endPoint.X - startPoint.X, height); 739rect.Offset(mapClientToScreen.X, mapClientToScreen.Y);
MS\Internal\AutomationProxies\WindowsRichEdit.cs (1)
289ITextRange range = _document.RangeFromPoint((int)screenLocation.X, (int)screenLocation.Y);
MS\Win32\NativeMethods.cs (1)
1273return checked (new Win32Point((int)pt.X, (int)pt.Y));
WindowsBase (15)
Base\System\Windows\Generated\Point.cs (5)
65point1.Y == point2.Y; 98point1.Y.Equals(point2.Y); 148Y.GetHashCode();
Shared\MS\Internal\DoubleUtil.cs (2)
193DoubleUtil.AreClose(point1.Y, point2.Y);
Shared\MS\Internal\MatrixUtil.cs (8)
114rect._y = Math.Min(Math.Min(point0.Y, point1.Y), Math.Min(point2.Y, point3.Y)); 117rect._height = Math.Max(Math.Max(point0.Y, point1.Y), Math.Max(point2.Y, point3.Y)) - rect._y;