138 writes to X
PresentationCore (64)
Core\CSharp\MS\Internal\Ink\Bezier.cs (1)
77p.X *= StrokeCollectionSerializer.HimetricToAvalonMultiplier;
Core\CSharp\MS\Internal\Ink\CuspData.cs (2)
48point.X *= StrokeCollectionSerializer.AvalonToHimetricMultiplier; 68point2.X *= StrokeCollectionSerializer.AvalonToHimetricMultiplier;
Core\CSharp\MS\Internal\Ink\EllipticalNodeOperations.cs (1)
181point.X += _radius;
Core\CSharp\MS\Internal\Ink\Lasso.cs (1)
724intersectionPoint.X = points[i].X + (intersection - i) * (points[i + 1].X - points[i].X);
Core\CSharp\MS\Internal\Media\ParserStreamGeometrycontext.cs (3)
426point2.X = XamlSerializationHelper.ReadDouble(br); 443point2.X = XamlSerializationHelper.ReadDouble(br); 446point3.X = XamlSerializationHelper.ReadDouble(br);
Core\CSharp\MS\Internal\Media3D\GeneralTransform2Dto3Dto2D.cs (2)
1124if (ptRelToCapture.X <= _visualBounds.Left + 1) ptRelToCapture.X -= BUFFER_SIZE; 1126if (ptRelToCapture.X >= _visualBounds.Right - 1) ptRelToCapture.X += BUFFER_SIZE;
Core\CSharp\MS\Internal\TextFormatting\FormattedTextSymbols.cs (2)
284currentOrigin.X -= glyphs.Width; 288currentOrigin.X += glyphs.Width;
Core\CSharp\MS\Internal\TextFormatting\FullTextLine.cs (1)
689origin.X = origin.Y = 0;
Core\CSharp\System\Windows\Input\MouseDevice.cs (2)
1519_positionRelativeToOver.X = 0; 1522_lastPosition.X = rawMouseInputReport.X;
Core\CSharp\System\Windows\Interop\HwndMouseInputProvider.cs (2)
335currentPosition.X -= 65536; 344currentPosition.X = ((currentPosition.X * (nVirtualWidth - 1)) - (nVirtualLeft * 65536)) / nVirtualWidth;
Core\CSharp\System\Windows\Interop\HwndSource.cs (1)
1673relevantPt.X = rect.Width;
Core\CSharp\System\Windows\Media\Effects\BlurEffect.cs (2)
43topLeft.X = contentBounds.TopLeft.X - radius; 45bottomRight.X = contentBounds.BottomRight.X + radius;
Core\CSharp\System\Windows\Media\Effects\DropShadowEffect.cs (4)
43topLeft.X = contentBounds.TopLeft.X - radius; 45bottomRight.X = contentBounds.BottomRight.X + radius; 56bottomRight.X += offsetX; 61topLeft.X += offsetX;
Core\CSharp\System\Windows\Media\Effects\ShaderEffect.cs (2)
36topLeft.X = contentBounds.TopLeft.X - PaddingLeft; 38bottomRight.X = contentBounds.BottomRight.X + PaddingRight;
Core\CSharp\System\Windows\Media\EllipseGeometry.cs (13)
396points[0].X = points[1].X = points[11].X = points[12].X = center.X + radiusX; 397points[2].X = points[10].X = center.X + mid; 398points[3].X = points[9].X = center.X; 399points[4].X = points[8].X = center.X - mid; 400points[5].X = points[6].X = points[7].X = center.X - radiusX;
Core\CSharp\System\Windows\Media\ParsersCommon.cs (2)
594case 'h': _lastPoint.X += ReadNumber(! AllowComma); break; 595case 'H': _lastPoint.X = ReadNumber(! AllowComma); break;
Core\CSharp\System\Windows\Media\RectangleGeometry.cs (21)
508points[1].X = points[0].X = points[15].X = points[14].X = rect.X; 509points[2].X = points[13].X = rect.X + bezierX; 510points[3].X = points[12].X = rect.X + radiusX; 511points[4].X = points[11].X = rect.Right - radiusX; 512points[5].X = points[10].X = rect.Right - bezierX; 513points[6].X = points[7].X = points[8].X = points[9].X = rect.Right; 529points[0].X = points[3].X = points[4].X = rect.X; 530points[1].X = points[2].X = rect.Right;
Core\CSharp\System\Windows\Media3D\MeshGeometry3D.cs (2)
141ptMin.X = txx; 145ptMax.X = txx;
PresentationFramework (34)
src\Framework\MS\Internal\Documents\TextBoxView.cs (1)
2015point.X -= GetTextAlignmentCorrection(this.CalculatedTextAlignment, GetWrappingWidth(this.RenderSize.Width));
src\Framework\MS\Internal\Documents\TextDocumentView.cs (2)
833point.X -= subpageParagraphResult.ContentOffset.X; 1047point.X -= subpageParagraphResult.ContentOffset.X;
src\Framework\MS\Internal\Ink\InkCanvasSelection.cs (2)
454originalPosition.X = left; 458originalPosition.X = right;
src\Framework\MS\Internal\Ink\SelectionEditingBehavior.cs (4)
211newPoint.X = _selectionRect.Right - MinimumHeightWidthSize; 222newPoint.X = _selectionRect.Left + MinimumHeightWidthSize; 258_previousLocation.X = newPoint.X; 264_previousLocation.X = newPoint.X;
src\Framework\MS\Internal\PtsHost\SectionVisual.cs (2)
61rulePositions[(index-1)*2].X = u; 63rulePositions[(index-1)*2+1].X = u;
src\Framework\System\Windows\Controls\Border.cs (4)
683topLeft.X = v; 684topRight.X = v; 699bottomRight.X = v; 700bottomLeft.X = v;
src\Framework\System\Windows\Controls\Primitives\DataGridColumnHeadersPresenter.cs (2)
171point.X -= dropIndicatorWidth * 0.5; 1025headerPos.X = headerStartX;
src\Framework\System\Windows\Controls\Primitives\Thumb.cs (1)
319_originThumbPoint.X = 0;
src\Framework\System\Windows\Controls\Primitives\Track.cs (3)
551offset.X = isDirectionReversed ? increaseButtonLength + thumbLength : 0.0; 558offset.X = isDirectionReversed ? 0.0 : decreaseButtonLength + thumbLength; 565offset.X = isDirectionReversed ? increaseButtonLength : decreaseButtonLength;
src\Framework\System\Windows\Controls\TextBox.cs (2)
1434point.X = -HorizontalOffset; 1463point.X = 0;
src\Framework\System\Windows\Documents\FixedTextView.cs (2)
230offset.X += image.ActualWidth; 242offset.X += bounds.Width;
src\Framework\System\Windows\Documents\Glyphs.cs (3)
218_glyphRunOrigin.X = OriginX; 220_glyphRunOrigin.X = leftToRight ? 0 : alignmentRect.Width; 389glyphRunProperties.glyphOffsets[i].X = parsedGlyphData.offsetX * fromEmToMil;
src\Framework\System\Windows\Documents\RubberbandSelector.cs (2)
143pt.X = 0; 147pt.X = pageSize.Width;
src\Framework\System\Windows\Input\KeyboardNavigation.cs (2)
2675startPoint.X = _verticalBaseline; 2682startPoint.X = _verticalBaseline;
src\Framework\System\Windows\Window.cs (2)
8099pt.X = rect.right - rect.left; 8479X = LogicalTopLeft.X * dpiScaleX,
System.Activities.Core.Presentation (20)
System\Activities\Core\Presentation\FlowchartConnectionPointsAdorner.cs (2)
47origin.X += margin.Left; 72actualPoint.X -= trueMarkerFormattedText.WidthIncludingTrailingWhitespace;
System\Activities\Core\Presentation\FlowchartDesigner.Container.cs (2)
333panelPoint.X = panelPoint.X < 0 ? 0 : panelPoint.X; 444topLeft.X = topLeft.X > viewStatePoint.X ? viewStatePoint.X : topLeft.X;
System\Activities\Core\Presentation\FlowchartDesigner.Helpers.cs (5)
273pt.X -= pt.X % FreeFormPanel.GridSize; 275pt.X = pt.X < 0 ? 0 : pt.X; 292location.X -= element.DesiredSize.Width / 2; 299location.X -= shapeAnchorPoint.X; 311location.X = (correction == FreeFormPanel.GridSize) ? 0 : correction;
System\Activities\Core\Presentation\FlowchartDesigner.xaml.cs (1)
2013newLocation.X = FreeFormPanel.ZeroIfNegative(newLocation.X);
System\Activities\Core\Presentation\StateContainerEditor.CompositeView.cs (3)
394pastePoint.X = pastePoint.X < 0 ? 0 : pastePoint.X; 451topLeft.X = topLeft.X > location.X ? location.X : topLeft.X; 515newLocation.X = newLocation.X < 0 ? 0 : newLocation.X;
System\Activities\Core\Presentation\StateContainerEditor.Utilities.cs (5)
132location.X -= InitialNodeWidth / 2; 137location.X -= shapeAnchorPoint.X; 149location.X = (correction == FreeFormPanel.GridSize) ? 0 : correction; 161pt.X -= pt.X % FreeFormPanel.GridSize; 163pt.X = pt.X < 0 ? 0 : pt.X;
System\Activities\Core\Presentation\StateContainerEditor.xaml.cs (1)
2107newLocation.X = FreeFormPanel.ZeroIfNegative(newLocation.X);
System\Activities\Core\Presentation\StateMachineConnetionPointsAdorner.cs (1)
31origin.X += margin.Left;
System.Activities.Presentation (19)
System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\FromExpression\Framework\ValueEditors\RenderUtils.cs (2)
26spineLeftTop.X += halfThickness; 28spineRightBottom.X -= halfThickness;
System.Activities.Presentation\System\Activities\Presentation\DragDropHelper.cs (1)
750topLeftPoint.X = location.X;
System.Activities.Presentation\System\Activities\Presentation\FreeFormEditing\AutoSplitHelper.cs (4)
93dropLocation.X = dropLocation.X < 0 ? 0 : dropLocation.X; 126dropLocation.X = targetLocation.X + ((targetSize.Width - droppedSize.Width) / 2); 145dropLocation.X = targetLocation.X + targetSize.Width + ShapeMargin; 149dropLocation.X = targetLocation.X - droppedSize.Width - ShapeMargin;
System.Activities.Presentation\System\Activities\Presentation\FreeFormEditing\ConnectionPointConverter.cs (1)
29origin.X += margin.Left;
System.Activities.Presentation\System\Activities\Presentation\FreeFormEditing\ConnectorLabelMarginConverter.cs (1)
34labelLocation.X = (int)(labelLocation.X - labelBorderWidth / 2 + EPS);
System.Activities.Presentation\System\Activities\Presentation\FreeFormEditing\ConnectorRouter.cs (3)
456r2.X -= margin.Width; 506r4.X += margin.Width; 1270newPoint.X = int.MaxValue;
System.Activities.Presentation\System\Activities\Presentation\MiniMap\MiniMapControl.xaml.cs (1)
211this.mousePosition.X = 0;
System.Activities.Presentation\System\Activities\Presentation\View\ExtensionSurface.cs (4)
308position.X = CalculateInBoundsValue(position.X, window.DesiredSize.Width, this.ActualWidth, this.selectedChild.Value.X); 318this.canvasOffset.X = 0; 327this.canvasOffset.X = Math.Min(this.canvasOffset.X, p.X); 331this.canvasOffset.X = Math.Abs(this.canvasOffset.X);
System.Activities.Presentation\System\Activities\Presentation\View\ExtensionWindow.cs (2)
221offset.X = targetPosition.X - windowPosition.X; 469topLeft.X = absolutePosition.X;
UIAutomationClientsideProviders (1)
MS\Internal\AutomationProxies\WindowsEditBox.cs (1)
852pt.X += size.cx;
1066 references to X
PresentationCore (273)
Core\CSharp\MS\Internal\AnimatedTypeHelpers.cs (11)
119from.Location.X + ((to.Location.X - from.Location.X) * progress), 195value1.X + value2.X, 297value1.X - value2.X, 545value.X * factor, 567value.Location.X * 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 (19)
150if (DoubleUtil.AreClose(lassoPoint.X, point.X)) 156DoubleUtil.GreaterThanOrClose(point.X, Math.Min(prevLassoPoint.X, lassoPoint.X)) && 157DoubleUtil.LessThanOrClose(point.X, Math.Max(prevLassoPoint.X, lassoPoint.X))) 166if (DoubleUtil.GreaterThanOrClose(point.X, Math.Max(prevLassoPoint.X, lassoPoint.X))) 171else if (DoubleUtil.GreaterThanOrClose(point.X, Math.Min(prevLassoPoint.X, lassoPoint.X))) 177double x = prevLassoPoint.X + (lassoSegment.X / lassoSegment.Y) * (point.Y - prevLassoPoint.Y); 178if (DoubleUtil.GreaterThanOrClose(point.X, x)) 724intersectionPoint.X = points[i].X + (intersection - i) * (points[i + 1].X - points[i].X);
Core\CSharp\MS\Internal\Ink\StrokeNode.cs (26)
767double b1 = line1Start.X - line1End.X; 768double c1 = (line1End.X * line1Start.Y) - (line1Start.X * line1End.Y); 770double b2 = line2Start.X - line2End.X; 771double c2 = (line2End.X * line2Start.Y) - (line2Start.X * line2End.Y); 781if (line1Start.X < line1End.X) 783line1XMin = Math.Floor(line1Start.X); 784line1XMax = Math.Ceiling(line1End.X); 788line1XMin = Math.Floor(line1End.X); 789line1XMax = Math.Ceiling(line1Start.X); 792if (line2Start.X < line2End.X) 794line2XMin = Math.Floor(line2Start.X); 795line2XMax = Math.Ceiling(line2End.X); 799line2XMin = Math.Floor(line2End.X); 800line2XMax = Math.Ceiling(line2Start.X); 837if ((long)line1End.X == (long)line2Start.X && 840return new Point(line1End.X, line1End.Y); 1072double xDiff = (_thisNode.Position.X - _lastNode.Position.X) * findex; 1078return new Point( _lastNode.Position.X + xDiff,
Core\CSharp\MS\Internal\Ink\StrokeRenderer.cs (5)
967Size ellipseSize = new Size(sizePoint.X / 2/*width*/, sizePoint.Y / 2/*height*/); 1009double dx = (currentPosition.X * 1000) - (previousPosition.X * 1000); 1048double dx = (currentPosition.X * 1000) - (previousPosition.X * 1000);
Core\CSharp\MS\Internal\Media\ParserStreamGeometrycontext.cs (6)
151XamlSerializationHelper.WriteDouble(_bw, point2.X); 165XamlSerializationHelper.WriteDouble(_bw, point2.X); 168XamlSerializationHelper.WriteDouble(_bw, point3.X); 653isScaledIntegerX = XamlSerializationHelper.CanConvertToInteger(point.X, ref intValueX); 658SerializeDouble(point.X, isScaledIntegerX, intValueX); 683XamlSerializationHelper.WriteDouble(_bw, points[i].X);
Core\CSharp\MS\Internal\Media\XamlSerializationHelper.cs (1)
290WriteDouble( writer, curPoint.X);
Core\CSharp\MS\Internal\Media3D\GeneralTransform2Dto3Dto2D.cs (48)
61_p1Transformed = new Point(projPoint1.X, projPoint1.Y); 62_p2Transformed = new Point(projPoint2.X, projPoint2.Y); 515if (!((Math.Max(visEdgeStart.X, visEdgeEnd.X) < Math.Min(uv1.X, uv2.X)) || 516(Math.Min(visEdgeStart.X, visEdgeEnd.X) > Math.Max(uv1.X, uv2.X)) || 619if (Math.Abs(visUV1.X - visUV2.X) > Math.Abs(visUV1.Y - visUV2.Y)) 621if (visUV1.X <= visUV2.X) 632if (triUV1.X <= triUV2.X) 651if (minVisUV.X < minTriUV.X) 659p1 = minTri3D + (minVisUV.X - minTriUV.X) / (maxTriUV.X - minTriUV.X) * (maxTri3D - minTri3D); 663if (maxVisUV.X > maxTriUV.X) 671p2 = minTri3D + (maxVisUV.X - minTriUV.X) / (maxTriUV.X - minTriUV.X) * (maxTri3D - minTri3D); 753double dx = p2.X - p1.X; 760coinc = (o.X == p1.X); 765return (p2.X - o.X) / d.X; 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; 933if (!((Math.Max(visEdgeStart.X, visEdgeEnd.X) < Math.Min(uv1.X, uv2.X)) || 934(Math.Min(visEdgeStart.X, visEdgeEnd.X) > Math.Max(uv1.X, uv2.X)) || 1124if (ptRelToCapture.X <= _visualBounds.Left + 1) ptRelToCapture.X -= BUFFER_SIZE; 1126if (ptRelToCapture.X >= _visualBounds.Right - 1) ptRelToCapture.X += BUFFER_SIZE;
Core\CSharp\MS\Internal\Media3D\M3DUtil.cs (8)
31double v = barycentric.X; 373((2*point.X)/size.Width) - 1, 598double A = triUVVertices[0].X - triUVVertices[2].X; 599double B = triUVVertices[1].X - triUVVertices[2].X; 600double C = triUVVertices[2].X - p.X;
Core\CSharp\MS\Internal\TextFormatting\FormattedTextSymbols.cs (1)
275boundingBox.X += glyphRun.BaselineOrigin.X;
Core\CSharp\MS\Internal\TextFormatting\FullTextLine.cs (2)
2517LSPOINT pt = new LSPOINT((int)ptQuery.X, (int)ptQuery.Y); 2699boundingBox.X -= origin.X;
Core\CSharp\MS\Internal\TextFormatting\LineServicesCallbacks.cs (10)
1428drawingLineOrigin.X, // reference point of scaling 1477drawingLineOrigin.X, 1504new Point(drawingLineOrigin.X + lineLength, drawingLineOrigin.Y) 1520lineOrigin.X, 2657currentLine.Formatter.IdealToReal(currentLine.LSLineUToParagraphU(lsrunOrigin.x), currentLine.PixelsPerDip)+ Draw.VectorToLineOrigin.X, 2671objectBounds.X += baselineOrigin.X; 2682objectBounds.Location.X, 2690objectBounds.Location.X + objectBounds.Size.Width, 2714baselineOrigin.X, 3066int idealRoundedBaselineOriginX = RealToIdeal(baselineOrigin.X);
Core\CSharp\MS\Internal\TextFormatting\LineServicesRun.cs (15)
270inkBoundingBox.X += glyphRun.BaselineOrigin.X; 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); 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); 411nominalX = line.ParagraphWidth - u + TextFormatterImp.RealToIdeal(-vectorToOrigin.X + origin.X); 415nominalX = u + TextFormatterImp.RealToIdeal(vectorToOrigin.X + origin.X); 447if(DoubleUtil.AreClose(rect.TopLeft.X, rect.BottomRight.X))
Core\CSharp\MS\Internal\TextFormatting\SimpleTextLine.cs (4)
618_settings.Formatter.IdealToReal(idealXRelativeToOrigin, PixelsPerDip) + origin.X, 641boundingBox.X -= origin.X; 1837inkBoundingBox.X += glyphRun.BaselineOrigin.X; 1878lineOrigin.X,
Core\CSharp\MS\Internal\TextFormatting\ThousandthOfEmRealPoints.cs (3)
60_xArray[i] = pointValues[i].X; 93_xArray[index] = value.X; 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)
389double xVal = bezierPoint.X > StylusPoint.MaxXY ? 391(bezierPoint.X < StylusPoint.MinXY ? StylusPoint.MinXY : bezierPoint.X); 970tempEnd.X = endPoint.X; 975tempBegin.X = begPoint.X;
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)
250processor.InitialOriginX = (float)ManipulationOrigin.X;
Core\CSharp\System\Windows\Input\ManipulationLogic.cs (3)
258new Point(e.ManipulationOrigin.X, e.ManipulationOrigin.Y), 548X = (float)center.X, 605_currentManipulators[id] = new Manipulator2D(id, (float)position.X, (float)position.Y);
Core\CSharp\System\Windows\Input\MouseDevice.cs (6)
988(int) ptClient.X, 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); 2274return (Math.Abs(newPosition.X - _lastClick.X) < doubleClickDeltaX) &&
Core\CSharp\System\Windows\Interop\HwndMouseInputProvider.cs (3)
334if (currentPosition.X > 32767) 344currentPosition.X = ((currentPosition.X * (nVirtualWidth - 1)) - (nVirtualLeft * 65536)) / nVirtualWidth; 1409_latestMovePoint.x = ((int)currentPosition.X) & 0x0000FFFF; //Ensure that this number will pass through.
Core\CSharp\System\Windows\Interop\HwndPanningFeedback.cs (1)
98_deviceOffsetX = (int)deviceOffset.X;
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); 1683(_sizeToContent == SizeToContent.Width ? double.PositiveInfinity : relevantPt.X), 1712else if (_sizeToContent == SizeToContent.Height) sz = new Size(relevantPt.X, rootUIElement.DesiredSize.Height); 1713else sz = new Size(relevantPt.X, relevantPt.Y);
Core\CSharp\System\Windows\Media\Animation\DoubleAnimationUsingPath.cs (6)
198pathValue = CalculateAngleFromTangentVector(pathTangent.X, pathTangent.Y); 202pathValue = pathPoint.X; 287_accumulatingValue = CalculateAngleFromTangentVector(endTangent.X, endTangent.Y) 288- CalculateAngleFromTangentVector(startTangent.X, startTangent.Y); 292_accumulatingValue = endPoint.X - startPoint.X;
Core\CSharp\System\Windows\Media\Animation\KeySpline.cs (4)
258return point.X >= 0.0 259&& point.X <= 1.0; 283_Bx = 3 * _controlPoint1.X; 284_Cx = 3 * _controlPoint2.X;
Core\CSharp\System\Windows\Media\Animation\KeySplineConverter.cs (4)
127keySpline.ControlPoint1.X, keySpline.ControlPoint1.Y, 128keySpline.ControlPoint2.X, keySpline.ControlPoint2.Y 137keySpline.ControlPoint1.X, 139keySpline.ControlPoint2.X,
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); 342_accumulatingOffset.X = endPoint.X - startPoint.X;
Core\CSharp\System\Windows\Media\Animation\PointAnimationUsingPath.cs (2)
240_accumulatingVector.X = endPoint.X - startPoint.X;
Core\CSharp\System\Windows\Media\Effects\BlurEffect.cs (2)
43topLeft.X = contentBounds.TopLeft.X - radius; 45bottomRight.X = contentBounds.BottomRight.X + radius;
Core\CSharp\System\Windows\Media\Effects\DropShadowEffect.cs (2)
43topLeft.X = contentBounds.TopLeft.X - radius; 45bottomRight.X = contentBounds.BottomRight.X + radius;
Core\CSharp\System\Windows\Media\Effects\Effect.cs (2)
140worldBounds.Left + unitPoint.X * worldBounds.Width, 157(worldPoint.X - worldBounds.Left) / worldBounds.Width,
Core\CSharp\System\Windows\Media\Effects\ShaderEffect.cs (3)
36topLeft.X = contentBounds.TopLeft.X - PaddingLeft; 38bottomRight.X = contentBounds.BottomRight.X + PaddingRight; 928newVal.r = (float)p.X;
Core\CSharp\System\Windows\Media\EllipseGeometry.cs (7)
106currentCenter.X - Math.Abs(currentRadiusX), 185center.X - Math.Abs(radiusX)-0.5*strokeThickness, 396points[0].X = points[1].X = points[11].X = points[12].X = center.X + radiusX; 397points[2].X = points[10].X = center.X + mid; 398points[3].X = points[9].X = center.X; 399points[4].X = points[8].X = center.X - mid; 400points[5].X = points[6].X = points[7].X = center.X - radiusX;
Core\CSharp\System\Windows\Media\FormattedText.cs (5)
1697rect.X += lineOrigin.X; 1807new Point(origin.X + drawingOffset.X, origin.Y + drawingOffset.Y), 1814double blackBoxLeft = origin.X + currentLine.Start + currentLine.OverhangLeading; 1815double blackBoxRight = origin.X + currentLine.Start + currentLine.Width - currentLine.OverhangTrailing;
Core\CSharp\System\Windows\Media\GlyphRun.cs (11)
1344originX = accAdvance + glyphOffset.X; 1351originX = -accAdvance - (emGlyphMetrics.AdvanceWidth + glyphOffset.X); 1513double originX = accAdvance + glyphOffset.X; 1602originX += GetGlyphOffset(i).X; 1613originX -= (nominalAdvance + GetGlyphOffset(i).X); 1624glyphGeometry.Transform = new TranslateTransform(originX + _baselineOrigin.X, originY + _baselineOrigin.Y); 1700_baselineOrigin.X, 1709_baselineOrigin.X - advanceWidth, 1917command.Origin.X = (float)_baselineOrigin.X; 2016pOffsets[2*i] = (float)_glyphOffsets[i].X; 2025float x = (float)_glyphOffsets[i].X;
Core\CSharp\System\Windows\Media\GlyphsSerializer.cs (1)
203int offset = (int)Math.Round(_offsets[glyph].X * _milToEm);
Core\CSharp\System\Windows\Media\ParsersCommon.cs (3)
493x += _lastPoint.X; 506return new Point(2 * _lastPoint.X - _secondLastPoint.X,
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)
137double txx = txPt.X; 139if (ptMin.X > txx) 143else if (ptMax.X < txx)
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)
126get { return _barycentricCoordinate.X; }
Core\CSharp\System\Windows\Media3D\Viewport2DVisual3D.cs (5)
176return new Point(uv.X * descBounds.Width + descBounds.Left, 227outputPoint = new Point(texCoord1.X * vertexWeight1 + 228texCoord2.X * vertexWeight2 + 229texCoord3.X * vertexWeight3, 259return new Point((pt.X - descBounds.Left) / (descBounds.Right - descBounds.Left),
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))); 1305t.Children.Add(new TranslateTransform(finalRect.Width * origin.X, 1420return ( (!DoubleUtil.IsNaN(v.X) && !Double.IsPositiveInfinity(v.X) && !Double.IsNegativeInfinity(v.X))
Shared\MS\Internal\PointUtil.cs (1)
410return new NativeMethods.POINT(DoubleUtil.DoubleToInt(point.X), DoubleUtil.DoubleToInt(point.Y));
PresentationFramework (435)
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 (6)
227if (!double.IsNaN(fp.Segments[i].Start.X)) 229value += fp.Segments[i].Start.X.ToString(NumberFormatInfo.InvariantInfo) + TextSelectionProcessor.Separator[0] + fp.Segments[i].Start.Y.ToString(NumberFormatInfo.InvariantInfo); 236if (!double.IsNaN(fp.Segments[i].End.X)) 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)
506uint widthDeviceUnits = (uint)Math.Round(sizeDeviceUnits.X); 715UpdateWidth(requestedSizeDeviceUnits.X); 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)
133contextMenu.HorizontalOffset = uiScopeMouseDownPoint.X;
src\Framework\MS\Internal\Documents\DocumentPageTextView.cs (2)
191suggestedX = offset.X; 194newSuggestedX = offset.X;
src\Framework\MS\Internal\Documents\DocumentViewerHelper.cs (1)
447cm.HorizontalOffset = contextMenuOffset.X;
src\Framework\MS\Internal\Documents\MultiPageTextView.cs (10)
439if (DoubleUtil.LessThan(point.X, 0)) 447else if (DoubleUtil.GreaterThan(point.X, _viewer.RenderSize.Width)) 886suggestedX = offset.X; 894newSuggestedX = offset.X; 951newSuggestedX = offset.X; 1099if (point.X >= textViewBounds.Left && point.X <= textViewBounds.Right) 1105horz = Math.Min(Math.Abs(point.X - textViewBounds.Left), Math.Abs(point.X - textViewBounds.Right)); 1384suggestedX = point.X;
src\Framework\MS\Internal\Documents\TextBoxView.cs (4)
619position = GetTextPositionFromDistance(lineIndex, point.X); 1682(point.X < 0 || point.X >= record.Width)) 2012point = new Point(point.X + _scrollData.HorizontalOffset, point.Y + _scrollData.VerticalOffset);
src\Framework\MS\Internal\Documents\TextDocumentView.cs (15)
254suggestedX = newSuggestedX = point.X; 266newSuggestedX = point.X; 773if (point.X <= paragraphBox.Width) 807if (point.X > rowResult.LayoutBox.Right) 879if (DoubleUtil.LessThanOrClose(point.X, paragraphBox.X + paragraphBox.Width / 2)) 893if (point.X <= paragraphBox.Width) 1886if (point.X < columnBox.Left) 1895else if (point.X > columnBox.Right) 1903if (point.X < nextColumnBox.Left) 1907if (point.X > columnBox.Right + gap / 2 && columns[columnIndex + 1].HasTextContent) 1933if (point.X < nextColumnBox.Left) 2085foundHit = snapToText || (point.X >= paragraphBox.Left && point.X <= paragraphBox.Right); 2115double distance = Math.Abs(point.X - midPoint.X) + Math.Abs(point.Y - midPoint.Y);
src\Framework\MS\Internal\Documents\TextParagraphView.cs (9)
369orientedPosition = lines[lineIndex].GetTextPositionFromDistance(point.X); 737if (point.X < lineBox.X && lineIndex > 0) 743if (point.X <= siblingLineBox.X + siblingLineBox.Width) 750if (point.X < lineBox.X - siblingGap / 2) 766else if ((point.X > lineBox.X + lineBox.Width) && (lineIndex < lines.Count - 1)) 772if (point.X >= siblingLineBox.X) 779if (point.X > siblingLineBox.X - siblingGap / 2) 797foundHit = snapToText || (point.X >= lineBox.X && point.X <= lineBox.X + lineBox.Width);
src\Framework\MS\Internal\Ink\InkCanvasSelection.cs (4)
474InkCanvas.SetLeft(updatedElement, newPosition.X - thickness.Left); // Left wasn't auto 481InkCanvas.SetRight(updatedElement, ( right - ( newPosition.X - originalPosition.X ) )); // Right wasn't not auto 485InkCanvas.SetLeft(updatedElement, newPosition.X - thickness.Left); // Both Left and Right were aut. Modify Left by default.
src\Framework\MS\Internal\Ink\LassoHelper.cs (20)
234if (DoubleUtil.AreClose(lassoPoint.X, point.X)) 241&& DoubleUtil.GreaterThanOrClose(point.X, Math.Min(prevLassoPoint.X, lassoPoint.X)) 242&& DoubleUtil.LessThanOrClose(point.X, Math.Max(prevLassoPoint.X, lassoPoint.X))) 251if (DoubleUtil.GreaterThanOrClose(point.X, Math.Max(prevLassoPoint.X, lassoPoint.X))) 257if ((0 == i) && DoubleUtil.AreClose(point.X, Math.Max(prevLassoPoint.X, lassoPoint.X))) 262else if (DoubleUtil.GreaterThanOrClose(point.X, Math.Min(prevLassoPoint.X, lassoPoint.X))) 267double x = prevLassoPoint.X + (lassoSegment.X / lassoSegment.Y) * (point.Y - prevLassoPoint.Y); 269if (DoubleUtil.GreaterThanOrClose(point.X, x)) 272if ((0 == i) && DoubleUtil.AreClose(point.X, x))
src\Framework\MS\Internal\Ink\LassoSelectionBehavior.cs (12)
529double maxX = point1.X > point2.X ? point1.X : point2.X; 530double minX = point1.X < point2.X ? point1.X : point2.X; 543double x = point1.X - point2.X; 560double width = elementPoints.UpperLeft.X - elementPoints.UpperRight.X;
src\Framework\MS\Internal\Ink\PenCursorManager.cs (1)
237int xHotspot = (int)Math.Round(hotspot.X - drawingBounds.Left);
src\Framework\MS\Internal\Ink\SelectionEditingBehavior.cs (8)
146if ( !DoubleUtil.AreClose(curPoint.X, _previousLocation.X) 209if ( newPoint.X > _selectionRect.Right - MinimumHeightWidthSize ) 220if ( newPoint.X < _selectionRect.Left + MinimumHeightWidthSize ) 249Rect newRect = CalculateRect(newPoint.X - _previousLocation.X, newPoint.Y - _previousLocation.Y); 258_previousLocation.X = newPoint.X; 264_previousLocation.X = newPoint.X;
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) 386writer.WriteAttributeString("Left", point.X.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)
505_rectTable.X += ptAdjust.X; 508_rectCell.X += ptAdjust.X;
src\Framework\MS\Internal\PtsHost\SectionVisual.cs (2)
79if (!DoubleUtil.AreClose(rulePositions[index].X, _rulePositions[index].X) ||
src\Framework\MS\Internal\PtsHost\TableParaClient.cs (1)
662int u = TextDpi.ToTextDpi(point.X);
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)
78fspoint.u = ToTextDpi(point.X);
src\Framework\System\Windows\Controls\Border.cs (15)
602if (ptBR.X > ptTL.X && ptBR.Y > ptTL.Y) 680if (topLeft.X > topRight.X) 696if (bottomRight.X < bottomLeft.X) 715Vector offset = new Vector(rect.TopLeft.X, rect.TopLeft.Y); 734double radiusX = rect.TopRight.X - topRight.X; 746radiusX = rect.BottomRight.X - bottomRight.X; 758radiusX = bottomLeft.X - rect.BottomLeft.X; 770radiusX = topLeft.X - rect.TopLeft.X;
src\Framework\System\Windows\Controls\DataGrid.cs (7)
4103marginLeft = transform.Transform(new Point()).X; 6571Vector v = new Vector(pt.X - (cellBounds.Width * 0.5), pt.Y - (cellBounds.Height * 0.5)); 6581if ((pt.X >= cellBounds.Left) && (pt.X <= cellBounds.Right)) 6600distance = Math.Abs(pt.X - cellBounds.Left); 6672if (pt.X < bounds.Left) 6676else if (pt.X > bounds.Right)
src\Framework\System\Windows\Controls\DataGridCellsPanel.cs (1)
1993cellsPanelOffset = horizontalOffset + TransformToAncestor(scrollViewer).Transform(new Point()).X;
src\Framework\System\Windows\Controls\DocumentViewer.cs (4)
1419if (point.X < gridRect.X) 1421horizontalOffset -= (gridRect.X - point.X); 1423else if (point.X > gridRect.X + gridRect.Width) 1425horizontalOffset += (point.X - (gridRect.X + gridRect.Width));
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 (8)
398_floatingHeader.Arrange(new Rect(new Point(_currentPos.X - _relativeStartPos.X, 0), HeadersPositionList[_startColumnIndex].Size)); 1250return (DoubleUtil.GreaterThan(Math.Abs(currentPos.X - originalPos.X), c_thresholdX)); 1336if (startPos.X < 0.0) 1349if (DoubleUtil.GreaterThanOrClose(startPos.X, startX) && 1350DoubleUtil.LessThanOrClose(startPos.X, endX)) 1355if (DoubleUtil.GreaterThanOrClose(startPos.X, midX))
src\Framework\System\Windows\Controls\InkCanvas.cs (3)
1914if (DoubleUtil.IsNaN(point.X) || 1916Double.IsInfinity(point.X)|| 2231InkCanvasSelection.CommitChanges(Rect.Offset(bounds, -bounds.Left + point.X, -bounds.Top + point.Y), false);
src\Framework\System\Windows\Controls\ItemsControl.cs (2)
3323if (mousePosition.X < bounds.Left) 3333else if (mousePosition.X >= bounds.Right)
src\Framework\System\Windows\Controls\PopupControlService.cs (1)
194if (RaiseContextMenuOpeningEvent(directlyOver, pt.X, pt.Y,e.UserInitiated))
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 (15)
163new Point(_columnHeaderDragCurrentPosition.X - _columnHeaderDragStartRelativePosition.X, 0), 571_columnHeaderDragCurrentPosition.X - _columnHeaderDragStartPosition.X, 649return DoubleUtil.GreaterThan(Math.Abs(currentPos.X - originalPos.X), SystemParameters.MinimumHorizontalDragDistance); 713DragStartedEventArgs dragStartedEventArgs = new DragStartedEventArgs(_columnHeaderDragStartPosition.X, _columnHeaderDragStartPosition.Y); 849_columnHeaderDragCurrentPosition.X - _columnHeaderDragStartPosition.X, 941if (startPos.X < 0.0) 984headerStartX = transform.Transform(originPoint).X; 988if (DoubleUtil.LessThanOrClose(startPos.X, headerStartX)) 993if (DoubleUtil.GreaterThanOrClose(startPos.X, headerStartX) && 994DoubleUtil.LessThanOrClose(startPos.X, headerEndX)) 999if (DoubleUtil.GreaterThanOrClose(startPos.X, headerMidX))
src\Framework\System\Windows\Controls\Primitives\Popup.cs (6)
2458left = right = interestPoints[0].X; 2463double x = interestPoints[i].X; 2688&& ((p.X >= monitorInfo.rcWork.left) 2689&& (p.X <= monitorInfo.rcWork.right) 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)
1627rect.X -= offset.X;
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)); 310RaiseEvent(new DragDeltaEventArgs(thumbCoordPosition.X - _originThumbPoint.X,
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)); 472xLines.Add(startPoint.X); 474xLines.Add(startPoint.X + tickLen); 476xLines.Add(startPoint.X + tickLen2); 503new Point(startPoint.X, y), 504new Point(startPoint.X + tickLen2, y)); 520new Point(startPoint.X, y), 521new Point(startPoint.X + tickLen2, y)); 534Point pt0 = new Point(startPoint.X, y0); 535Point pt1 = new Point(startPoint.X + tickLen2, y0); 536Point pt2 = new Point(startPoint.X + tickLen2, y0 + Math.Abs(tickLen2) * progression); 547pt0 = new Point(startPoint.X, y0); 548pt1 = new Point(startPoint.X + tickLen2, y0); 549pt2 = new Point(startPoint.X + tickLen2, y0 - Math.Abs(tickLen2) * progression); 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)); 579xLines.Add(startPoint.X - 0.5); 581xLines.Add(startPoint.X - 0.5); 607double x = adjustedTick * logicalToPhysical + startPoint.X; 623double x = i * logicalToPhysical + startPoint.X; 638double x0 = (SelectionStart - Minimum) * logicalToPhysical + startPoint.X; 651x0 = (SelectionEnd - Minimum) * logicalToPhysical + startPoint.X;
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); 571ThumbCenterOffset = offset.X + (thumbLength * 0.5);
src\Framework\System\Windows\Controls\ScrollViewer.cs (2)
1722if (DoubleUtil.LessThan(manipulatorPosition.X, 0) || 1724DoubleUtil.GreaterThan(manipulatorPosition.X, viewportWidth) ||
src\Framework\System\Windows\Controls\SinglePageViewer.cs (2)
869if (DoubleUtil.LessThan(point.X, pageRect.Left)) 877else if (DoubleUtil.GreaterThan(point.X, pageRect.Right))
src\Framework\System\Windows\Controls\StickyNote.cs (2)
1160horizontalChange = Math.Min(Math.Max(minBoundary.X, horizontalChange), maxBoundary.X);
src\Framework\System\Windows\Controls\TextBlock.cs (4)
1765if (point.X < 0 || point.Y < 0) return this; 1802if ((line.Start <= point.X) && (line.Start + line.Width >= point.X)) 1804ie = line.InputHitTest(point.X);
src\Framework\System\Windows\Controls\ToolBarTray.cs (9)
545int hittestBand = GetBandFromOffset(fHorizontal ? pointRelativeToToolBarTray.Y : pointRelativeToToolBarTray.X); 551toolBarPosition = pointRelativeToToolBarTray.X - pointRelativeToToolBar.X; 579if (DoubleUtil.LessThan((fHorizontal ? pointRelativeToPreviousToolBar.X : pointRelativeToPreviousToolBar.Y), 0)) 597if (DoubleUtil.LessThan(toolBarsTotalMinimum, pointRelativeToToolBarTray.X - pointRelativeToToolBar.X)) 599ShrinkToolBars(band, 0, toolBarIndex - 1, pointRelativeToToolBarTray.X - pointRelativeToToolBar.X - toolBarsTotalMinimum); 627if (DoubleUtil.GreaterThanOrClose((fHorizontal ? pointRelativeToNextToolBar.X : pointRelativeToNextToolBar.Y), 0))
src\Framework\System\Windows\Controls\VirtualizingStackPanel.cs (6)
8476rcChild.X = previousChildOffset.X - distance; 8490rcChild.X = previousChildOffset.X + distance; 8530rcChild.X = previousChildOffset.X; 8544rcChild.X = previousChildOffset.X; 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 (7)
425if (targetPoint.X < 0 || targetPoint.X > scrollerWidth) 427if (targetPoint.X < 0) 430deltaToScroll = Math.Abs(targetPoint.X); 436deltaToScroll = targetPoint.X - scrollerWidth; 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 (7)
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); 283while (indexPoint < ((endPoint.X - startPoint.X) / (squiggleGap))) 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)
168double absHorDistance = Math.Max(0, (pt.X > lineResult.LayoutBox.X) ? (pt.X - lineResult.LayoutBox.Right) : (lineResult.LayoutBox.X - pt.X));
src\Framework\System\Windows\Documents\FixedSOMLineCollection.cs (5)
65Debug.Assert(point1.X == point2.X); 66_AddLineToRanges(_verticals, point1.X, point1.Y, point2.Y); 72_AddLineToRanges(_horizontals, point1.Y, point1.X, point2.X);
src\Framework\System\Windows\Documents\FixedSOMPageConstructor.cs (9)
95if (p.X < _xMin) 97_xMin = p.X; 99else if (p.X > _xMax) 101_xMax = p.X; 127_xMin = _xMax = startPoint.X; 471if (_lines.IsVerticallySeparated(glyphRun.BaselineOrigin.X + cumulativeAdvWidth, 473glyphRun.BaselineOrigin.X + cumulativeAdvWidth + advSpecified, 858if (startP.X == endP.X)
src\Framework\System\Windows\Documents\FixedTextBuilder.cs (3)
892double xDistance = Math.Abs(currentPt.X - prevPt.X); 1322designRect.Offset(run.BaselineOrigin.X, run.BaselineOrigin.Y);
src\Framework\System\Windows\Documents\FixedTextView.cs (14)
84if (point.Y == Double.MaxValue && point.X == Double.MaxValue) 820distance = run.BaselineOrigin.X - xoffset; 824distance = xoffset - run.BaselineOrigin.X; 860double horizontalDistance = Math.Max(0, (transformedPt.X > alignmentRect.X) ? (transformedPt.X - alignmentRect.Right) : (alignmentRect.X - transformedPt.X)); 869xoffset = transformedPt.X; 942double invSlope = (pt2.X - pt1.X) / (pt2.Y - pt1.Y); 958xoff = pt1.X + invSlope * (centerY - pt1.Y); 1014designRect.Offset(run.BaselineOrigin.X, run.BaselineOrigin.Y); 1057designRect.X = run.BaselineOrigin.X - x2; 1061designRect.X = run.BaselineOrigin.X + x1; 1214_GlyphRunHitTest(g, point.X, out charIndex, out edge);
src\Framework\System\Windows\Documents\Glyphs.cs (2)
128inkBoundingBox.X += _glyphRunOrigin.X; 168designRect.Offset(_glyphRunOrigin.X, _glyphRunOrigin.Y);
src\Framework\System\Windows\Documents\ImmComposition.cs (10)
788candform.rcArea.left = ConvertToInt32(milPointTopLeft.X); 789candform.rcArea.right = ConvertToInt32(milPointBottomRight.X); 792candform.ptCurrentPos = new NativeMethods.POINT(ConvertToInt32(milPointCaret.X), ConvertToInt32(milPointCaret.Y)); 913compform.rcArea.left = ConvertToInt32(milPointTopLeft.X); 914compform.rcArea.right = ConvertToInt32(milPointBottomRight.X); 917compform.ptCurrentPos = new NativeMethods.POINT(ConvertToInt32(milPointCaret.X), ConvertToInt32(milPointCaret.Y)); 1845if (point.X - rectCurrent.Left >= 0) 1884if (point.X - rectCurrent.Left >= 0) 1886if ((((point.X - rectCurrent.Left) * 4) / (rectNext.Left - rectCurrent.Left)) <= 1) 1893if (((point.X - rectNext.Left) * 4) / (rectCurrent.Left - rectNext.Left) <= 3)
src\Framework\System\Windows\Documents\RubberbandSelector.cs (17)
141if (pt.X < 0) 145else if (pt.X > pageSize.Width) 452boundingRect.Offset(run.BaselineOrigin.X, run.BaselineOrigin.Y); 469if (pt1.X < left) 471if (pt2.X < left) 477else if (pt1.X > right) 479if (pt2.X > right) 485else if (pt2.X < left || pt2.X > right) 492double d1 = (left - pt1.X) / (pt2.X - pt1.X); 493double d2 = (right - pt1.X) / (pt2.X - pt1.X); 588double distance = LTR ? xoffset - run.BaselineOrigin.X : run.BaselineOrigin.X - xoffset;
src\Framework\System\windows\Documents\TextEditor.cs (1)
1548if (e.Point.X > lastCharacterRect.X + lastCharacterRect.Width)
src\Framework\System\windows\Documents\TextEditorContextMenu.cs (5)
223contextMenu.HorizontalOffset = uiScopeMouseDownPoint.X; 348horizontalOffset = ClipToBounds(minPoint.X, horizontalOffset, maxPoint.X); 389horizontalOffset = ClipToBounds(minPoint.X, horizontalOffset, maxPoint.X);
src\Framework\System\windows\Documents\TextEditorDragDrop.cs (2)
128_dragRect = new Rect(mouseDownPoint.X - minimumHorizontalDragDistance, mouseDownPoint.Y - minimumVerticalDragDistance, minimumHorizontalDragDistance * 2, minimumVerticalDragDistance * 2); 231return !_dragRect.Contains(dragPoint.X, dragPoint.Y);
src\Framework\System\windows\Documents\TextEditorMouse.cs (8)
531Point targetPoint = new Point(mouseMovePoint.X, mouseMovePoint.Y); 542targetPoint = new Point(targetPoint.X, targetRect.Bottom - pageHeight); 548targetPoint = new Point(targetPoint.X, targetRect.Top + pageHeight); 556if (pointScroller.X < 0) 558targetPoint = new Point(targetPoint.X - slowAreaDelta, targetPoint.Y); 561else if (pointScroller.X > pageWidth) 563targetPoint = new Point(targetPoint.X + slowAreaDelta, targetPoint.Y); 582if (mouseMovePoint.X > lastCharacterRect.X + lastCharacterRect.Width)
src\Framework\System\windows\Documents\TextEditorSelection.cs (6)
618newSuggestedX = newSuggestedOffset.X; 732newSuggestedX = newSuggestedOffset.X; 1443newSuggestedX = newSuggestedOffset.X; 1539newSuggestedX = newSuggestedOffset.X; 1836TextEditorSelection.UpdateSuggestedXOnColumnOrPageBoundary(This, e.NewSuggestedOffset.X); 1931TextEditorSelection.UpdateSuggestedXOnColumnOrPageBoundary(This, e.NewSuggestedOffset.X);
src\Framework\System\Windows\Documents\TextRangeEditTables.cs (5)
1627if (cell.ColumnIndex != 0 && point.X < cellInfo.CellArea.Left + sensitivity) 1635point.X > cellInfo.CellArea.Right - sensitivity) 1637if(!IsLastCellInRow(cell) || point.X < cellInfo.CellArea.Right + sensitivity) 1734double xPosAdorner = mouseMovePoint.X; 1746double dx = mousePoint.X - (_columnRect.X + _columnRect.Width / 2);
src\Framework\System\windows\Documents\TextSelection.cs (8)
2005(cursorPosition.LogicalDirection == LogicalDirection.Forward && objectEdgeRect.X < cursorMousePoint.X || 2006cursorPosition.LogicalDirection == LogicalDirection.Backward && cursorMousePoint.X < objectEdgeRect.X)) 2011(cursorPosition.LogicalDirection == LogicalDirection.Forward && objectEdgeRect.X > cursorMousePoint.X || 2012cursorPosition.LogicalDirection == LogicalDirection.Backward && cursorMousePoint.X > objectEdgeRect.X)) 2020(cursorPosition.LogicalDirection == LogicalDirection.Forward && objectEdgeRect.X > cursorMousePoint.X || 2021cursorPosition.LogicalDirection == LogicalDirection.Backward && cursorMousePoint.X > objectEdgeRect.X)) 2026(cursorPosition.LogicalDirection == LogicalDirection.Forward && objectEdgeRect.X < cursorMousePoint.X || 2027cursorPosition.LogicalDirection == LogicalDirection.Backward && cursorMousePoint.X < objectEdgeRect.X))
src\Framework\System\Windows\Documents\TextStore.cs (6)
2524rect.left = (int)(clientPoint.x + milPointTopLeft.X); 2525rect.right = (int)(clientPoint.x + milPointBottomRight.X); 2947if (point.X - rectCurrent.Left >= 0) 2962if (point.X - rectCurrent.Left >= 0) 2964if ((((point.X - rectCurrent.Left) * 4) / (rectNext.Left - rectCurrent.Left)) <= 1) 2971if (((point.X - rectNext.Left) * 4) / (rectCurrent.Left - rectNext.Left) <= 3)
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)
2623double deltaX = p1.X - p2.X;
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 (10)
557_window.Left = adjustedTopLeft.X; 966_window.Left = _windowPosAtStartOfUserMove.X; 1228double topLeftRadius = DpiHelper.LogicalPixelsToDevice(new Point(_chromeInfo.CornerRadius.TopLeft, 0), dpi.DpiScaleX, dpi.DpiScaleY).X; 1244double topRightRadius = DpiHelper.LogicalPixelsToDevice(new Point(_chromeInfo.CornerRadius.TopRight, 0), dpi.DpiScaleX, dpi.DpiScaleY).X; 1252double bottomLeftRadius = DpiHelper.LogicalPixelsToDevice(new Point(_chromeInfo.CornerRadius.BottomLeft, 0), dpi.DpiScaleX, dpi.DpiScaleY).X; 1260double bottomRightRadius = DpiHelper.LogicalPixelsToDevice(new Point(_chromeInfo.CornerRadius.BottomRight, 0), dpi.DpiScaleX, dpi.DpiScaleY).X; 1463if (mousePosition.X >= windowPosition.Left && mousePosition.X < windowPosition.Left + (int)_chromeInfo.ResizeBorderThickness.Left) 1467else if (mousePosition.X < windowPosition.Right && mousePosition.X >= windowPosition.Right - _chromeInfo.ResizeBorderThickness.Right)
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\Window.cs (49)
2615param.SetPosition((int)screenTopLeft.X, (int)screenTopLeft.Y); 2765_actualLeft = currentLocationLogicalUnits.X; 2783if ((!DoubleUtil.IsNaN(requestedWidth)) && (!DoubleUtil.AreClose(sizeDeviceUnits.Width, requestedSizeDeviceUnits.X))) 2790sizeDeviceUnits.Width = requestedSizeDeviceUnits.X; 2817if (!DoubleUtil.IsNaN(requestedLeft) && (!DoubleUtil.AreClose(xDeviceUnits, requestedLocationDeviceUnits.X))) 2820xDeviceUnits = requestedLocationDeviceUnits.X; 2854if (!Double.IsPositiveInfinity(maxSizeDeviceUnits.X) && (sizeDeviceUnits.Width > maxSizeDeviceUnits.X)) 2857sizeDeviceUnits.Width = maxSizeDeviceUnits.X; 2866if (sizeDeviceUnits.Width < minSizeDeviceUnits.X) 2869sizeDeviceUnits.Width = minSizeDeviceUnits.X; 3000if (CalculateWindowLocation(ref xDeviceUnits, ref yDeviceUnits, new Size(newSizeDeviceUnits.X, newSizeDeviceUnits.Y))) 3121DoubleUtil.DoubleToInt(ptDeviceUnits.X), 3169UpdateHwndSizeOnWidthHeightChange(sizeLogicalUnits.X, newHeight); 3549mm.minWidth = Math.Max(this.MinWidth, minSizeLogicalUnits.X); 3554mm.maxWidth = Math.Min(MinWidth, maxSizeLogicalUnits.X); 3560mm.maxWidth = Math.Min(MaxWidth, maxSizeLogicalUnits.X); 3564mm.maxWidth = maxSizeLogicalUnits.X; 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); 4824SetValue(FrameworkElement.WidthProperty, ptLogicalUnits.X); 4896_windowMaxWidthDeviceUnits = Math.Max(_windowMaxWidthDeviceUnits, windowSize.X); 4990if (!DoubleUtil.AreClose(_actualLeft, ptLogicalUnits.X) || 4993_actualLeft = ptLogicalUnits.X; 5102mmi.ptMinTrackSize.x = DoubleUtil.DoubleToInt(minSizeDeviceUnits.X); 5105mmi.ptMaxTrackSize.x = DoubleUtil.DoubleToInt(maxSizeDeviceUnits.X); 5184if ((mousePositionWRTResizeGripControl.X < 0) || 5186(mousePositionWRTResizeGripControl.X > _resizeGripControl.RenderSize.Width) || 6030UpdateHwndSizeOnWidthHeightChange(logicalSize.X, minHeight); 6068UpdateHwndSizeOnWidthHeightChange(logicalSize.X, maxHeight); 6126if (minWidth > logicalSize.X) 6163if (maxWidth < logicalSize.X) 6193double convertedValue = (LogicalToDeviceUnits(new Point(newValue, 0))).X; 6234newLeft = TransformWorkAreaScreenArea(new Point(newLeft, 0), TransformType.ScreenAreaToWorkArea).X; 6236newLeft = (LogicalToDeviceUnits(new Point(newLeft, 0))).X; 6296retPt = new Point(pt.X + deltaX, pt.Y + deltaY); 6300retPt = new Point(pt.X - deltaX, pt.Y - deltaY); 6530DoubleUtil.DoubleToInt(ptDeviceUnits.X), 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)); 8479X = LogicalTopLeft.X * dpiScaleX,
System.Activities.Core.Presentation (78)
System\Activities\Core\Presentation\FlowchartConnectionPointsAdorner.cs (5)
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); 78actualPoint.X, 95actualPoint = new Point(falseConnectionPoint.Location.X - origin.X, falseConnectionPoint.Location.Y - origin.Y); 107actualPoint.X,
System\Activities\Core\Presentation\FlowchartDesigner.Container.cs (13)
323if (pastePoint.X > 0 && pastePoint.Y > 0) 333panelPoint.X = panelPoint.X < 0 ? 0 : panelPoint.X; 405if ((locationOfShape.X < point.X + FreeFormPanel.GridSize && 406locationOfShape.X > point.X - FreeFormPanel.GridSize) && 444topLeft.X = topLeft.X > viewStatePoint.X ? viewStatePoint.X : topLeft.X; 452OffSetViewState(new Vector(newOrigin.X - topLeft.X, newOrigin.Y - topLeft.Y), modelItemsInMetaData);
System\Activities\Core\Presentation\FlowchartDesigner.Helpers.cs (9)
273pt.X -= pt.X % FreeFormPanel.GridSize; 275pt.X = pt.X < 0 ? 0 : pt.X; 299location.X -= shapeAnchorPoint.X; 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); 308if (location.X < 0) 310double correction = FreeFormPanel.GridSize - ((location.X * (-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); 2013newLocation.X = FreeFormPanel.ZeroIfNegative(newLocation.X); 2644Double detX = shapeLocation.X - (lastShape.X + FreeFormPanel.GridSize);
System\Activities\Core\Presentation\FlowchartResizeGrip.cs (2)
87currentPosition.Offset(this.offset.X, this.offset.Y); 89flowchartDesigner.FlowchartWidth = Math.Min(Math.Max(panel.RequiredWidth, currentPosition.X), flowchartGrid.MaxWidth);
System\Activities\Core\Presentation\StateContainerEditor.CompositeView.cs (15)
389if (pastePoint.X > 0 && pastePoint.Y > 0) 394pastePoint.X = pastePoint.X < 0 ? 0 : pastePoint.X; 451topLeft.X = topLeft.X > location.X ? location.X : topLeft.X; 455OffsetLocationViewStates(new Vector(point.X - topLeft.X, point.Y - topLeft.Y), itemsPasted, GetTransitionModelItems(itemsPasted), false); 515newLocation.X = newLocation.X < 0 ? 0 : newLocation.X; 572if ((locationOfShape.X < point.X + FreeFormPanel.GridSize && 573locationOfShape.X > point.X - FreeFormPanel.GridSize) &&
System\Activities\Core\Presentation\StateContainerEditor.Utilities.cs (9)
137location.X -= shapeAnchorPoint.X; 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); 146if (location.X < 0) 148double correction = FreeFormPanel.GridSize - ((location.X * (-1)) % FreeFormPanel.GridSize); 161pt.X -= pt.X % FreeFormPanel.GridSize; 163pt.X = pt.X < 0 ? 0 : pt.X;
System\Activities\Core\Presentation\StateContainerEditor.xaml.cs (16)
523if (srcLocation.X > destLocation.X + destSize.Width) 528else if (srcLocation.X + srcSize.Width < destLocation.X) 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) 2107newLocation.X = FreeFormPanel.ZeroIfNegative(newLocation.X); 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); 135stateContainerEditor.StateContainerWidth = Math.Min(Math.Max(panel.RequiredWidth, currentPosition.X), stateContainerGrid.MaxWidth);
System\Activities\Core\Presentation\StateMachineConnetionPointsAdorner.cs (1)
36actualPoint = new Point(connPoint.Location.X - origin.X, connPoint.Location.Y - origin.Y);
System.Activities.Presentation (246)
System.Activities.Presentation\System\Activities\Presentation\Annotations\AnnotationAdorner.cs (4)
83Fx.Assert(anchorPoint.X >= canvas.X && anchorPoint.X <= canvas.X + canvas.Width, "X axis of anchorPoint not within canvas"); 89if (anchorPoint.X + desiredSize.Width <= canvas.X + canvas.Width) 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)
748if (location.X < topLeftPoint.X) 750topLeftPoint.X = location.X; 763locations[viewElement] = Vector.Add(new Vector(-topLeftPoint.X, -topLeftPoint.Y), locations[viewElement]); 858Margin = new Thickness(locations[viewElement].X, locations[viewElement].Y, 0, 0), 931this.offsetX = offset.X * scaleFactor;
System.Activities.Presentation\System\Activities\Presentation\FreeFormEditing\AutoConnectAdorner.cs (2)
142if (position.X < 0 && this.highlightedDirection != AutoConnectDirections.Left) 147else if (position.X > size.Width && this.highlightedDirection != AutoConnectDirections.Right)
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))); 93dropLocation.X = dropLocation.X < 0 ? 0 : dropLocation.X; 111if (mousePosition.X >= targetLocation.X && mousePosition.X <= targetLocation.X + targetSize.Width) 126dropLocation.X = targetLocation.X + ((targetSize.Width - droppedSize.Width) / 2); 143if (dropLocation.X >= targetLocation.X && dropLocation.X <= targetLocation.X + targetSize.Width + ShapeMargin) 145dropLocation.X = targetLocation.X + targetSize.Width + ShapeMargin; 147else if (dropLocation.X + droppedSize.Width + ShapeMargin >= targetLocation.X && dropLocation.X <= targetLocation.X) 149dropLocation.X = targetLocation.X - droppedSize.Width - ShapeMargin; 157double distX = Math.Abs(shapeCenter.X - mousePosition.X); 161return shapeCenter.X < mousePosition.X ? EdgeLocation.Left : EdgeLocation.Right;
System.Activities.Presentation\System\Activities\Presentation\FreeFormEditing\ConnectionPoint.cs (10)
119if (this.Location.X == topLeft.X) 121return new List<Point> { topLeft, new Point(topLeft.X, topLeft.Y + parentHeight) }; 123else if (this.Location.X == topLeft.X + parentWidth) 125return new List<Point> { new Point(topLeft.X + parentWidth, topLeft.Y), new Point(topLeft.X + parentWidth, topLeft.Y + parentHeight) }; 129return new List<Point> { topLeft, new Point(topLeft.X + parentWidth, topLeft.Y) }; 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); 410editPointOffset *= (previous.Location.X < this.activeEditPoint.Location.X) ? 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); 431editPointOffset *= (this.activeEditPoint.Location.X < next.Location.X) ? -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)
34labelLocation.X = (int)(labelLocation.X - labelBorderWidth / 2 + EPS); 37margin.Left = labelLocation.X;
System.Activities.Presentation\System\Activities\Presentation\FreeFormEditing\ConnectorPointsToArrowMarginConverter.cs (1)
28margin.Left = points[points.Count - 1].X - offset;
System.Activities.Presentation\System\Activities\Presentation\FreeFormEditing\ConnectorPointsToArrowTransformConverter.cs (4)
44if (srcPoint.X == destPoint.X) 55if (destPoint.X > srcPoint.X)
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 (80)
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); 262if (points[index1].X.IsEqualTo(points[index3].X) || 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); 457if (r2.X > Z.X) 507if (r4.X < Z.X) 563if (((orientation == Orientation.Vertical) ? direction.X : direction.Y).IsEqualTo(0)) 578side = (direction.X < 0) ? DesignerEdges.Left : DesignerEdges.Right; 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)) 1078this.orientation = (this.point1.X.IsEqualTo(this.point2.X) ? Orientation.Vertical : Orientation.Horizontal); 1107if (!a.X.IsEqualTo(b.X) && !a.Y.IsEqualTo(b.Y)) 1112return ConstructBoundSegment(coverSet, a, a.X.IsEqualTo(b.X) ? Orientation.Vertical : Orientation.Horizontal); 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); 1147(p.X.IsNoLessThan(Math.Min(this.point1.X, this.point2.X)) && p.X.IsNoGreaterThan(Math.Max(this.point1.X, this.point2.X))) : 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); 1192if (this.point1.X > this.point2.X) 1238if (vertical.A.X < Math.Min(horizontal.A.X, horizontal.B.X) || vertical.A.X > Math.Max(horizontal.A.X, horizontal.B.X)) 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); 1375int currentDistance = (int)((side == DesignerEdges.Left) ? p.X - segment.A.X : segment.A.X - p.X); 1415int currentDistance = (int)((side == DesignerEdges.Left) ? p.X - segment.A.X : segment.A.X - p.X); 1444originalDistance = (int)(originalCover.A.X - escape.X); 1468newDistance = (int)Math.Abs(newCover.A.X - escape.X);
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 (14)
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)); 44if (start.X == end.X) 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)); 341if (width < (size.Width + pt.X)) 343width = size.Width + pt.X; 449if (width < child.DesiredSize.Width + pt.X) 451width = child.DesiredSize.Width + pt.X; 461return location.X >= 0 && location.Y >= 0;
System.Activities.Presentation\System\Activities\Presentation\MiniMap\MiniMapControl.xaml.cs (5)
120double left = Math.Max(value - this.mousePosition.X, 0.0); 166get { return this.mousePosition.X; } 333this.lookupWindow.Center(pt.X, pt.Y); 382this.lookupWindow.SetPosition(to.X, to.Y); 384to.X - this.lookupWindow.MousePositionX,
System.Activities.Presentation\System\Activities\Presentation\View\AutoScrollHelper.cs (4)
63if (positionInScrollViewer.X > (scrollViewerWidth - scrollOnDragThresholdX) 65|| positionInLogicalView.Value.X < (logicalViewWidth - scrollBuffer))) 69else if (positionInScrollViewer.X < scrollOnDragThresholdX 71|| positionInLogicalView.Value.X > scrollBuffer))
System.Activities.Presentation\System\Activities\Presentation\View\DesignerView.xaml.cs (3)
629this.viewElementDragShadow.UpdatePosition(clientPoint.X, clientPoint.Y); 1687return mousePosition.X > 0 && mousePosition.X < scrollViewer.ViewportWidth &&
System.Activities.Presentation\System\Activities\Presentation\View\ExtensionSurface.cs (10)
308position.X = CalculateInBoundsValue(position.X, window.DesiredSize.Width, this.ActualWidth, this.selectedChild.Value.X); 327this.canvasOffset.X = Math.Min(this.canvasOffset.X, p.X); 331this.canvasOffset.X = Math.Abs(this.canvasOffset.X); 354if (IsGreater(pos.X, size.Width, this.ActualWidth)) 356size.Width = this.ActualWidth - pos.X; 379pos.Offset(this.canvasOffset.X, this.canvasOffset.Y); 415offsetMinusX = Math.Min(offsetMinusX, pos.X); 419offsetPlusX = Math.Max(offsetPlusX, pos.X + child.DesiredSize.Width);
System.Activities.Presentation\System\Activities\Presentation\View\ExtensionWindow.cs (21)
221offset.X = targetPosition.X - windowPosition.X; 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) 355else if (position.X <= (BorderOffset / 2.0)) 360else if (position.X >= this.border.ActualWidth - (BorderOffset / 2.0)) 371this.bottomRight = new Point(topLeft.X + Width, topLeft.Y + Height); 457double initialWidth = this.bottomRight.X - topLeft.X; 463if (bottomRight.X > absolutePosition.X) 465if ((double.IsNaN(MinWidth) || double.IsInfinity(MinWidth) || bottomRight.X - absolutePosition.X >= MinWidth) && 466(double.IsNaN(MaxWidth) || double.IsInfinity(MaxWidth) || bottomRight.X - absolutePosition.X <= MaxWidth)) 468size.Width = this.bottomRight.X - absolutePosition.X; 469topLeft.X = absolutePosition.X; 477size.Width = Math.Min(Math.Max(MinWidth, current.X), MaxWidth);
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); 60newSize.Width = Math.Min(Math.Max(this.parent.MinWidth, currentPosition.X), this.parent.MaxWidth);
System.Activities.Presentation\System\Activities\Presentation\View\RubberBandSelector.cs (5)
126if (!this.IsSelecting && (Math.Abs(positionToScreen.X - this.MouseDownPointToScreen.X) > SystemParameters.MinimumHorizontalDragDistance || 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\VisualBasicEditor.xaml.cs (1)
701if (position.X > charRect.Left + charRect.Width / 2)
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 (13)
MS\Internal\AutomationProxies\WindowsEditBox.cs (3)
676if (pt.X < rect.left) 718if (pt.X >= r.Left && pt.X < r.Right)
MS\Internal\AutomationProxies\WindowsEditBoxRange.cs (8)
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)
64return point1.X == point2.X && 97return point1.X.Equals(point2.X) && 147return X.GetHashCode() ^
Shared\MS\Internal\DoubleUtil.cs (2)
192return DoubleUtil.AreClose(point1.X, point2.X) &&
Shared\MS\Internal\MatrixUtil.cs (8)
113rect._x = Math.Min(Math.Min(point0.X, point1.X), Math.Min(point2.X, point3.X)); 116rect._width = Math.Max(Math.Max(point0.X, point1.X), Math.Max(point2.X, point3.X)) - rect._x;