2395 instantiations of Point
BinaryFormatTests (2)
FormatTests\FormattedObject\BinaryFormatWriterTests.cs (2)
190new Point(-1, 2), 191new Point(int.MaxValue, int.MinValue),
DesignSurface (63)
MainForm.cs (54)
150TextBox t1 = surface.CreateControl<TextBox>(new Size(200, 23), new Point(172, 12)); 151Button b1 = surface.CreateControl<Button>(new Size(200, 40), new Point(172, 63)); 152CustomButton b2 = surface.CreateControl<CustomButton>(new Size(200, 40), new Point(172, 200)); 158RadioButton rb1 = surface.CreateControl<RadioButton>(new Size(120, 22), new Point(12, 10)); 160RadioButton rb2 = surface.CreateControl<RadioButton>(new Size(120, 22), new Point(12, 35)); 164CheckBox checkbox1 = surface.CreateControl<CheckBox>(new Size(120, 22), new Point(12, 60)); 166CheckBox checkbox2 = surface.CreateControl<CheckBox>(new Size(120, 22), new Point(12, 85)); 170CheckBox checkbox3 = surface.CreateControl<CheckBox>(new Size(120, 22), new Point(12, 110)); 174Panel pnl = surface.CreateControl<Panel>(new Size(140, 140), new Point(12, 12)); 182Label l1 = surface.CreateControl<Label>(new Size(100, 25), new Point(12, 12)); 183Label l2 = surface.CreateControl<Label>(new Size(120, 25), new Point(12, 12)); 189SplitContainer sct = surface.CreateControl<SplitContainer>(new Size(400, 100), new Point(0, 0)); 195PictureBox pb1 = surface.CreateControl<PictureBox>(new Size(64, 64), new Point(12, 176)); 200surface.CreateControl<DateTimePicker>(new Size(200, 23), new Point(172, 150)); 211TextBox t1 = surface.CreateControl<TextBox>(new Size(200, 20), new Point(10, 10)); 212Button b1 = surface.CreateControl<Button>(new Size(200, 40), new Point(10, 40)); 213Label l1 = surface.CreateControl<Label>(new Size(200, 100), new Point(10, 100)); 220MaskedTextBox maskTextBox = surface.CreateControl<MaskedTextBox>(new Size(200, 20), new Point(260, 60)); 222ComboBox cb1 = surface.CreateControl<ComboBox>(new Size(200, 20), new Point(260, 16)); 226ListBox lb1 = surface.CreateControl<ListBox>(new Size(200, 130), new Point(260, 100)); 229TreeView tv1 = surface.CreateControl<TreeView>(new Size(200, 160), new Point(10, 220)); 240Button b1 = surface.CreateControl<Button>(new Size(200, 40), new Point(10, 10)); 241Button b2 = surface.CreateControl<Button>(new Size(200, 40), new Point(100, 100)); 242Button b3 = surface.CreateControl<Button>(new Size(200, 40), new Point(22, 22)); 246GroupBox gb = surface.CreateControl<GroupBox>(new Size(300, 180), new Point(100, 200)); 250ListView lb1 = surface.CreateControl<ListView>(new Size(290, 160), new Point(320, 30)); 262Button b1 = surface.CreateControl<Button>(new Size(200, 40), new Point(10, 10)); 263Button b2 = surface.CreateControl<Button>(new Size(200, 40), new Point(10, 60)); 273MonthCalendar monthCalendar1 = surface.CreateControl<MonthCalendar>(new Size(230, 170), new Point(10, 110)); 275Button subButton1OfLayoutPanel = surface.CreateControl<Button>(new Size(100, 40), new Point(10, 10)); 276Button subButton2OfLayoutPanel = surface.CreateControl<Button>(new Size(100, 40), new Point(10, 10)); 277FlowLayoutPanel layoutPanel = surface.CreateControl<FlowLayoutPanel>(new Size(430, 200), new Point(250, 10)); 281TrackBar trackBar = surface.CreateControl<TrackBar>(new Size(200, 50), new Point(250, 220)); 286ToolStripContainer toolStripContainer = surface.CreateControl<ToolStripContainer>(new Size(200, 180), new Point(250, 280)); 296surface.CreateControl<TabControl>(new Size(400, 100), new Point(12, 21)); 298surface.CreateControl<TableLayoutPanel>(new Size(290, 160), new Point(20, 150)); 299surface.CreateControl<PropertyGrid>(new Size(200, 150), new Point(430, 23)); 302ListBox listBox = surface.CreateControl<ListBox>(new Size(120, 94), new Point(337, 217)); 306DataGridView dataGridView = surface.CreateControl<DataGridView>(new Size(200, 150), new Point(470, 220)); 319ToolStripContainer toolStripContainer = surface.CreateControl<ToolStripContainer>(new Size(800, 200), new Point(0, 60)); 322ToolStrip toolStrip1 = surface.CreateControl<ToolStrip>(new Size(400, 50), new Point(0, 0)); 331MenuStrip menuStrip1 = surface.CreateControl<MenuStrip>(new Size(400, 50), new Point(0, 60)); 332MenuStrip menuStrip2 = surface.CreateControl<MenuStrip>(new Size(400, 50), new Point(0, 150)); 355ToolStripPanel topToolStripPanel = surface.CreateControl<ToolStripPanel>(new(50, 50), new(0, 0)); 358ToolStripPanel bottomToolStripPanel = surface.CreateControl<ToolStripPanel>(new(50, 50), new(0, 0)); 362SplitContainer splitContainer = surface.CreateControl<SplitContainer>(new(0, 0), new(0, 0)); 366RichTextBox richTextBox = surface.CreateControl<RichTextBox>(new Size(0, 0), new Point(0, 0)); 371MyUserControl userControl = surface.CreateControl<MyUserControl>(new Size(350, 100), new Point(0, 0)); 374MyScrollableControl scrollableControl = surface.CreateControl<MyScrollableControl>(new Size(0, 0), new Point(0, 0)); 387Splitter splitter = surface.CreateControl<Splitter>(new(5, 0), new(0, 0)); 391Panel panel = surface.CreateControl<Panel>(new(0, tabPage6.Height / 3), new(0, 0)); 393NumericUpDown numericUpDown = surface.CreateControl<NumericUpDown>(new(50, 10), new(10, 10)); 400BindingNavigator bindingNavigator = surface.CreateControl<BindingNavigator>(new(0, 0), new(0, 0)); 478Location = new Point(0, 0),
MainForm.Designer.cs (9)
66this.splitContainer.Location = new System.Drawing.Point(0, 28); 92this.tabControl1.Location = new System.Drawing.Point(0, 0); 100this.tabPage1.Location = new System.Drawing.Point(4, 25); 110this.tabPage2.Location = new System.Drawing.Point(4, 25); 120this.tabPage3.Location = new System.Drawing.Point(4, 25); 130this.tabPage4.Location = new System.Drawing.Point(4, 25); 140this.tabPage5.Location = new System.Drawing.Point(4, 25); 150this.tabPage6.Location = new System.Drawing.Point(4, 25); 165this.menuStrip1.Location = new System.Drawing.Point(0, 0);
Microsoft.VisualBasic.Forms (1)
Microsoft\VisualBasic\Helpers\VBInputBox.vb (1)
111DesktopLocation = New Point(xPos, yPos)
NativeHost.ManagedControl (1)
ManagedControl.Designer.cs (1)
38this.button1.Location = new System.Drawing.Point(37, 59);
PresentationUI (130)
MS\Internal\Documents\Application\DocumentPropertiesDialog.Designer.cs (54)
128this.tableLayoutPanel3.Location = new System.Drawing.Point(6, 6); 139this._tabControl.Location = new System.Drawing.Point(3, 3); 141this._tabControl.Padding = new System.Drawing.Point(7, 3); 152this._summaryTab.Location = new System.Drawing.Point(4, 22); 190this.tableLayoutPanel1.Location = new System.Drawing.Point(3, 3); 210this._language.Location = new System.Drawing.Point(69, 205); 220this._title.Location = new System.Drawing.Point(69, 3); 229this._titleLabel.Location = new System.Drawing.Point(3, 3); 237this._identifier.Location = new System.Drawing.Point(69, 281); 246this._versionLabel.Location = new System.Drawing.Point(3, 262); 254this._authorLabel.Location = new System.Drawing.Point(3, 22); 262this._statusLabel.Location = new System.Drawing.Point(3, 243); 270this._contentLabel.Location = new System.Drawing.Point(3, 224); 278this._languageLabel.Location = new System.Drawing.Point(3, 205); 286this._subjectLabel.Location = new System.Drawing.Point(3, 41); 294this._version.Location = new System.Drawing.Point(69, 262); 303this._categoryLabel.Location = new System.Drawing.Point(3, 186); 311this._category.Location = new System.Drawing.Point(69, 186); 320this._status.Location = new System.Drawing.Point(69, 243); 329this._content.Location = new System.Drawing.Point(69, 224); 338this._keywordsLabel.Location = new System.Drawing.Point(3, 167); 347this._author.Location = new System.Drawing.Point(69, 22); 356this._subject.Location = new System.Drawing.Point(69, 41); 365this._description.Location = new System.Drawing.Point(69, 60); 376this._keywords.Location = new System.Drawing.Point(69, 167); 388this._identifierLabel.Location = new System.Drawing.Point(3, 281); 397this._descriptionLabel.Location = new System.Drawing.Point(3, 60); 424this._infoTab.Location = new System.Drawing.Point(4, 22); 439this.tableLayoutPanel2.Location = new System.Drawing.Point(6, 3); 461this.tableLayoutPanel4.Location = new System.Drawing.Point(3, 3); 473this._size.Location = new System.Drawing.Point(90, 41); 492this._filename.Location = new System.Drawing.Point(75, 3); 502this._documentType.Location = new System.Drawing.Point(75, 22); 512this._sizeLabel.Location = new System.Drawing.Point(75, 41); 524this._documentDetailBox.Location = new System.Drawing.Point(3, 225); 547this._documentTable.Location = new System.Drawing.Point(16, 16); 560this._documentPrintedDate.Location = new System.Drawing.Point(88, 79); 569this._documentModifiedDate.Location = new System.Drawing.Point(88, 60); 578this._documentCreatedDate.Location = new System.Drawing.Point(88, 41); 587this._revision.Location = new System.Drawing.Point(88, 22); 596this._documentPrintedLabel.Location = new System.Drawing.Point(3, 79); 604this._documentModifiedLabel.Location = new System.Drawing.Point(3, 60); 612this._documentCreatedLabel.Location = new System.Drawing.Point(3, 41); 620this._revisionLabel.Location = new System.Drawing.Point(3, 22); 628this._lastSavedLabel.Location = new System.Drawing.Point(3, 3); 636this._lastSaved.Location = new System.Drawing.Point(88, 3); 648this._fileSystemBox.Location = new System.Drawing.Point(3, 124); 666this._fileTable.Location = new System.Drawing.Point(16, 19); 676this._fileModifiedDate.Location = new System.Drawing.Point(66, 22); 685this._fileAccessedDate.Location = new System.Drawing.Point(66, 41); 694this._fileCreatedLabel.Location = new System.Drawing.Point(3, 3); 702this._fileModifiedLabel.Location = new System.Drawing.Point(3, 22); 710this._fileCreatedDate.Location = new System.Drawing.Point(66, 3); 719this._fileAccessedLabel.Location = new System.Drawing.Point(3, 41);
MS\Internal\Documents\CredentialManagerDialog.Designer.cs (3)
63this._mainDialogTableLayoutPanel.Location = new System.Drawing.Point(8, 8); 142this._credListBox.Location = new System.Drawing.Point(3, 3); 151this._instructionLabel.Location = new System.Drawing.Point(3, 0);
MS\Internal\Documents\RequestedSignatureDialog.Designer.cs (11)
62_buttomControlLayoutpanel.Location = new System.Drawing.Point(374, 246); 106_userInputTableLayoutPanel.Location = new System.Drawing.Point(10, 23); 123_dateTimePicker.Location = new System.Drawing.Point(3, 174); 134_requestedLocationTextBox.Location = new System.Drawing.Point(3, 125); 144_signatureAppliedByDateLabel.Location = new System.Drawing.Point(3, 158); 153_requestSignerNameLabel.Location = new System.Drawing.Point(3, 10); 162_requestLocationLabel.Location = new System.Drawing.Point(3, 109); 170_requestedSignerNameTextBox.Location = new System.Drawing.Point(3, 26); 180_intentLabel.Location = new System.Drawing.Point(3, 59); 189_intentComboBox.Location = new System.Drawing.Point(3, 75); 204_mainDialogTableLayoutPanel.Location = new System.Drawing.Point(9, 9);
MS\Internal\Documents\RMEnrollmentPage1.Designer.cs (12)
67_panel1.Location = new System.Drawing.Point(0, 0); 78_flowLayoutPanel2.Location = new System.Drawing.Point(0, 0); 88_flowLayoutPanel3.Location = new System.Drawing.Point(3, 16); 102_flowLayoutPanel4.Location = new System.Drawing.Point(3, 3); 110_label1.Location = new System.Drawing.Point(30, 1); 120_label2.Location = new System.Drawing.Point(30, 20); 130_label3.Location = new System.Drawing.Point(30, 30); 140_privacyLabel.Location = new System.Drawing.Point(30, 53); 151_instructionlabel.Location = new System.Drawing.Point(30, 76); 160_panel2.Location = new System.Drawing.Point(207, 3); 168_pictureBox.Location = new System.Drawing.Point(27, 4); 181_flowLayoutPanel1.Location = new System.Drawing.Point(0, 153);
MS\Internal\Documents\RMEnrollmentPage2.Designer.cs (11)
67this._flowLayoutPanel1.Location = new System.Drawing.Point(0, 326); 99this._flowLayoutPanel2.Location = new System.Drawing.Point(0, 0); 107this._label1.Location = new System.Drawing.Point(10, 10); 119this._flowLayoutPanel3.Location = new System.Drawing.Point(10, 33); 128this._pictureBox1.Location = new System.Drawing.Point(5, 5); 138this._label2.Location = new System.Drawing.Point(31, 5); 155this._tableLayoutPanel1.Location = new System.Drawing.Point(50, 89); 171this._networkRadioButton.Location = new System.Drawing.Point(3, 13); 181this._pictureBox2.Location = new System.Drawing.Point(368, 13); 191this._passportRadioButton.Location = new System.Drawing.Point(3, 169); 200this._pictureBox4.Location = new System.Drawing.Point(368, 169);
MS\Internal\Documents\RMEnrollmentPage3.Designer.cs (6)
54this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0); 68this.flowLayoutPanel2.Location = new System.Drawing.Point(3, 47); 76this.label2.Location = new System.Drawing.Point(7, 7); 90this.tableLayoutPanel2.Location = new System.Drawing.Point(3, 80); 102this.label3.Location = new System.Drawing.Point(149, 49); 111this.progressBar1.Location = new System.Drawing.Point(156, 72);
MS\Internal\Documents\RMPublishingDialog.Designer.cs (4)
305this.flowLayoutPanelActions.Location = new System.Drawing.Point(6, 395); 314this.buttonCancel.Location = new System.Drawing.Point(463, 3); 321this.buttonSave.Location = new System.Drawing.Point(382, 3); 328this.buttonSaveAs.Location = new System.Drawing.Point(301, 3);
MS\Internal\Documents\RMPublishingDialog.RightsTable.cs (1)
1040System.Drawing.Point p = new System.Drawing.Point(
MS\Internal\Documents\SignatureSummaryDialog.Designer.cs (12)
57_buttonDone.Location = new System.Drawing.Point(247, 13); 78_flowpanelMiddleControls.Location = new System.Drawing.Point(297, 0); 91_flowpanelBottomControls.Location = new System.Drawing.Point(297, 0); 100_buttonSign.Location = new System.Drawing.Point(166, 13); 110_buttonViewCert.Location = new System.Drawing.Point(85, 13); 120_buttonRequestDelete.Location = new System.Drawing.Point(4, 13); 128_buttonRequestAdd.Location = new System.Drawing.Point(247, 42); 141_columnHeaderPanel.Location = new System.Drawing.Point(0, 0); 152_listBoxSummary.Location = new System.Drawing.Point(0, 0); 168_listboxMainPanel.Location = new System.Drawing.Point(15, 15); 177_listboxItemPanel.Location = new System.Drawing.Point(0, 53); 191_mainLayoutTable.Location = new System.Drawing.Point(6, 6);
MS\Internal\Documents\SigningDialog.Designer.cs (15)
64_userInputFlowPanel.Location = new System.Drawing.Point(3, 71); 83_signatureControlInputLayoutTable.Location = new System.Drawing.Point(6, 19); 101_addDigSigCheckBox.Location = new System.Drawing.Point(3, 136); 110_signerlabel.Location = new System.Drawing.Point(3, 20); 121_addDocPropCheckBox.Location = new System.Drawing.Point(3, 116); 130_reasonLabel.Location = new System.Drawing.Point(3, 40); 138_reasonComboBox.Location = new System.Drawing.Point(3, 43); 148_actionlabel.Location = new System.Drawing.Point(3, 113); 157_locationLabel.Location = new System.Drawing.Point(3, 77); 165_locationTextBox.Location = new System.Drawing.Point(3, 80); 186_buttonflowLayoutPanel.Location = new System.Drawing.Point(3, 272); 200_cancelButton.Location = new System.Drawing.Point(434, 8); 214_signButton.Location = new System.Drawing.Point(392, 8); 228_signSaveAsButton.Location = new System.Drawing.Point(350, 8); 243_mainLayoutTable.Location = new System.Drawing.Point(6, 6);
MS\Internal\Documents\SigningProgress.Designer.cs (1)
42_label.Location = new System.Drawing.Point(20, 9);
System.ComponentModel.TypeConverter (2)
System\Drawing\PointConverter.cs (2)
50return new Point(x, y); 100return new Point((int)x, (int)y);
System.Drawing.Common.Tests (396)
mono\System.Drawing\GraphicsTests.cs (50)
112Assert.Equal(new Point(0, 0), g.RenderingOrigin); 128g.RenderingOrigin = new Point(10, 20); 139Assert.Equal(new Point(10, 20), g.RenderingOrigin); 292g.RenderingOrigin = new Point(10, 20); 305g.RenderingOrigin = new Point(5, 6); 317Assert.Equal(new Point(10, 20), g.RenderingOrigin); 331Assert.Equal(new Point(0, 0), g.RenderingOrigin); 706private static readonly Point[] s_tooSmallCurve = [new(0, 0), new(15, 5)]; 728Assert.Throws<ArgumentException>(() => g.DrawCurve(Pens.Black, [new(10, 10)], 0.5f)); 928AssertEquals(message + ".RenderingOrigin", new Point(-1, -1), g.RenderingOrigin); 952Assert.Equal(new Point(0, 0), g.RenderingOrigin); 961g.RenderingOrigin = new Point(-1, -1); 973Assert.Equal(new Point(-1, -1), g.RenderingOrigin); 985Assert.Equal(new Point(0, 0), g.RenderingOrigin); 994g.RenderingOrigin = new Point(-1, -1); 1006Assert.Equal(new Point(-1, -1), g.RenderingOrigin); 1019Assert.Equal(new Point(0, 0), g.RenderingOrigin); 1028g.RenderingOrigin = new Point(-1, -1); 1040Assert.Equal(new Point(-1, -1), g.RenderingOrigin); 1095Assert.Equal(new Point(0, 0), g.RenderingOrigin); 1100Assert.Equal(new Point(0, 0), g.RenderingOrigin); 1109g.RenderingOrigin = new Point(-1, -1); 1126Assert.Equal(new Point(0, 0), g.RenderingOrigin); 1523Point[] pts = [new(5, 5), new(15, 5), new(15, 15)]; 1899SizeF size = g.MeasureString(text, _font, new Point(0, 0), string_format); 1923? g.MeasureString(text.AsSpan(), _font, new Point(0, 0), string_format) 1924: g.MeasureString(text, _font, new Point(0, 0), string_format); 1965SizeF size = g.MeasureString(text, _font, new Point(0, 0), string_format); 2086rect.Location = new Point(10, 10); 2103rect.Location = new Point(10, 10); 2494Assert.Throws<ArgumentNullException>(() => g.DrawImage(null, new Point(0, 0))); 2502g.DrawImage(bmp, new Point(0, 0)); 2534g.DrawImage(bmp, [new(0, 0), new(1, 1), new(2, 2)]); 2624Point[] pts = [new(1, 1), new(2, 2), new(3, 3)]; 2653Point p = new(1, 1); 2660Point p = new(1, 1); 2667Point p = new(1, 1); 2674Point p = new(1, 1); 2739Point p = new(1, 1); 2750Point p = new(1, 1); 2764Assert.Throws<ArgumentNullException>(() => g.DrawImageUnscaled(null, new Point(0, 0))); 2772g.DrawImageUnscaled(bmp, new Point(0, 0)); 2943pts[i] = new Point(i, i);
System\Drawing\Drawing2D\CustomLineCapTests.cs (20)
27strokePath.AddLine(new Point(0, 0), new Point(0, 5)); 28strokePath.AddLine(new Point(0, 5), new Point(5, 1)); 29strokePath.AddLine(new Point(5, 1), new Point(3, 1)); 34fillPath.AddLine(new Point(-5, -10), new Point(0, 10)); 35fillPath.AddLine(new Point(0, 10), new Point(5, -10)); 36fillPath.AddLine(new Point(5, -10), new Point(-5, -10)); 71fillPath.AddLine(new Point(0, -10), new Point(0, 10)); 80fillPath.AddLine(new Point(-5, 5), new Point(5, 5)); 81fillPath.AddLine(new Point(5, 5), new Point(5, 1)); 82fillPath.AddLine(new Point(5, 1), new Point(-5, 5));
System\Drawing\Drawing2D\GraphicsPathIteratorTests.cs (6)
189Point[] points = [new(1, 1), new(2, 2), new(3, 3), new(4, 4)]; 271gp.AddLine(new(0, 0), new(1, 1));
System\Drawing\Drawing2D\GraphicsPathTests.cs (156)
57new(1, 1), new(1, 1), new(1, 1), 58new(1, 1), new(1, 1), new(1, 1), 151gp.PathData.Points[0] = new Point(0, 0); 164gp.PathPoints[0] = new Point(0, 0); 220gpPointsInt.AddLine(new Point(1, 1), new Point(2, 2)); 232gpi.AddLine(new Point(49, 157), new Point(75, 196)); 233gpi.AddLine(new Point(75, 196), new Point(102, 209)); 237gpi.AddLine(new Point(102, 209), new Point(75, 196)); 256gpi.AddLines([new(1, 1), new(2, 2)]); 281new(49, 157), new(49, 157) 369gpi.AddBezier(new Point(1, 1), new Point(2, 2), new Point(3, 3), new Point(4, 4)); 382gp.AddBezier(new Point(0, 0), new Point(0, 0), new Point(0, 0), new Point(0, 0)); 386gp.AddBezier(new Point(0, 0), new Point(0, 0), new Point(0, 0), new Point(0, 0)); 450Point[] intPoints = [new(1, 1), new(2, 2)]; 466Point[] intPoints = [new(1, 1), new(2, 2)]; 481Point[] intPoints = [new(1, 1), new(1, 1)]; 500Point[] intPoints = [new(1, 1), new(2, 2)]; 580yield return new object[] { new Point[1] { new(1, 1) } }; 607() => gp.AddCurve([new(1, 1), new(2, 2)], 0, segment, 0.5f)); 618() => gp.AddCurve([new(1, 1), new(0, 20), new(20, 0)], 1, 2, 0.5f)); 626gpi.AddClosedCurve([new(1, 1), new(2, 2), new(3, 3)]); 639gpi.AddClosedCurve([new(1, 1), new(1, 1), new(1, 1)]); 641gpi.AddClosedCurve([new(1, 1), new(1, 1), new(1, 1)]); 655gpi.AddClosedCurve([new(1, 1), new(2, 2), new(3, 3)], 0.5f); 673yield return new object[] { new Point[1] { new(1, 1) } }; 674yield return new object[] { new Point[2] { new(1, 1), new(2, 2) } }; 889gpi.AddPolygon([new(1, 1), new(2, 2), new(3, 3)]); 902gpi.AddPolygon([new(1, 1), new(2, 2), new(3, 3)]); 906gpi.AddPolygon([new(1, 1), new(2, 2), new(3, 3)]); 910gpi.AddPolygon([new(1, 1), new(2, 2), new(3, 3)]); 914gpi.AddPolygon([new(1, 1), new(2, 2), new(3, 3)]); 961yield return new object[] { new Point[1] { new(1, 1) } }; 962yield return new object[] { new Point[2] { new(1, 1), new(2, 2) } }; 995gpi.AddString("mono", FontFamily.GenericMonospace, 0, 10, new Point(10, 10), StringFormat.GenericDefault); 1019gpi.AddString("mono", FontFamily.GenericMonospace, 0, -10, new Point(10, 10), StringFormat.GenericDefault); 1055gpi.AddString(string.Empty, FontFamily.GenericMonospace, 0, 10, new Point(10, 10), StringFormat.GenericDefault); 1067gp.AddString(null, FontFamily.GenericMonospace, 0, 10, new Point(10, 10), StringFormat.GenericDefault)); 1081new GraphicsPath().AddString("mono", null, 0, 10, new Point(10, 10), StringFormat.GenericDefault)); 1199new(0, 0), new(40, 20), 1200new(20, 40), new(40, 40) 1214new(0, 0), new(40, 20), 1215new(20, 40), new(40, 40) 1259new(0, 0), new(10, 10), 1260new(20, 20), new(40, 40) 1306gp.AddPolygon([new(5, 5), new(15, 5), new(10, 15)]); 1315gp.AddPolygon([new(5, 5), new(15, 5), new(10, 15)]); 1331gp.AddLine(new Point(1, 1), new Point(2, 2)); 1342gp.AddLine(new Point(1, 1), new Point(2, 2)); 1363gp.AddLine(new Point(1, 1), new Point(2, 2)); 1381gp.AddLine(new Point(1, 1), new Point(2, 2)); 1383gp.AddLine(new Point(3, 3), new Point(4, 4)); 1436new(10, 10), new(20, 10), new(20, 20), 1437new(30, 20), new(40, 40), new(50, 40), 1438new(50, 50) 1455gp.AddClosedCurve([new(1, 1), new(2, 2), new(3, 3)]); 1471path.AddCurve([new(1, 1), new(2, 2), new(3, 3)]); 1517gp.AddLines([new(10, 10), new(20, 10), new(20, 20), new(30, 20)]); 1583gp.AddPolygon([new(1, 1), new(2, 2), new(3, 3)]); 1636gp.AddString("mono", FontFamily.GenericMonospace, 0, 10, new Point(20, 20), StringFormat.GenericDefault); 1694gp.AddPolygon([new(5, 5), new(15, 5), new(10, 15)]); 1706gp.AddPolygon([new(5, 5), new(15, 5), new(10, 15)]); 1851new(1, 2), new(3, 4), new(5, 6), new(7, 8), 1852new(9, 10), new(11, 12), new(13, 14) 1979gp.AddString("Mono::", FontFamily.GenericMonospace, 0, 10, new Point(10, 10), StringFormat.GenericDefault); 2044new(dX-64, dY-24), new(dX-59, dY-34), new(dX-52, dY-54), 2045new(dX-18, dY-66), new(dX-34, dY-47), new(dX-43, dY-27), 2046new(dX-44, dY-8), 2253Point point = new(12, 2); 2281Point point = new(15, 10);
System\Drawing\Drawing2D\LinearGradientBrushTests.cs (18)
12yield return new object[] { new Point(0, 0), new Point(2, 2), Color.Empty, Color.Empty, new RectangleF(0, 0, 2, 2) }; 13yield return new object[] { new Point(1, 0), new Point(0, 0), Color.Empty, Color.Red, new RectangleF(0, -0.5f, 1, 1) }; 14yield return new object[] { new Point(1, 2), new Point(4, 6), Color.Plum, Color.Red, new RectangleF(1, 2, 3, 4) }; 15yield return new object[] { new Point(1, 2), new Point(4, 6), Color.Red, Color.Red, new RectangleF(1, 2, 3, 4) }; 16yield return new object[] { new Point(-1, -2), new Point(4, 6), Color.Red, Color.Plum, new RectangleF(-1, -2, 5, 8) }; 17yield return new object[] { new Point(-4, -6), new Point(1, 2), Color.Black, Color.Wheat, new RectangleF(-4, -6, 5, 8) }; 18yield return new object[] { new Point(4, 6), new Point(-1, -2), Color.Black, Color.Wheat, new RectangleF(-1, -2, 5, 8) }; 19yield return new object[] { new Point(4, 6), new Point(1, 2), Color.Black, Color.Wheat, new RectangleF(1, 2, 3, 4) }; 71Assert.Throws<ExternalException>(() => new LinearGradientBrush(new Point(x, y), new Point(x, y), Color.Fuchsia, Color.GhostWhite));
System\Drawing\Drawing2D\MatrixTests.cs (29)
98yield return new object[] { new Rectangle(1, 4, 8, 16), new Point[] { new(32, 64), new(128, 256), new(512, 1024) }, new float[] { 12, 24, 30, 60, -100, -200 }, false, false }; 99yield return new object[] { new Rectangle(0, 0, 2, 4), new Point[] { new(8, 16), new(32, 64), new(128, 256) }, new float[] { 12, 24, 30, 60, 8, 16 }, false, false }; 100yield return new object[] { new Rectangle(0, 0, 1, 1), new Point[] { new(0, 0), new(0, 0), new(0, 0) }, new float[] { 0, 0, 0, 0, 0, 0 }, false, false }; 101yield return new object[] { new Rectangle(0, 0, 1, 1), new Point[] { new(0, 0), new(1, 0), new(0, 1) }, new float[] { 1, 0, 0, 1, 0, 0 }, true, true }; 699yield return new object[] { new Matrix(2, 4, 6, 8, 10, 12), new Point[] { new(2, 4), new(4, 8) }, new Point[] { new(38, 52), new(66, 92) } }; 700yield return new object[] { new Matrix(), new Point[] { new(2, 4), new(4, 8) }, new Point[] { new(2, 4), new(4, 8) } }; 701yield return new object[] { new Matrix(2, 4, 6, 8, 10, 12), new Point[1], new Point[] { new(10, 12) } }; 754yield return new object[] { new Matrix(2, 4, 6, 8, 10, 12), new Point[] { new(2, 4), new(4, 8) }, new Point[] { new(28, 40), new(56, 80) } }; 755yield return new object[] { new Matrix(), new Point[] { new(2, 4), new(4, 8) }, new Point[] { new(2, 4), new(4, 8) } };
System\Drawing\Drawing2D\PathGradientBrushTests.cs (6)
32private readonly Point[] _defaultIntPoints = [new(1, 2), new(20, 30)]; 199yield return new object[] { new Point[2] { new(1, 1), new(2, 2) }, Array.Empty<Color>() }; 200yield return new object[] { new Point[2] { new(1, 1), new(2, 2) }, new Color[3] };
System\Drawing\Graphics_DrawBezierTests.cs (11)
15graphics.DrawBezier(pen, new(10, 10), new(20, 1), new(35, 5), new(50, 10)); 30new(10, 10), new(20, 1), new(35, 5), new(50, 10), 31new(60, 15), new(65, 25), new(50, 30)
System\Drawing\Graphics_DrawLineTests.cs (4)
15graphics.DrawLines(pen, [new(1, 1), new(1, 10), new(20, 5), new(25, 30)]);
System\Drawing\GraphicsTests.cs (57)
824new Point(0, 0), 835new Point(1, 1), 851yield return new object[] { new Point(-3, -3), allEmpty }; 852yield return new object[] { new Point(3, 3), allEmpty }; 1545graphics.CopyFromScreen(new Point(sourceX, sourceY), new Point(destinationX, destinationY), size); 1691new Point[] { new(1, 1), new(2, 2) }, 1692new Point[] { new(1, 1), new(2, 2) } 1699new Point[] { new(1, 1), new(2, 2) }, 1700new Point[] { new(9, 12), new(13, 18) } 1707new Point[] { new(1, 1), new(2, 2) }, 1708new Point[] { new(1, 1), new(2, 2) } 1715new Point[] { new(1, 1), new(2, 2) }, 1716new Point[] { new(9, 12), new(13, 18) } 1723new Point[] { new(1, 1), new(2, 2) }, 1724new Point[] { new(1, -1), new(0, -1) } 1731new Point[] { new(1, 1), new(2, 2) }, 1732new Point[] { new(1, -1), new(0, -1) } 1756new PointF[] { new Point(1, 1), new Point(2, 2) }, 1757new PointF[] { new Point(1, 1), new Point(2, 2) } 1764new PointF[] { new Point(1, 1), new Point(2, 2) }, 1765new PointF[] { new Point(9, 12), new Point(13, 18) } 1772new PointF[] { new Point(1, 1), new Point(2, 2) }, 1773new PointF[] { new Point(1, 1), new Point(2, 2) } 1780new PointF[] { new Point(1, 1), new Point(2, 2) }, 1781new PointF[] { new Point(9, 12), new Point(13, 18) } 1788new PointF[] { new Point(1, 1), new Point(2, 2) }, 1789new PointF[] { new(0.5f, -1.5f), new Point(0, -1) } 1796new PointF[] { new Point(1, 1), new Point(2, 2) }, 1797new PointF[] { new(0.5f, -1.5f), new Point(0, -1) } 1826var points = new Point[] { new(1, 1) }; 1828Assert.Equal([new(1, 1)], points); 1854AssertExtensions.Throws<ArgumentException>(null, () => graphics.TransformPoints(destSpace, CoordinateSpace.World, [new(1, 1)])); 1865AssertExtensions.Throws<ArgumentException>(null, () => graphics.TransformPoints(CoordinateSpace.World, srcSpace, [new(1, 1)])); 2829Point point = new(10, 10);
System\Drawing\IconConverterTests.cs (2)
115Assert.Throws<NotSupportedException>(() => _icoConv.ConvertFrom(null, CultureInfo.InvariantCulture, new Point(10, 10))); 127Assert.Throws<NotSupportedException>(() => _icoConvFrmTD.ConvertFrom(null, CultureInfo.InvariantCulture, new Point(10, 10)));
System\Drawing\ImageConverterTests.cs (2)
142Assert.Throws<NotSupportedException>(() => _imgConv.ConvertFrom(null, CultureInfo.InvariantCulture, new Point(10, 10))); 149Assert.Throws<NotSupportedException>(() => _imgConvFrmTD.ConvertFrom(null, CultureInfo.InvariantCulture, new Point(10, 10)));
System\Drawing\PenTests.cs (5)
15yield return new object[] { new LinearGradientBrush(new Point(0, 0), new Point(0, 2), Color.Purple, Color.Plum), PenType.LinearGradient }; 17yield return new object[] { new PathGradientBrush([new(1, 2), new(2, 3)]), PenType.PathGradient }; 253using LinearGradientBrush brush = new(Point.Empty, new Point(1, 2), Color.Blue, Color.Red);
System\Drawing\Printing\PrinterUnitConvertTests.cs (2)
76var converted = PrinterUnitConvert.Convert(new Point(100, 1000), fromUnit, toUnit); 77Assert.Equal(new Point(expectedX, expectedY), converted);
System\Drawing\RegionTests.cs (28)
208path4.AddCurve([new(-4194304, -4194304), new(4194304, 4194304)]); 212path5.AddPolygon([new(-4194304, -4194304), new(-4194304, 4194304), new(4194304, 4194304), new(4194304, -4194304)]); 216path6.AddPolygon([new(-4194304, -4194304), new(-4194304, 4194304), new(4194304, 4194304), new(4194304, -4194304), new(-4194304, -4194304)]); 235path.AddCurve([new(-4194304, -4194304), new(4194304, 4194304)]); 1359yield return new object[] { infiniteExclude, new Point(66, 292), true }; 1362yield return new object[] { new Region(new Rectangle(500, 30, 60, 80)), new Point(500, 29), false }; 1363yield return new object[] { new Region(new Rectangle(500, 30, 60, 80)), new Point(500, 30), true }; 1365yield return new object[] { new Region(new Rectangle(1, 1, 2, 1)), new Point(0, 1), false }; 1366yield return new object[] { new Region(new Rectangle(1, 1, 2, 1)), new Point(1, 0), false }; 1367yield return new object[] { new Region(new Rectangle(1, 1, 2, 1)), new Point(2, 0), false }; 1368yield return new object[] { new Region(new Rectangle(1, 1, 2, 1)), new Point(3, 0), false }; 1369yield return new object[] { new Region(new Rectangle(1, 1, 2, 1)), new Point(1, 1), true }; 1370yield return new object[] { new Region(new Rectangle(1, 1, 2, 1)), new Point(2, 1), true }; 1371yield return new object[] { new Region(new Rectangle(1, 1, 2, 1)), new Point(3, 1), false }; 1372yield return new object[] { new Region(new Rectangle(1, 1, 2, 1)), new Point(0, 2), false }; 1373yield return new object[] { new Region(new Rectangle(1, 1, 2, 1)), new Point(2, 2), false }; 1374yield return new object[] { new Region(new Rectangle(1, 1, 2, 1)), new Point(3, 2), false }; 1417AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.IsVisible(new Point(1, 2))); 1421AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.IsVisible(new Point(1, 2), s_graphic));
System.Drawing.Primitives (7)
System\Drawing\Point.cs (5)
113public static Point Add(Point pt, Size sz) => new Point(unchecked(pt.X + sz.Width), unchecked(pt.Y + sz.Height)); 118public static Point Subtract(Point pt, Size sz) => new Point(unchecked(pt.X - sz.Width), unchecked(pt.Y - sz.Height)); 123public static Point Ceiling(PointF value) => new Point(unchecked((int)Math.Ceiling(value.X)), unchecked((int)Math.Ceiling(value.Y))); 128public static Point Truncate(PointF value) => new Point(unchecked((int)value.X), unchecked((int)value.Y)); 133public static Point Round(PointF value) => new Point(unchecked((int)Math.Round(value.X)), unchecked((int)Math.Round(value.Y)));
System\Drawing\Rectangle.cs (1)
60readonly get => new Point(X, Y);
System\Drawing\Size.cs (1)
121public static explicit operator Point(Size size) => new Point(size.Width, size.Height);
System.Private.Windows.Core (5)
System\Private\Windows\Nrbf\SerializationRecordExtensions.cs (1)
99value = new Point(classInfo.GetInt32("x"), classInfo.GetInt32("y"));
System\Private\Windows\Ole\DragDropHelper.cs (3)
51Point point = new(e.X, e.Y); 97Point point = new(e.X, e.Y); 113Point point = new(e.X, e.Y);
Windows\Win32\Foundation\LPARAM.cs (1)
27public static explicit operator Point(LPARAM value) => new(value.SIGNEDLOWORD, value.SIGNEDHIWORD);
System.Private.Windows.Core.Tests (5)
System\Private\Windows\Ole\BinaryFormatUtilitiesTests.cs (5)
58new Point(-1, int.MaxValue), 963Location = new Point(1, 2); 1004public Point Point = new(1, 2); 1139Point = new(1, 2); 1142public Point Point { get; set; } = new(1, 2);
System.Private.Windows.Core.TestUtilities (5)
CommonTestHelper.cs (5)
82data.Add(new Point(10)); 83data.Add(new Point(1, 2)); 88data.Add(new Point(int.MaxValue, int.MinValue)); 89data.Add(new Point(-1, -2)); 103data.Add(new Size(new Point(1, 1)));
System.Windows.Forms (370)
System\Windows\Forms\Accessibility\LabelEditUiaTextProvider.cs (3)
192Point ptStart = new(rectangle.X + 1, rectangle.Y + 1); 193Point ptEnd = new(rectangle.Right - 1, rectangle.Bottom - 1); 369return new Point(PARAM.SignedLOWORD(i), PARAM.SignedHIWORD(i));
System\Windows\Forms\ActiveX\AxHost.cs (1)
1076Point phm = new(sz.Width, sz.Height);
System\Windows\Forms\ActiveX\Control.ActiveXImpl.cs (6)
361Point pt = new(PARAM.LOWORD(lpmsg->lParam), PARAM.HIWORD(lpmsg->lParam)); 459Point p1 = new(rc.left, rc.top); 460Point p2 = new(rc.right - rc.left, rc.bottom - rc.top); 769Point pt = new Point 1348private static Point PixelToHiMetric(int x, int y) => new() 1702bounds.Location = new Point(bounds.X, bounds.Y);
System\Windows\Forms\ContextMenuStrip.cs (3)
97Rectangle bounds = CalculateDropDownLocation(new Point(x, y), ToolStripDropDownDirection.AboveLeft); 101bounds = CalculateDropDownLocation(new Point(x, y), ToolStripDropDownDirection.BelowLeft); 105bounds = CalculateDropDownLocation(new Point(x, y), ToolStripDropDownDirection.AboveRight);
System\Windows\Forms\Control.cs (6)
424Location = new Point(left, top); 2489get => new(_x, _y); 8812clientOffset = new(clientOffset.X - windowRect.left, clientOffset.Y - windowRect.top); 9158Location = new Point(0, 0); 11187client = new Point(Width / 2, Height / 2); 11191client = PointToClient(new Point(x, y));
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonBaseAdapter.cs (16)
139Point p1 = new(bounds.X + bounds.Width - 1, bounds.Y); // Upper inner right 140Point p2 = new(bounds.X, bounds.Y); // Upper left 141Point p3 = new(bounds.X, bounds.Y + bounds.Height - 1); // Bottom inner left 142Point p4 = new(bounds.X + bounds.Width - 1, bounds.Y + bounds.Height - 1); // Inner bottom right 194Point p1 = new(bounds.X + bounds.Width - 1, bounds.Y); // Upper inner right 195Point p2 = new(bounds.X, bounds.Y); // Upper left 196Point p3 = new(bounds.X, bounds.Y + bounds.Height - 1); // Bottom inner left 197Point p4 = new(bounds.X + bounds.Width - 1, bounds.Y + bounds.Height - 1); // Inner bottom right 242Point p1 = new(bounds.X + bounds.Width - 1, bounds.Y); // Upper inner right 243Point p2 = new(bounds.X, bounds.Y); // Upper left 244Point p3 = new(bounds.X, bounds.Y + bounds.Height - 1); // Bottom inner left 245Point p4 = new(bounds.X + bounds.Width - 1, bounds.Y + bounds.Height - 1); // Inner bottom right 300Point p1 = new(r.Right - 1, r.Top); // Upper inner right 301Point p2 = new(r.Left, r.Top); // Upper left 302Point p3 = new(r.Left, r.Bottom - 1); // Bottom inner left 303Point p4 = new(r.Right - 1, r.Bottom - 1); // Inner bottom right
System\Windows\Forms\Controls\Buttons\ButtonInternal\CheckBoxBaseAdapter.cs (2)
268new Point(layout.CheckBounds.Left, layout.CheckBounds.Top), 283new Point(layout.CheckBounds.Left, layout.CheckBounds.Top),
System\Windows\Forms\Controls\Buttons\ButtonInternal\RadioButtonBaseAdapter.cs (25)
109hdc.DrawLine(borderPen, new(bounds.X + 4, bounds.Y + 0), new(bounds.X + 8, bounds.Y + 0)); 110hdc.DrawLine(borderPen, new(bounds.X + 4, bounds.Y + 11), new(bounds.X + 8, bounds.Y + 11)); 112hdc.DrawLine(borderPen, new(bounds.X + 2, bounds.Y + 1), new(bounds.X + 4, bounds.Y + 1)); 113hdc.DrawLine(borderPen, new(bounds.X + 8, bounds.Y + 1), new(bounds.X + 10, bounds.Y + 1)); 115hdc.DrawLine(borderPen, new(bounds.X + 2, bounds.Y + 10), new(bounds.X + 4, bounds.Y + 10)); 116hdc.DrawLine(borderPen, new(bounds.X + 8, bounds.Y + 10), new(bounds.X + 10, bounds.Y + 10)); 118hdc.DrawLine(borderPen, new(bounds.X + 0, bounds.Y + 4), new(bounds.X + 0, bounds.Y + 8)); 119hdc.DrawLine(borderPen, new(bounds.X + 11, bounds.Y + 4), new(bounds.X + 11, bounds.Y + 8)); 121hdc.DrawLine(borderPen, new(bounds.X + 1, bounds.Y + 2), new(bounds.X + 1, bounds.Y + 4)); 122hdc.DrawLine(borderPen, new(bounds.X + 1, bounds.Y + 8), new(bounds.X + 1, bounds.Y + 10)); 124hdc.DrawLine(borderPen, new(bounds.X + 10, bounds.Y + 2), new(bounds.X + 10, bounds.Y + 4)); 125hdc.DrawLine(borderPen, new(bounds.X + 10, bounds.Y + 8), new(bounds.X + 10, bounds.Y + 10)); 209new Point(check.Left, check.Top),
System\Windows\Forms\Controls\ComboBox\ComboBox.ComboBoxUiaTextProvider.cs (3)
253Point ptStart = new(rectangle.X + 1, rectangle.Y + 1); 254Point ptEnd = new(rectangle.Right - 1, rectangle.Bottom - 1); 444return new Point(PARAM.SignedLOWORD(i), PARAM.SignedHIWORD(i));
System\Windows\Forms\Controls\ComboBox\ComboBox.cs (2)
1370return new Point(0, 0); 1383return new Point(comboXMid, comboYMid);
System\Windows\Forms\Controls\ComboBox\ComboBox.FlatComboAdapter.cs (4)
148Point middle = new(dropDownRect.Left + dropDownRect.Width / 2, dropDownRect.Top + dropDownRect.Height / 2); 164new(middle.X - s_offsetPixels, middle.Y - 1), 165new(middle.X + s_offsetPixels + 1, middle.Y - 1), 166new(middle.X, middle.Y + s_offsetPixels)
System\Windows\Forms\Controls\DataGridView\DataGridView.AccessibleObject.cs (1)
160Point pt = owner.PointToClient(new Point(x, y));
System\Windows\Forms\Controls\DataGridView\DataGridView.cs (7)
471_ptCurrentCell = new Point(-1, -1); 472_ptAnchorCell = new Point(-1, -1); 473_ptMouseDownCell = new Point(-2, -2); 474_ptMouseEnteredCell = new Point(-2, -2); 475_ptToolTipCell = new Point(-1, -1); 476_ptMouseDownGridCoord = new Point(-1, -1); 2339Point ptFirstDisplayedCellAddress = new(-1, -1)
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (23)
65_ptToolTipCell = new Point(columnIndex, rowIndex); 4928return new Point(columnX + x, rowY + y); 13878Debug.Assert(CurrentCellAddress == new Point(-1, -1)); 15413newCurrentCell = new Point(columnIndexInserted <= _ptCurrentCell.X ? _ptCurrentCell.X + 1 : _ptCurrentCell.X, 15419newCurrentCell = new Point(-1, -1); 15533newCurrentCell = new Point(_ptCurrentCell.X, _ptCurrentCell.Y + insertionCount); 15554newCurrentCell = new Point(-1, -1); 15616newCurrentCell = new Point(_ptCurrentCell.X, _ptCurrentCell.Y + dataGridViewRows.Length); 15621newCurrentCell = new Point(-1, -1); 16120_ptMouseDownGridCoord = new Point(e.X, e.Y); 16337_ptToolTipCell = new Point(-1, -1); 17067newCurrentCell = new Point(newX, (newX == -1) ? -1 : _ptCurrentCell.Y); 17100newCurrentCell = new Point(-1, -1); 17251newCurrentCell = new Point(-1, -1); 17282newCurrentCell = new Point(_ptCurrentCell.X, newY); 18157Debug.Assert(CurrentCellAddress == new Point(-1, -1)); 18815Invalidate(new Rectangle(new Point(-pt.X, ColumnHeadersHeight), new Size(-step, ClientSize.Height))); 18825Invalidate(new Rectangle(new Point(ClientSize.Width - (pt.X - rect.Right) - step, ColumnHeadersHeight), 18832Invalidate(new Rectangle(new Point(0, -pt.Y), 18839Invalidate(new Rectangle(new Point(0, ColumnHeadersHeight), 19856_editingPanel.Location = new Point(Width + 1, 0); 26989AccessibilityNotifyCurrentCellChanged(new Point(_ptCurrentCell.X, _ptCurrentCell.Y)); 29969client = new Point(Width / 2, Height / 2);
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (3)
1011cellBounds = new Rectangle(new Point(0, 0), GetSize(rowIndex)); 3771editingControl.Location = new Point(editingControlBounds.X, editingControlBounds.Y); 3861DataGridView.EditingPanel.Location = new Point(xEditingPanel, yEditingPanel);
System\Windows\Forms\Controls\DataGridView\DataGridViewColumnCollection.cs (3)
167OnCollectionChanged(new CollectionChangeEventArgs(CollectionChangeAction.Add, dataGridViewColumn), false /*changeIsInsertion*/, new Point(-1, -1)); 259OnCollectionChanged(new CollectionChangeEventArgs(CollectionChangeAction.Refresh, null), false /*changeIsInsertion*/, new Point(-1, -1)); 307OnCollectionChanged(new CollectionChangeEventArgs(CollectionChangeAction.Refresh, null), false /*changeIsInsertion*/, new Point(-1, -1));
System\Windows\Forms\Controls\DataGridView\DataGridViewColumnHeaderCell.cs (4)
894Point sortGlyphLocation = new(0, 0); 945sortGlyphLocation = new Point(valBounds.Left - 955sortGlyphLocation = new Point(valBounds.Right + 997sortGlyphLocation = new Point(valBounds.Left + (valBounds.Width - s_sortGlyphWidth) / 2,
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.cs (7)
2152Point middle = new(dropRect.Left + dropRect.Width / 2, dropRect.Top + dropRect.Height / 2); 2162new(middle.X - s_offset2X, middle.Y - 1), 2163new(middle.X + s_offset2X + 1, middle.Y - 1), 2164new(middle.X, middle.Y + s_offset2Y) 2175Point middle = new(dropRect.Left + (dropRect.Width - 1) / 2, 2181Point pt1 = new(middle.X - (s_nonXPTriangleWidth - 1) / 2, middle.Y - s_nonXPTriangleHeight); 2182Point pt2 = new(middle.X + (s_nonXPTriangleWidth - 1) / 2, middle.Y - s_nonXPTriangleHeight);
System\Windows\Forms\Controls\DataGridView\DataGridViewRowCollection.cs (6)
828OnCollectionChanged(new CollectionChangeEventArgs(CollectionChangeAction.Refresh, null), 0, rowCount, true, false, recreateNewRow, new Point(-1, -1)); 1502Point newCurrentCell = new(-1, -1); 1612Point newCurrentCell = new(-1, -1); 1786Point newCurrentCell = new(-1, -1); 1911Point newCurrentCell = new(-1, -1); 2237OnCollectionChanged(new CollectionChangeEventArgs(CollectionChangeAction.Remove, dataGridViewRow), index, 1, true, false, false, new Point(-1, -1));
System\Windows\Forms\Controls\DataGridView\DataGridViewTextBoxCell.cs (1)
800DataGridView!.EditingControl!.Location = new Point(editingControlBounds.X, editingControlBounds.Y);
System\Windows\Forms\Controls\DataGridView\DataGridViewUtilities.cs (1)
355Point ptTextLocation = new(0, 0);
System\Windows\Forms\Controls\Labels\Label.cs (1)
1436Point pt = new((int)m.LParamInternal);
System\Windows\Forms\Controls\Labels\LinkLabel.LinkLabelAccessibleObject.cs (1)
64Point p = owner.PointToClient(new Point(x, y));
System\Windows\Forms\Controls\ListBoxes\CheckedListBox.cs (1)
561CheckBoxRenderer.DrawCheckBoxWithVisualStyles(e, new Point(box.X, box.Y), cbState, HWNDInternal);
System\Windows\Forms\Controls\ListView\ListView.cs (6)
3217return FindItem(true, text, isPrefixSearch, new Point(0, 0), SearchDirectionHint.Down, startIndex, includeSubItemsInSearch); 3276return FindItem(false, string.Empty, false, new Point(x, y), searchDirection, 0, false); 3488pt = new Point(x, y) 3537pt = new Point(x, y) 3724pt = new Point(x, y) 5487Point pt = new(x, y);
System\Windows\Forms\Controls\ListView\ListView.ListViewAccessibleObject.cs (1)
291Point hitTestPoint = new(x, y);
System\Windows\Forms\Controls\ListView\ListViewItem.cs (2)
33private Point _position = new(-1, -1); 1305private bool ShouldSerializePosition() => !_position.Equals(new Point(-1, -1));
System\Windows\Forms\Controls\ListView\ListViewItem.IKeyboardToolTip.cs (1)
97Point point = new(listviewBounds.X + itemBounds.X, listviewBounds.Y + itemBounds.Y);
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.cs (1)
1301pt = new Point(x, y),
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.MonthCalendarAccessibleObject.cs (1)
394Point point = owner.PointToClient(new Point(xScreen, yScreen));
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.cs (8)
1968ControlPaint.DrawReversibleLine(new Point(rc.X + i, rc.Y), new Point(rc.X + i, rc.Y + rc.Height), targetControl.BackColor); 1975ControlPaint.DrawReversibleLine(new Point(rc.X, rc.Y + i), new Point(rc.X + rc.Width, rc.Y + i), targetControl.BackColor); 2605_gridView.Location = new Point(0, 0); 2617_gridView.Location = new Point(0, _toolStrip.Height + _toolStrip.Top); 2621_gridView.Location = new Point(0, 0); 4105Point temp = new(e.X, e.Y);
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.PropertyGridAccessibleObject.cs (1)
29Point clientPoint = owningPropertyGrid.PointToClient(new Point((int)x, (int)y));
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\CommandsPane.cs (1)
224links[i] = new Point(index, name.Length);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridEntry.cs (3)
20protected static Point InvalidPoint { get; } = new(int.MinValue, int.MinValue); 1608_labelTipPoint = maxSpace <= labelWidth ? new Point(stringX + 2, rect.Y + 1) : InvalidPoint; 1940ValueToolTipLocation = doToolTip ? new Point(rect.X + 2, rect.Y - 1) : InvalidPoint;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridErrorDialog.cs (10)
127Location = new(73, 30), 136Location = new(3, 3), 148Location = new(3, 3), 161Location = new(131, 3), 173Location = new(212, 3), 187Location = new(0, 79), 210Location = new(3, 3), 229Location = new(1, 0), 250Location = new(4, 114), 320_detailsTextBox.Location = new Point(x, y);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\HelpPane.cs (4)
137_titleLabel.Location = new(_borderSize, _borderSize); 138_descriptionLabel.Location = new(_borderSize, _borderSize + _lineHeight); 239_titleLabel.Location = new(_borderSize, _borderSize); 240_descriptionLabel.Location = new(_borderSize, _borderSize + _lineHeight);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyDescriptorGridEntry.cs (1)
323return new Point(mouseX, mouseY);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (12)
23private static Point InvalidPoint { get; } = new(int.MinValue, int.MinValue); 53private static Point InvalidPosition { get; } = new(int.MinValue, int.MinValue); 91private Point _location = new(1, 1); 456Point point = PointToScreen(new(rect.X, rect.Y)); 457return new Point(point.X + (rect.Width / 2), point.Y + (rect.Height / 2)); 602Point pt = new(rect.X, rect.Y); 1102Point newOrigin = new(rect.X, rect.Y); 1157Point newOrigin = new(rect.X, rect.Y); 1419Point location = PointToScreen(new Point(0, 0)); 1658Point pt = new(RowLabel, 0); 2998_lastMouseDown = new Point(e.X, e.Y); 3801Point location = parent.PointToScreen(new(rect.left, rect.top));
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.DropDownHolder.cs (2)
397_dragStart = PointToScreen(new Point(e.X, e.Y)); 429Point dragPoint = PointToScreen(new Point(e.X, e.Y));
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.PropertyGridViewAccessibleObject.cs (1)
431Point point = new(x, y);
System\Windows\Forms\Controls\RichTextBox\RichTextBox.cs (1)
2218Point wpt = new(pt.X, pt.Y);
System\Windows\Forms\Controls\Splitter\Splitter.cs (1)
902_anchor = new Point(x, y);
System\Windows\Forms\Controls\TabControl\TabControl.cs (1)
25private static readonly Point s_defaultPaddingPoint = new(6, 3);
System\Windows\Forms\Controls\TabControl\TabControl.TabControlAccessibleObject.cs (1)
90Point point = new(x, y);
System\Windows\Forms\Controls\TextBox\TextBoxBase.cs (2)
1616return new Point(PARAM.SignedLOWORD(i), PARAM.SignedHIWORD(i)); 2067client = new Point(Width / 2, Height / 2);
System\Windows\Forms\Controls\TextBox\TextBoxBase.TextBoxBaseUiaTextProvider.cs (2)
371Point ptStart = new(rectangle.X + 1, rectangle.Y + 1); 372Point ptEnd = new(rectangle.Right - 1, rectangle.Bottom - 1);
System\Windows\Forms\Controls\ToolStrips\StatusStrip.cs (2)
584? new Point(SizeGripBounds.Left, SizeGripBounds.Bottom) 585: new Point(SizeGripBounds.Right, SizeGripBounds.Bottom);
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (32)
27internal static Point s_invalidMouseEnter = new(int.MaxValue, int.MaxValue); 2139Point midPointOfCurrent = new(selectedItem.Bounds.X + selectedItem.Width / 2, 2163Point otherItemMidLocation = new(otherItem.Bounds.X + otherItem.Width / 2, (down) ? otherItem.Bounds.Top : otherItem.Bounds.Bottom); 2603ToolStripLocationCancelEventArgs cae = new(new Point(x, y), false); 3330Point itemRelativePoint = item.TranslatePoint(new Point(mea.X, mea.Y), ToolStripPointType.ToolStripCoords, ToolStripPointType.ToolStripItemCoords); 3386Point itemRelativePoint = item!.TranslatePoint(new Point(mea.X, mea.Y), ToolStripPointType.ToolStripCoords, ToolStripPointType.ToolStripItemCoords); 3430Point itemRelativePoint = item.TranslatePoint(new Point(mea.X, mea.Y), ToolStripPointType.ToolStripCoords, ToolStripPointType.ToolStripItemCoords); 3795new(verticalBeamStart, _lastInsertionMarkRect.Y), new(verticalBeamStart, _lastInsertionMarkRect.Bottom - 1), 3796new(verticalBeamStart + 1, _lastInsertionMarkRect.Y), new(verticalBeamStart + 1, _lastInsertionMarkRect.Bottom - 1) 3802new(start, _lastInsertionMarkRect.Bottom - 1), new(start + widthOfBeam - 1, _lastInsertionMarkRect.Bottom - 1), 3803new(start + 1, _lastInsertionMarkRect.Bottom - 2), new(start + widthOfBeam - 2, _lastInsertionMarkRect.Bottom - 2) 3809new(start, _lastInsertionMarkRect.Y), new(start + widthOfBeam - 1, _lastInsertionMarkRect.Y), 3810new(start + 1, _lastInsertionMarkRect.Y + 1), new(start + widthOfBeam - 2, _lastInsertionMarkRect.Y + 1) 3822new(_lastInsertionMarkRect.X, horizontalBeamStart), new(_lastInsertionMarkRect.Right - 1, horizontalBeamStart), 3823new(_lastInsertionMarkRect.X, horizontalBeamStart + 1), new(_lastInsertionMarkRect.Right - 1, horizontalBeamStart + 1) 3829new(_lastInsertionMarkRect.X, start), new(_lastInsertionMarkRect.X, start + widthOfBeam - 1), 3830new(_lastInsertionMarkRect.X + 1, start + 1), new(_lastInsertionMarkRect.X + 1, start + widthOfBeam - 2) 3836new(_lastInsertionMarkRect.Right - 1, start), new(_lastInsertionMarkRect.Right - 1, start + widthOfBeam - 1), 3837new(_lastInsertionMarkRect.Right - 2, start + 1), new(_lastInsertionMarkRect.Right - 2, start + widthOfBeam - 2) 3871public ToolStripItem? GetItemAt(int x, int y) => GetItemAt(new Point(x, y));
System\Windows\Forms\Controls\ToolStrips\ToolStrip.ToolStripAccessibleObject.cs (1)
29Point clientHit = owner.PointToClient(new Point(x, y));
System\Windows\Forms\Controls\ToolStrips\ToolStripComboBox.ToolStripComboBoxControl.ToolStripComboBoxFlatComboAdapter.cs (4)
142Point middle = new(dropDownRect.Left + dropDownRect.Width / 2, dropDownRect.Top + dropDownRect.Height / 2); 150new(middle.X - s_offsetPixels, middle.Y - 1), 151new(middle.X + s_offsetPixels + 1, middle.Y - 1), 152new(middle.X, middle.Y + s_offsetPixels)
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDown.cs (4)
21private Point _displayLocation = new(0, 0); 1040dropDownBounds.Location = new Point(start.X + offset.X, start.Y + offset.Y); 1841Show(control, new Point(x, y)); 1862_displayLocation = new Point(x, y);
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownItem.cs (1)
336dropDownBounds.Location = new Point(itemScreenLocation.X + offset.X, itemScreenLocation.Y + offset.Y);
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownMenu.cs (5)
363nextPoint = new Point(_checkPadding.Left, _checkPadding.Top); 378nextPoint = new Point(1, _checkPadding.Top); 398nextPoint = new Point(1, _checkPadding.Top); 796Point upLocation = new(1, 0); 803Point downLocation = new(1, height - downSize.Height);
System\Windows\Forms\Controls\ToolStrips\ToolStripDropTargetManager.cs (1)
57return _owner.GetItemAt(_owner.PointToClient(new Point(x, y)));
System\Windows\Forms\Controls\ToolStrips\ToolStripGrip.cs (3)
120_startLocation = TranslatePoint(new Point(mea.X, mea.Y), ToolStripPointType.ToolStripItemCoords, ToolStripPointType.ScreenCoords); 160Point endLocation = TranslatePoint(new Point(mea.X, mea.Y), ToolStripPointType.ToolStripItemCoords, ToolStripPointType.ScreenCoords); 217Point endLocation = TranslatePoint(new Point(mea.X, mea.Y), ToolStripPointType.ToolStripItemCoords, ToolStripPointType.ScreenCoords);
System\Windows\Forms\Controls\ToolStrips\ToolStripPanel.cs (7)
423return new Point(toolStripToDrag.Right, toolStripToDrag.Top); 529controlLocations[j] = new Point(row.Bounds.Width - control.Right, control.Top); 731location = new Point(0, dragRect.Bottom - 1); 735location = new Point(dragRect.Right - 1, 0); 743Join(toolStripToDrag, new Point(x, y)); 894Point endLocation = (Orientation == Orientation.Horizontal) ? new Point(clientLocation.X, row.Bounds.Y) : new Point(row.Bounds.X, clientLocation.Y);
System\Windows\Forms\Controls\ToolStrips\ToolstripProfessionalRenderer.cs (22)
854Point topRight = new(bounds.Width - 1, 0); 855Point bottomLeft = new(0, bounds.Height - 1); 856Point bottomRight = new(bounds.Width - 1, bounds.Height - 1); 1270Point start = new(overflowBoundsFill.Left - 1, overflowBoundsFill.Height - 2); 1271Point end = new(overflowBoundsFill.Left, overflowBoundsFill.Height - 2); 1298Point top1 = new(overflowBoundsFill.X - 2, 0); 1299Point top2 = new(overflowBoundsFill.X - 1, 1); 1345Point topRight = new(bounds.Width - 1, 0); 1346Point bottomLeft = new(0, bounds.Height - 1); 1648Point middle = new(dropDownRect.Left + dropDownRect.Width / 2, dropDownRect.Top + dropDownRect.Height / 2); 1657new(middle.X - Offset2X, middle.Y + 1), 1658new(middle.X + Offset2X + 1, middle.Y + 1), 1659new(middle.X, middle.Y - Offset2Y) 1663new(middle.X + Offset2X, middle.Y - Offset2Y - 1), 1664new(middle.X + Offset2X, middle.Y + Offset2Y + 1), 1665new(middle.X - 1, middle.Y) 1669new(middle.X - Offset2X, middle.Y - Offset2Y - 1), 1670new(middle.X - Offset2X, middle.Y + Offset2Y + 1), 1671new(middle.X + 1, middle.Y) 1675new(middle.X - Offset2X, middle.Y - 1), 1676new(middle.X + Offset2X + 1, middle.Y - 1), 1677new(middle.X, middle.Y + Offset2Y)
System\Windows\Forms\Controls\ToolStrips\ToolStripRenderer.cs (13)
641Point middle = new( 671arrow[0] = new(middle.X - Offset2X, middle.Y + 1); 672arrow[1] = new(middle.X + Offset2X + 1, middle.Y + 1); 673arrow[2] = new(middle.X, middle.Y - Offset2Y); 677arrow[0] = new(middle.X + Offset2X, middle.Y - s_offset4Y); 678arrow[1] = new(middle.X + Offset2X, middle.Y + s_offset4Y); 679arrow[2] = new(middle.X - horizontalOffset, middle.Y); 683arrow[0] = new(middle.X - Offset2X, middle.Y - s_offset4Y); 684arrow[1] = new(middle.X - Offset2X, middle.Y + s_offset4Y); 685arrow[2] = new(middle.X + horizontalOffset, middle.Y); 689arrow[0] = new(middle.X - Offset2X, middle.Y - 1); 690arrow[1] = new(middle.X + Offset2X + 1, middle.Y - 1); 691arrow[2] = new(middle.X, middle.Y + Offset2Y);
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitButton.cs (1)
466Point clickPoint = new(e.X, e.Y);
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitStackDragDropHandler.cs (3)
26ShowItemDropPoint(_owner.PointToClient(new Point(e.X, e.Y))); 40OnDropItem(item, _owner.PointToClient(new Point(e.X, e.Y))); 48if (ShowItemDropPoint(_owner.PointToClient(new Point(e.X, e.Y))))
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitStackLayout.cs (2)
320Point itemLocation = new(x, y); 452Point itemLocation = new(x, y);
System\Windows\Forms\Controls\ToolStrips\ToolStripSystemDarkModeRenderer.cs (13)
443Point middle = new( 480new Point(middle.X - 2, middle.Y + 1), 481new Point(middle.X + 3, middle.Y + 1), 482new Point(middle.X, middle.Y - 2) 486new Point(middle.X + 2, middle.Y - 4), 487new Point(middle.X + 2, middle.Y + 4), 488new Point(middle.X - 2, middle.Y) 492new Point(middle.X - 2, middle.Y - 4), 493new Point(middle.X - 2, middle.Y + 4), 494new Point(middle.X + 2, middle.Y) 498new Point(middle.X - 2, middle.Y - 1), 499new Point(middle.X + 3, middle.Y - 1), 500new Point(middle.X, middle.Y + 2)
System\Windows\Forms\Controls\TrackBar\TrackBar.TrackBarAccessibleObject.cs (1)
107Point point = new(x, y);
System\Windows\Forms\Controls\TreeView\TreeView.cs (4)
1642pt = new Point(x, y) 1683pt = new Point(x, y) 2829Point textLoc = new(AppContextSwitches.MoveTreeViewTextLocationOnePixel ? bounds.X : bounds.X - 1, bounds.Y); 3431client = new Point(treeNode.Bounds.X, treeNode.Bounds.Y + treeNode.Bounds.Height / 2);
System\Windows\Forms\Controls\TreeView\TreeView.TreeViewAccessibleObject.cs (1)
64Point p = owningTreeView.PointToClient(new Point(x, y));
System\Windows\Forms\Controls\UpDown\UpDownBase.UpDownButtons.cs (2)
320Point pt1 = new(clientRect.Left, clientRect.Bottom - 1); 321Point pt2 = new(clientRect.Right, clientRect.Bottom - 1);
System\Windows\Forms\Controls\WebBrowser\HtmlElementEventArgs.cs (3)
50get => new(NativeHTMLEventObj.GetClientX(), NativeHTMLEventObj.GetClientY()); 55get => new(NativeHTMLEventObj.GetOffsetX(), NativeHTMLEventObj.GetOffsetY()); 60get => new(NativeHTMLEventObj.GetX(), NativeHTMLEventObj.GetY());
System\Windows\Forms\Controls\WebBrowser\HtmlWindow.cs (1)
176return new(x, y);
System\Windows\Forms\Controls\WebBrowser\WebBrowser.cs (1)
1355client = new Point(Width / 2, Height / 2);
System\Windows\Forms\Controls\WebBrowser\WebBrowserBase.cs (1)
1112Point phm = new(sz.Width, sz.Height);
System\Windows\Forms\Dialogs\ThreadExceptionDialog.cs (1)
256_pictureBox.Location = new Point(_scaledPictureWidth / 8, _scaledPictureHeight / 8);
System\Windows\Forms\Form.cs (2)
4414Point pointToSnap = new(button.Left + button.Width / 2, button.Top + button.Height / 2); 5424Location = new Point(workingArea.X + x, workingArea.Y + y);
System\Windows\Forms\Input\Cursor.cs (1)
173return new Point((int)info.xHotspot, (int)info.yHotspot);
System\Windows\Forms\Input\MouseEventArgs.cs (1)
64public Point Location => new(X, Y);
System\Windows\Forms\Internal\WinFormsUtils.cs (1)
29return new Point(PARAM.SignedLOWORD(lastXY), PARAM.SignedHIWORD(lastXY));
System\Windows\Forms\Layout\Containers\SplitContainer.cs (20)
1645Panel2.Location = new Point(Panel1.WidthInternal + SplitterWidthInternal, 0); 1649Panel1.Location = new Point(Width - Panel1.WidthInternal, 0); 1660Panel2.Location = new Point(0, 0); 1665Panel1.Location = new Point(0, 0); 1680Panel2.Location = new Point(0, panel2Start); 1690Panel2.Location = new Point(0, panel2Start); 1705Panel2.Location = new Point(0, panel2Start); 1716Panel2.Location = new Point(0, 0); 1721Panel1.Location = new Point(0, 0); 2091_anchor = new Point(x, y); 2182Panel1.Location = new Point(0, 0); 2183Panel2.Location = new Point(_splitterDistance + SplitterWidthInternal, 0); 2187Panel1.Location = new Point(Width - _splitterDistance, 0); 2188Panel2.Location = new Point(0, 0); 2203Panel2.Location = new Point(0, 0); 2208Panel1.Location = new Point(0, 0); 2223Panel1.Location = new Point(0, 0); 2229Panel2.Location = new Point(0, panel2Start); 2244Panel2.Location = new Point(0, 0); 2249Panel1.Location = new Point(0, 0);
System\Windows\Forms\Layout\FlowLayout.ContainerProxy.cs (2)
67Point pt = new(value.X, value.Y); 145Point pt = new(newBounds.X, newBounds.Y);
System\Windows\Forms\Layout\FlowLayout.cs (1)
25Rectangle measureBounds = new(new Point(0, 0), proposedConstraints);
System\Windows\Forms\Printing\PrintControllerWithStatusDialog.StatusDialog.cs (3)
38Location = new Point(8, 16), 50Location = new Point(88, 88), 61Location = new Point(0, 0),
System\Windows\Forms\Printing\PrintPreviewControl.cs (3)
35private Point _position = new(0, 0); 477_screenDPI = new Point( 625Point offset = new(
System\Windows\Forms\Printing\PrintPreviewDialog.cs (1)
911_previewControl.Location = new Point(0, 43);
System\Windows\Forms\Rendering\ControlPaint.cs (3)
488new Point(imageRect.X - imageRectangle.X, imageRect.Y - imageRectangle.Y), 1671Point start = new(bounds.X + bounds.Width - 1, bounds.Y - 1); 1672Point end = new(bounds.X + bounds.Width - 1, bounds.Y + bounds.Height);
System\Windows\Forms\Scrolling\ScrollableControl.cs (2)
120return new Point(rect.X, rect.Y); 895return new Point(xCalc, yCalc);
System\Windows\Forms\Scrolling\ScrollBar.ScrollBarAccessibleObject.cs (1)
91Point point = new(x, y);
System\Windows\Forms\ToolTip\ToolTip.cs (7)
1414SetTool(window, text, TipInfo.Type.Absolute, new Point(pointX, pointY)); 1433SetTool(window, text, TipInfo.Type.Absolute, new Point(pointX, pointY)); 1451SetTool(window, text, TipInfo.Type.Absolute, new Point(pointX, pointY)); 1469SetTool(window, text, TipInfo.Type.Absolute, new Point(pointX, pointY)); 1490SetTool(ownerWindow, text, TipInfo.Type.Absolute, new Point(pointX, pointY)); 1505tipInfo.Position = new Point(pointX, pointY); 1630return new Point(optimalLocation.Left, optimalLocation.Top);
System.Windows.Forms.Design (151)
System\ComponentModel\Design\CollectionEditor.SplitButton.cs (4)
244Point middle = new( 252new(middle.X - s_offset2X, middle.Y - 1), 253new(middle.X + s_offset2X + 1, middle.Y - 1), 254new(middle.X, middle.Y + s_offset2Y)
System\ComponentModel\Design\DesignerActionPanel.CheckBoxPropertyLine.cs (1)
39_checkBox.Location = new Point(LineLeftMargin, top + LineVerticalPadding / 2);
System\ComponentModel\Design\DesignerActionPanel.cs (1)
345return new Point(x, y);
System\ComponentModel\Design\DesignerActionPanel.EditorPropertyLine.cs (2)
174_button.Location = new Point(EditRegionLocation.X + EditRegionSize.Width - buttonHeight - EditorLineButtonPadding, EditRegionLocation.Y + EditorLineButtonPadding + 1); 297g.DrawImage(_swatch, new Point(EditRegionRelativeLocation.X + 2, EditorLineSwatchPadding + 5));
System\ComponentModel\Design\DesignerActionPanel.MethodLine.cs (1)
48_linkLabel.Location = new Point(LineLeftMargin, top + LineVerticalPadding / 2);
System\ComponentModel\Design\DesignerActionPanel.PanelHeaderLine.cs (2)
65_titleLabel.Location = new Point(LineLeftMargin, top + PanelHeaderVerticalPadding); 68_subtitleLabel.Location = new Point(LineLeftMargin, top + PanelHeaderVerticalPadding * 2 + titleSize.Height);
System\ComponentModel\Design\DesignerActionPanel.TextBoxPropertyLine.cs (6)
105_editRegionLocation = new Point(editRegionXPos, top + TextBoxTopPadding); 106EditRegionRelativeLocation = new Point(editRegionXPos, TextBoxTopPadding); 109_label.Location = new Point(LineLeftMargin, top); 114EditControl!.Location = new Point(_editRegionLocation.X + GetTextBoxLeftPadding(textBoxPreferredHeight) + 1 + specialPadding, _editRegionLocation.Y + TextBoxLineInnerPadding + 1); 137_textBox.Location = new Point(int.MaxValue, int.MaxValue); 144_readOnlyTextBoxLabel.Location = new Point(int.MaxValue, int.MaxValue);
System\ComponentModel\Design\DesignerActionPanel.TextLine.cs (1)
43_label.Location = new Point(LineLeftMargin, top + LineVerticalPadding / 2);
System\ComponentModel\Design\DesignerActionUI.cs (1)
665Point glyphLocationScreenCoord = new(0, 0);
System\Drawing\Design\ColorEditor.ColorPalette.ColorPaletteAccessibleObject.ColorCellAccessibleObject.cs (1)
36Point pt = new(rect.X, rect.Y);
System\Drawing\Design\ColorEditor.ColorPalette.ColorPaletteAccessibleObject.cs (1)
43Point point = palette.PointToClient(new(x, y));
System\Drawing\Design\ColorEditor.ColorPalette.cs (5)
137return new Point(x, y); 165return new Point(-1, -1); 172return new Point(-1, -1); 175return new Point(across, down); 196return new Point(x, y);
System\Drawing\Design\ColorEditor.ColorUI.cs (1)
318_pal.Location = new Point(0, rectTabControl.Y);
System\Drawing\Design\ContentAlignmentEditor.ContentUI.cs (8)
225_topCenter.Location = new Point(pixel_32, 0); 228_topRight.Location = new Point(pixel_99, 0); 231_middleLeft.Location = new Point(0, pixel_32); 234_middleCenter.Location = new Point(pixel_32, pixel_32); 237_middleRight.Location = new Point(pixel_99, pixel_32); 240_bottomLeft.Location = new Point(0, pixel_64); 243_bottomCenter.Location = new Point(pixel_32, pixel_64); 246_bottomRight.Location = new Point(pixel_99, pixel_64);
System\Windows\Forms\Design\AnchorEditor.AnchorUI.cs (6)
79_container.Location = new Point(0, 0); 83_control.Location = new Point(30, 30); 87_right.Location = new Point(60, 40); 94_left.Location = new Point(XBORDER, 40); 101_top.Location = new Point(40, YBORDER); 108_bottom.Location = new Point(40, 60);
System\Windows\Forms\Design\Behavior\BehaviorService.AdornerWindow.cs (1)
345Point mouseLoc = new(x, y);
System\Windows\Forms\Design\Behavior\BehaviorService.AdornerWindow.MouseHook.cs (1)
179Point pt = adornerWindow.PointToClient(new Point(x, y));
System\Windows\Forms\Design\Behavior\BehaviorService.cs (2)
260public Point AdornerWindowToScreen() => AdornerWindowPointToScreen(new Point(0, 0)); 272Point pt = new(c.Left, c.Top);
System\Windows\Forms\Design\Behavior\DragAssistanceManager.cs (2)
1100_dragOffset = new Point(dragBounds.X - _dragOffset.X, dragBounds.Y - _dragOffset.Y); 1143Point snapPoint = new(_snapPointX != INVALID_VALUE ? _snapPointX : 0, _snapPointY != INVALID_VALUE ? _snapPointY : 0);
System\Windows\Forms\Design\Behavior\DropSourceBehavior.cs (9)
113_lastFeedbackLocation = new Point(-1, -1); 143Point controlLocation = new(dragLoc.X - _parentLocation.X, dragLoc.Y - _parentLocation.Y); 271Point pt = new(dropPoint.X, dropPoint.Y); 493Point dropPoint = new(initialDropPoint.X + _dragComponents[i].positionOffset.X, 588_lastFeedbackLocation = new Point(-1, -1); 739Point newPosition = new(mouseLoc.X - _initialMouseLoc.X + _dragComponents[_primaryComponentIndex].originalControlLocation.X, 788newPosition = new Point(mouseLoc.X - _initialMouseLoc.X + _originalDragImageLocation.X, 948_dragComponents[i].positionOffset = new Point(dragControl.Location.X - primaryControl.Location.X, 1045_originalDragImageLocation = new Point(_dragImageRect.X, _dragImageRect.Y);
System\Windows\Forms\Design\Behavior\ResizeBehavior.cs (2)
482Point mouseLocAbs = new(mouseLoc.X, mouseLoc.Y); 547_lastMouseAbs = new Point(mouseLoc.X, mouseLoc.Y);
System\Windows\Forms\Design\Behavior\ToolboxItemSnapLineBehavior.cs (2)
259ToolboxSnapDragDropEventArgs se = CreateToolboxSnapArgs(e, new Point(e.X - screenOffset.X, e.Y - screenOffset.Y)); 345Point adornerServiceOrigin = _behaviorService.MapAdornerWindowPoint(baseControl.Handle, new Point(0, 0));
System\Windows\Forms\Design\CommandSet.cs (3)
813Point snappedOffset = dragManager.OffsetToNearestSnapLocation(primaryControl, new Point(moveOffsetX, moveOffsetY)); 3278Point offset = new(-min.X, -min.Y); 3291Point parentOffset = new(parentSize.Width / 2, parentSize.Height / 2);
System\Windows\Forms\Design\ComponentTray.cs (20)
27private static Point InvalidPoint { get; } = new(int.MinValue, int.MinValue); 365AutoScrollPosition = new Point(0, 0); 604SetTrayLocation(comp, new Point(tc.Location.X - _autoScrollPosBeforeDragging.X, tc.Location.Y - _autoScrollPosBeforeDragging.Y)); 608AutoScrollPosition = new Point(-_autoScrollPosBeforeDragging.X, -_autoScrollPosBeforeDragging.Y); 994return new Point(loc.X - autoScrollLoc.X, loc.Y - autoScrollLoc.Y); 1069_mouseDropLocation = PointToClient(new Point(de.X, de.Y)); 1242_mouseDropLocation = new Point(e.X, e.Y); 1265_mouseDragStart = new Point(e.X, e.Y); 1308_mouseDragEnd = new Point(0, 0); 1575location = new Point(location.X + autoScrollLoc.X, location.Y + autoScrollLoc.Y); 1824_whiteSpace = new Point(_selectionUISvc.GetAdornmentDimensions(AdornmentType.GrabHandle)); 1832Point newLoc = new(display.X + _whiteSpace.X, display.Y + _whiteSpace.Y); 1844newLoc = new Point(newLoc.X - autoScrollLoc.X, newLoc.Y - autoScrollLoc.Y); 1860Point newLoc = new(bounds.X + bounds.Width + _whiteSpace.X, bounds.Y); 1879newLoc = new Point(newLoc.X - autoScrollLoc.X, newLoc.Y - autoScrollLoc.Y); 2161_mouseDragLast = PointToScreen(new Point(me.X, me.Y)); 2194Point newPt = PointToScreen(new Point(me.X, me.Y)); 2691return _hitTestedGlyph.Behavior.OnMouseDoubleClick(_hitTestedGlyph, e.Button, new Point(e.X, e.Y)); 2705return _hitTestedGlyph.Behavior.OnMouseDown(_hitTestedGlyph, e.Button, new Point(e.X, e.Y)); 2719return _hitTestedGlyph.Behavior.OnMouseMove(_hitTestedGlyph, e.Button, new Point(e.X, e.Y));
System\Windows\Forms\Design\ControlCommandSet.cs (1)
634Point snappedOffset = dragManager.OffsetToNearestSnapLocation(primaryControl, targetSnaplines, new Point(moveOffsetX, moveOffsetY));
System\Windows\Forms\Design\ControlDesigner.cs (3)
20protected static readonly Point InvalidPoint = new(int.MinValue, int.MinValue); 301return new Point(Math.Abs(nativeOffset.X - offset.X), nativeOffset.Y - offset.Y); 1321_mouseDragLast = new Point(x, y);
System\Windows\Forms\Design\ControlDesigner.TransparentBehavior.cs (1)
71if (e is not null && _controlRect != Rectangle.Empty && !_controlRect.Contains(new Point(e.X, e.Y)))
System\Windows\Forms\Design\DesignBindingPicker.cs (2)
1750Point pt = new(e.X, e.Y); 2071TreeViewHitTestInfo treeViewHitTestInfo = HitTest(new Point(e.X, e.Y));
System\Windows\Forms\Design\DesignerFrame.cs (1)
166_designer!.Location = new Point(selectionSize.Width, selectionSize.Height);
System\Windows\Forms\Design\DesignerUtils.cs (1)
159return new Point(PARAM.SignedLOWORD(lastXY), PARAM.SignedHIWORD(lastXY));
System\Windows\Forms\Design\DockEditor.DockUI.cs (1)
194_container.Location = new Point(scaledOffset, scaledOffset);
System\Windows\Forms\Design\DocumentDesigner.cs (1)
773Location = new Point(0, 0);
System\Windows\Forms\Design\FlowLayoutPanelDesigner .cs (17)
396ReDrawIBar(new Point(bounds.Left, bounds.Top), new Point(bounds.Left, bounds.Bottom)); 399ReDrawIBar(new Point(bounds.Right, bounds.Top), new Point(bounds.Right, bounds.Bottom)); 402ReDrawIBar(new Point(bounds.Left, bounds.Top), new Point(bounds.Right, bounds.Top)); 405ReDrawIBar(new Point(bounds.Left, bounds.Bottom), new Point(bounds.Right, bounds.Bottom)); 415ReDrawIBar(new Point(bounds.Right, bounds.Top), new Point(bounds.Right, bounds.Bottom)); 418ReDrawIBar(new Point(bounds.Left, bounds.Top), new Point(bounds.Left, bounds.Bottom)); 421ReDrawIBar(new Point(bounds.Left, bounds.Bottom), new Point(bounds.Right, bounds.Bottom)); 424ReDrawIBar(new Point(bounds.Left, bounds.Top), new Point(bounds.Right, bounds.Top)); 790Point mouseLocation = new(de.X, de.Y);
System\Windows\Forms\Design\FormatStringDialog.cs (3)
174_formatControl1.Location = new Drawing.Point(10, 10); 182_cancelButton.Location = new Drawing.Point(299, 288); 192_okButton.Location = new Drawing.Point(203, 288);
System\Windows\Forms\Design\GroupBoxDesigner.cs (1)
27return new Point(gb.DisplayRectangle.X, gb.DisplayRectangle.Y);
System\Windows\Forms\Design\OleDragDropHandler.cs (6)
191defaultValues["Location"] = new Point(x, y); 463_dragBase = new Point(initialX, initialY); 465c.PointToClient(new Point(initialX, initialY)); 758Point dropPt = Destination.GetDesignerControl().PointToClient(new Point(de.X, de.Y)); 965Point convertedPoint = Destination.GetDesignerControl().PointToClient(new Point(de.X, de.Y)); 968Point newOffset = _forceDrawFrames ? convertedPoint : new Point(de.X - _dragBase.X, de.Y - _dragBase.Y);
System\Windows\Forms\Design\ParentControlDesigner.cs (10)
111protected virtual Point DefaultControlLocation => new(0, 0); 576Point pt = new(bounds.X, bounds.Y); 1121return new Point(r.X, r.Y); 1139Point halfGrid = new(gridSize.Width / 2, gridSize.Height / 2); 1433CreateTool(_mouseDragTool, new Point(de.X, de.Y)); 1729_mouseDragBase = new Point(x, y); 1823Point location = new(baseVar.X, baseVar.Y); 2014Point offset = new(_mouseDragOffset.X, _mouseDragOffset.Y); 2191newLoc = new Point(controlLoc.X - parentLoc.X, controlLoc.Y - parentLoc.Y); 2196newLoc = new Point(controlLoc.X + oldParentLoc.X, controlLoc.Y + oldParentLoc.Y);
System\Windows\Forms\Design\SelectionUIService.cs (4)
25private static readonly Point s_invalidPoint = new(int.MinValue, int.MinValue); 519Point anchor = PointToScreen(new Point(me.X, me.Y)); 606Point screenCoord = PointToScreen(new Point(me.X, me.Y)); 718Point screenCoord = PointToScreen(new Point(me.X, me.Y));
System\Windows\Forms\Design\SplitterPanelDesigner.cs (1)
194TextRenderer.DrawText(g, name, drawFont, new Point(watermarkX, watermarkY), waterMarkTextColor, TextFormatFlags.PreserveGraphicsClipping | TextFormatFlags.PreserveGraphicsTranslateTransform);
System\Windows\Forms\Design\TabControlDesigner.cs (1)
568Point dropPoint = Control.PointToClient(new Point(de.X, de.Y));
System\Windows\Forms\Design\TableLayoutPanelDesigner.cs (3)
972Point position = new(-1, -1); 1056return new Point(pos.Column, pos.Row); 1295Point cell = GetCellPosition(new Point(x, y));
System\Windows\Forms\Design\ToolStripAdornerWindowService.cs (2)
98public Point AdornerWindowToScreen() => AdornerWindowPointToScreen(new Point(0, 0)); 110Point pt = new(c.Left, c.Top);
System\Windows\Forms\Design\ToolStripDesigner.cs (1)
1848Point offset = new(de.X, de.Y);
System\Windows\Forms\Design\ToolStripEditorManager.cs (1)
131Location = new Point(bounds.X, bounds.Y);
System\Windows\Forms\Design\ToolStripItemBehavior.cs (2)
982parentDesigner.DragBoxFromMouseDown = _dragBoxFromMouseDown = new Rectangle(new Point(mouseLoc.X - (dragSize.Width / 2), mouseLoc.Y - (dragSize.Height / 2)), dragSize); 1005ownerItemDesigner._dragBoxFromMouseDown = _dragBoxFromMouseDown = new Rectangle(new Point(mouseLoc.X - (dragSize.Width / 2), mouseLoc.Y - (dragSize.Height / 2)), dragSize);
System\Windows\Forms\Design\ToolStripItemDesigner.cs (1)
1317newPoint = behaviorService.ScreenToAdornerWindow(new Point(x, y));
System\Windows\Forms\Design\ToolStripKeyboardHandlingService.cs (1)
507node.ShowContextMenu(new Point(x, y));
System\Windows\Forms\Design\ToolStripMenuItemDesigner.cs (1)
1376dropDownItem.DropDown.Location = new Point(dropDownItem.DropDown.Location.X + _commitedEditorNode.Bounds.Width - dropDownItem.Bounds.Width, dropDownItem.DropDown.Location.Y);
System\Windows\Forms\Design\TreeNodeCollectionEditor.cs (2)
528Point position = new Point(0, 0) 571Point position = new Point(0, 0)
System.Windows.Forms.Design.Tests (14)
System\Windows\Forms\Design\ListViewDesignerTests.cs (4)
41bool result = _listViewDesigner.TestAccessor().Dynamic.GetHitTest(new Point(10, 10)); 52bool result = _listViewDesigner.TestAccessor().Dynamic.GetHitTest(new Point(10, 10)); 63Point point = new(10, 5); 75Point outsidePoint = new(-10, -10);
System\Windows\Forms\Design\ParentControlDesignerTests.cs (1)
125{ "Location", new Point(10, 10) },
System\Windows\Forms\Design\StatusCommandUITests.cs (4)
82Point location = new(50, 60); 90Point location = new(50, 60); 98Point location = new(50, 60); 114_statusCommandUI.SetStatusInformation(null, new Point(10, 10));
System\Windows\Forms\Design\ToolStripAdornerWindowServiceTests.cs (4)
97Point point = new(10, 20); 99Point expectedScreenPoint = new(18, 51); 108Point expectedScreenPoint = new(8, 31); 119Point expectedPoint = new(40, 60);
System\Windows\Forms\Design\ToolStripEditorManagerTests.cs (1)
179VerifyProperty(nameof(Location), _toolStripEditorControl, new Point(_bounds.X, _bounds.Y));
System.Windows.Forms.Primitives (3)
System\Windows\Forms\Automation\UiaTextRange.cs (1)
382Point mapClientToScreen = new((int)ownerBounds[0], (int)ownerBounds[1]);
Windows\Win32\Foundation\Interop.PARAM.cs (1)
72=> new(SignedLOWORD(param), SignedHIWORD(param));
Windows\Win32\UI\Accessibility\UiaPoint.cs (1)
10public static implicit operator Point(UiaPoint value) => new((int)value.x, (int)value.y);
System.Windows.Forms.Primitives.Tests (55)
System\SpanReaderTests.cs (4)
103value.Should().Be(new Point(1, 2)); 106value.Should().Be(new Point(3, 4)); 120value.ToArray().Should().BeEquivalentTo([new Point(1, 2), new Point(3, 4)]);
System\SpanWriterTests.cs (15)
76writer.TryWriteCount(2, new Point(1, 2)).Should().BeTrue(); 77span.ToArray().Should().BeEquivalentTo([new Point(1, 2), new Point(1, 2), default, default, default]); 79writer.TryWriteCount(2, new Point(3, 4)).Should().BeTrue(); 80span.ToArray().Should().BeEquivalentTo([new Point(1, 2), new Point(1, 2), new Point(3, 4), new Point(3, 4), default]); 82writer.TryWriteCount(1, new Point(5, 6)).Should().BeTrue(); 83span.ToArray().Should().BeEquivalentTo([new Point(1, 2), new Point(1, 2), new Point(3, 4), new Point(3, 4), new Point(5, 6)]); 85writer.TryWriteCount(1, new Point(7, 8)).Should().BeFalse();
System\Windows\Forms\Automation\UiaTextRangeTests.cs (28)
658providerMock.Setup(m => m.GetPositionFromChar(3)).Returns(new Point(17, 0)); 659providerMock.Setup(m => m.GetPositionFromChar(0)).Returns(new Point(1, 0)); 660providerMock.Setup(m => m.GetPositionFromCharForUpperRightCorner(5, testText)).Returns(new Point(28, 0)); 661providerMock.Setup(m => m.GetPositionFromCharForUpperRightCorner(1, testText)).Returns(new Point(17, 0)); 727providerMock.Setup(m => m.GetPositionFromChar(0)).Returns(new Point(5, 1)); 728providerMock.Setup(m => m.GetPositionFromChar(16)).Returns(new Point(5, 18)); 729providerMock.Setup(m => m.GetPositionFromChar(23)).Returns(new Point(45, 18)); 730providerMock.Setup(m => m.GetPositionFromChar(31)).Returns(new Point(5, 35)); 731providerMock.Setup(m => m.GetPositionFromChar(46)).Returns(new Point(5, 52)); 732providerMock.Setup(m => m.GetPositionFromChar(58)).Returns(new Point(5, 69)); 734providerMock.Setup(m => m.GetPositionFromCharForUpperRightCorner(15, testText)).Returns(new Point(108, 1)); 735providerMock.Setup(m => m.GetPositionFromCharForUpperRightCorner(30, testText)).Returns(new Point(90, 18)); 736providerMock.Setup(m => m.GetPositionFromCharForUpperRightCorner(45, testText)).Returns(new Point(88, 35)); 737providerMock.Setup(m => m.GetPositionFromCharForUpperRightCorner(52, testText)).Returns(new Point(61, 52)); 738providerMock.Setup(m => m.GetPositionFromCharForUpperRightCorner(57, testText)).Returns(new Point(95, 52)); 739providerMock.Setup(m => m.GetPositionFromCharForUpperRightCorner(62, testText)).Returns(new Point(45, 69)); 809providerMock.Setup(m => m.GetPositionFromChar(0)).Returns(new Point(22, 1)); 810providerMock.Setup(m => m.GetPositionFromChar(16)).Returns(new Point(42, 18)); 811providerMock.Setup(m => m.GetPositionFromChar(23)).Returns(new Point(82, 18)); 812providerMock.Setup(m => m.GetPositionFromChar(31)).Returns(new Point(42, 35)); 813providerMock.Setup(m => m.GetPositionFromChar(46)).Returns(new Point(37, 52)); 814providerMock.Setup(m => m.GetPositionFromChar(58)).Returns(new Point(83, 69)); 816providerMock.Setup(m => m.GetPositionFromCharForUpperRightCorner(15, testText)).Returns(new Point(125, 1)); 817providerMock.Setup(m => m.GetPositionFromCharForUpperRightCorner(30, testText)).Returns(new Point(127, 18)); 818providerMock.Setup(m => m.GetPositionFromCharForUpperRightCorner(45, testText)).Returns(new Point(125, 35)); 819providerMock.Setup(m => m.GetPositionFromCharForUpperRightCorner(52, testText)).Returns(new Point(93, 52)); 820providerMock.Setup(m => m.GetPositionFromCharForUpperRightCorner(57, testText)).Returns(new Point(127, 52)); 821providerMock.Setup(m => m.GetPositionFromCharForUpperRightCorner(62, testText)).Returns(new Point(123, 69));
System\Windows\Forms\DeviceContextHdcScopeTests.cs (8)
31Assert.Equal(new Point(1, 2), origin); 46Assert.Equal(new Point(0, 0), origin); 61Assert.Equal(new Point(1, 2), origin); 76Assert.Equal(new Point(0, 0), origin); 114Assert.Equal(new Point(1, 2), origin); 141Assert.Equal(new Point(0, 0), origin); 164Assert.Equal(new Point(1, 2), origin); 187Assert.Equal(new Point(0, 0), origin);
System.Windows.Forms.Primitives.TestUtilities (1)
Extensions\GdiExtensions.cs (1)
31return new Point((int)x, (int)y);
System.Windows.Forms.Tests (599)
NumericUpDownTests.cs (4)
61new(0, 18), new(16, 18), 96new(0, 18), new(16, 18),
System\Windows\Forms\AccessibleObjects\ComboBox.ComboBoxItemAccessibleObjectTests.cs (1)
375Point point = new(x, y + initialYPosition);
System\Windows\Forms\AccessibleObjects\DataGridViewAccessibleObjectTests.cs (2)
161actualBounds.Location = new Point(0, 0); 182actualBounds.Location = new Point(0, 0);
System\Windows\Forms\AccessibleObjects\ListBoxAccessibleObjectTests.cs (1)
346Point testPoint = new Point(10, 10);
System\Windows\Forms\AccessibleObjects\ListVIew.ListViewAccessibleObjectTests.cs (1)
1179Point point = new(15, 55);
System\Windows\Forms\AccessibleObjects\ListViewGroup.ListViewGroupAccessibleObjectTests.cs (2)
308actualBounds.Location = new Point(0, 0); 346actualBounds.Location = new Point(0, 0);
System\Windows\Forms\AccessibleObjects\ListViewItem.ListViewSubItem.ListViewSubItemAccessibleObjectTests.cs (2)
666actualBounds.Location = new Point(0, 0); 669Location = new Point(0, 0)
System\Windows\Forms\AccessibleObjects\Panel.PanelAccessibleObjectTests.cs (2)
267panel1.Location = new(50, 50); 270button1.Location = new(17, 16);
System\Windows\Forms\AccessibleObjects\PropertyGridView.PropertyGridViewAccessibleObjectTests.cs (1)
238propertyGrid.Location = new Point(0, 0);
System\Windows\Forms\AccessibleObjects\TabPage.TabPageAccessibleObjectTests.cs (3)
534tabControl.Location = new(22, 25); 537button.Location = new(16, 12); 542tabPage.Location = new(4, 24);
System\Windows\Forms\AccessibleObjects\TrackBar.TrackBarAccessibleObjectTests.cs (3)
526Point pointInThumb = new Point(accessibleObject.ThumbAccessibleObject.Bounds.X + 1, accessibleObject.ThumbAccessibleObject.Bounds.Y + 1); 531Point pointInFirstButton = new Point(accessibleObject.FirstButtonAccessibleObject.Bounds.X + 1, accessibleObject.FirstButtonAccessibleObject.Bounds.Y + 1); 537Point pointInLastButton = new Point(accessibleObject.LastButtonAccessibleObject.Bounds.X + 1, accessibleObject.LastButtonAccessibleObject.Bounds.Y + 1);
System\Windows\Forms\AccessibleObjects\TreeView.TreeViewAccessibleObjectTests.cs (1)
251Point point = new(accessibleObject.Bounds.X, accessibleObject.Bounds.Bottom - 1);
System\Windows\Forms\ButtonRenderingTests.cs (32)
49new(bounds.Right - 1, 0), new(0, 0), 52new(0, 0), new(0, bounds.Bottom - 1), 55new(0, bounds.Bottom - 1), new(bounds.Right - 1, bounds.Bottom - 1), 58new(bounds.Right - 1, bounds.Bottom - 1), new(bounds.Right - 1, -1), 61new(bounds.Right - 2, 1), new(1, 1), 64new(1, 1), new(1, bounds.Bottom - 2), 67new(1, bounds.Bottom - 2), new(bounds.Right - 2, bounds.Bottom - 2), 70new(bounds.Right - 2, bounds.Bottom - 2), new(bounds.Right - 2, 0), 135new(bounds.Right - 1, 0), new(0, 0), 138new(0, 0), new(0, bounds.Bottom - 1), 141new(0, bounds.Bottom - 1), new(bounds.Right - 1, bounds.Bottom - 1), 144new(bounds.Right - 1, bounds.Bottom - 1), new(bounds.Right - 1, -1), 147new(bounds.Right - 2, 1), new(1, 1), 150new(1, 1), new(1, bounds.Bottom - 2), 153new(1, bounds.Bottom - 2), new(bounds.Right - 2, bounds.Bottom - 2), 156new(bounds.Right - 2, bounds.Bottom - 2), new(bounds.Right - 2, 0),
System\Windows\Forms\CheckBoxRendererTests.cs (5)
30Point point = new(control.Location.X, control.Location.Y); 66Point point = new(control.Location.X, control.Location.Y); 103Point point = new(control.Location.X, control.Location.Y); 137Point point = new(control.Location.X, control.Location.Y); 154? Validate.PolyPolygon16(new(new(bounds.X, bounds.Y), new Size(-1, -1)))
System\Windows\Forms\CheckBoxTests.cs (1)
824MouseEventArgs eventArgs = new(MouseButtons.Left, 1, new Point(0, 0), 0);
System\Windows\Forms\ComboBox.ComboBoxUiaTextProviderTests.cs (14)
425yield return new object[] { ComboBoxStyle.DropDown, new Size(50, 20), "Some test text for testing", 0, new Point(1, 0) }; 426yield return new object[] { ComboBoxStyle.DropDown, new Size(50, 20), "Some test text for testing", 15, new Point(79, 0) }; 428yield return new object[] { ComboBoxStyle.Simple, new Size(50, 20), "Some test text for testing", 0, new Point(1, 0) }; 429yield return new object[] { ComboBoxStyle.Simple, new Size(50, 20), "Some test text for testing", 15, new Point(79, 0) }; 487yield return new object[] { comboBoxStyle, new Size(50, 20), "", 0, new Point(0, 0) }; 488yield return new object[] { comboBoxStyle, new Size(50, 20), "Some test text", 100, new Point(0, 0) }; 489yield return new object[] { comboBoxStyle, new Size(50, 20), "Some test text", -1, new Point(0, 0) }; 490yield return new object[] { comboBoxStyle, new Size(50, 20), "Some test text", 12, new Point(71, 0) }; 491yield return new object[] { comboBoxStyle, new Size(100, 60), "Some test \n text", 10, new Point(56, 0) }; 492yield return new object[] { comboBoxStyle, new Size(100, 60), "Some test \r\n text", 10, new Point(56, 0) }; 493yield return new object[] { comboBoxStyle, new Size(100, 60), "Some test \r\n text", 12, new Point(60, 0) }; 494yield return new object[] { comboBoxStyle, new Size(100, 60), "Some test \t text", 10, new Point(57, 0) }; 905yield return new object[] { ComboBoxStyle.DropDown, new Point(10, 10) }; 907yield return new object[] { ComboBoxStyle.Simple, new Point(10, 10) };
System\Windows\Forms\ComboBoxTests.cs (1)
2584ownerDrawComboBox.Location = new Point(0, 50);
System\Windows\Forms\ControlPaintTests.cs (22)
1710yield return new object[] { new Point(1, 2), new Point(1, 2), Color.Red }; 1711yield return new object[] { new Point(2, 3), new Point(1, 2), Color.Red }; 1712yield return new object[] { new Point(1, 2), new Point(2, 3), Color.Empty }; 1713yield return new object[] { new Point(1, 2), new Point(2, 3), Color.Red }; 1714yield return new object[] { new Point(1, 2), new Point(2, 3), SystemColors.ControlLight }; 1715yield return new object[] { new Point(1, 2), new Point(2, 3), SystemColors.Control }; 1716yield return new object[] { new Point(1, 2), new Point(2, 3), SystemColors.ControlDark }; 1717yield return new object[] { new Point(1, 2), new Point(2, 3), Color.Black }; 1718yield return new object[] { new Point(1, 2), new Point(2, 3), Color.White }; 1719yield return new object[] { new Point(1, 2), new Point(2, 3), Color.Transparent }; 1720yield return new object[] { new Point(1, 2), new Point(2, 3), Color.Empty };
System\Windows\Forms\ControlTests.cs (6)
259Assert.Equal(new Point(left, top), control.Location); 451Assert.Equal(new Point(left, top), control.Location); 1046checkedListBox1.Location = new Point(10, 10); 1049button1.Location = new Point(12, 166); 1053listBox1.Location = new Point(12, 80); 1057listView1.Location = new Point(130, 10);
System\Windows\Forms\ControlTests.Handlers.cs (4)
2588yield return new object[] { new HelpEventArgs(new Point(1, 2)) }; 2652HelpEventArgs eventArgs = new(new Point(1, 2)); 2684HelpEventArgs eventArgs = new(new Point(1, 2)); 2706HelpEventArgs eventArgs = new(new Point(1, 2));
System\Windows\Forms\ControlTests.Methods.cs (5)
2083Assert.Null(control.GetChildAtPoint(new Point(5, 5), skipValue)); 2087Assert.Null(control.GetChildAtPoint(new Point(5, 5), skipValue)); 2097Assert.Throws<InvalidEnumArgumentException>("skipValue", () => control.GetChildAtPoint(new Point(5, 5), skipValue)); 12515Point p = control.PointToScreen(new Point(5, 5)); 12589Point p = control.PointToScreen(new Point(5, 5));
System\Windows\Forms\ControlTests.Properties.cs (68)
6699Assert.Equal(new Point(value, 0), control.Location); 6721Assert.Equal(new Point(value, 0), control.Location); 6790Assert.Equal(new Point(value, 0), control.Location); 6812Assert.Equal(new Point(value, 0), control.Location); 6889Assert.Equal(new Point(value, 0), control.Location); 6914Assert.Equal(new Point(value, 0), control.Location); 6999Assert.Equal(new Point(value, 0), control.Location); 7028Assert.Equal(new Point(value, 0), control.Location); 7072Assert.Equal(new Point(1, 0), control.Location); 7077Assert.Equal(new Point(1, 0), control.Location); 7082Assert.Equal(new Point(2, 0), control.Location); 7109Assert.Equal(new Point(1, 0), control.Location); 7115Assert.Equal(new Point(1, 0), control.Location); 7121Assert.Equal(new Point(2, 0), control.Location); 7129Assert.Equal(new Point(1, 0), control.Location); 7136yield return new object[] { new Point(0, 0), 0 }; 7137yield return new object[] { new Point(-1, -2), 1 }; 7138yield return new object[] { new Point(1, 0), 1 }; 7139yield return new object[] { new Point(0, 2), 1 }; 7140yield return new object[] { new Point(1, 2), 1 }; 7318yield return new object[] { resizeRedraw, new Point(0, 0), 0 }; 7319yield return new object[] { resizeRedraw, new Point(-1, -2), 1 }; 7320yield return new object[] { resizeRedraw, new Point(1, 0), 1 }; 7321yield return new object[] { resizeRedraw, new Point(0, 2), 1 }; 7322yield return new object[] { resizeRedraw, new Point(1, 2), 1 }; 7556control.Location = new Point(1, 2); 7557Assert.Equal(new Point(1, 2), control.Location); 7561control.Location = new Point(1, 2); 7562Assert.Equal(new Point(1, 2), control.Location); 7566control.Location = new Point(2, 3); 7567Assert.Equal(new Point(2, 3), control.Location); 7578control.Location = new Point(1, 0); 7579Assert.Equal(new Point(1, 0), control.Location); 7582control.Location = new Point(0, 1); 7583Assert.Equal(new Point(0, 1), control.Location); 7586control.Location = new Point(1, 2); 7587Assert.Equal(new Point(1, 2), control.Location); 7602control.Location = new Point(1, 0); 7603Assert.Equal(new Point(1, 0), control.Location); 7606control.Location = new Point(0, 1); 7607Assert.Equal(new Point(0, 1), control.Location); 7610control.Location = new Point(1, 2); 7611Assert.Equal(new Point(1, 2), control.Location); 7641control.Location = new Point(1, 2); 7642Assert.Equal(new Point(1, 2), control.Location); 7647control.Location = new Point(1, 2); 7648Assert.Equal(new Point(1, 2), control.Location); 7653control.Location = new Point(2, 2); 7654Assert.Equal(new Point(2, 2), control.Location); 7659control.Location = new Point(2, 3); 7660Assert.Equal(new Point(2, 3), control.Location); 7667control.Location = new Point(1, 2); 7668Assert.Equal(new Point(1, 2), control.Location); 12134Assert.Equal(new Point(0, value), control.Location); 12155Assert.Equal(new Point(0, value), control.Location); 12224Assert.Equal(new Point(0, value), control.Location); 12246Assert.Equal(new Point(0, value), control.Location); 12322Assert.Equal(new Point(0, value), control.Location); 12346Assert.Equal(new Point(0, value), control.Location); 12431Assert.Equal(new Point(0, value), control.Location); 12460Assert.Equal(new Point(0, value), control.Location); 12504Assert.Equal(new Point(0, 1), control.Location); 12509Assert.Equal(new Point(0, 1), control.Location); 12514Assert.Equal(new Point(0, 2), control.Location); 12541Assert.Equal(new Point(0, 1), control.Location); 12547Assert.Equal(new Point(0, 1), control.Location); 12553Assert.Equal(new Point(0, 2), control.Location); 12561Assert.Equal(new Point(0, 1), control.Location);
System\Windows\Forms\CursorConverterTests.cs (1)
42Assert.Equal(new Point(5, 8), cursor.HotSpot);
System\Windows\Forms\CursorTests.cs (5)
47Assert.Equal(new Point(0, 0), cursor.HotSpot); 61yield return new object[] { Path.Join("bitmaps", "10x16_one_entry_32bit.ico"), new Point(5, 8) }; 159Assert.Equal(new Point(5, 8), cursor.HotSpot); 280Cursor.Position = new Point(1, 2); 286Cursor.Position = new Point(virtualScreen.X - 1, virtualScreen.Y - 1);
System\Windows\Forms\DataObjectTests.cs (1)
2824Point point = new() { X = 1, Y = 1 };
System\Windows\Forms\Design\ComponentEditorFormTests.cs (1)
79Assert.Equal(new Point(-SystemInformation.WorkingArea.X, -SystemInformation.WorkingArea.Y), control.DesktopLocation);
System\Windows\Forms\DragDropHelperTests.cs (8)
24yield return new object[] { new DataObject(), new Bitmap(1, 1), new Point(1, 1), false }; 25yield return new object[] { new DataObject(), null, new Point(1, 1), false }; 26yield return new object[] { new DataObject(), new Bitmap(1, 1), new Point(1, 1), true }; 31yield return new object[] { new DataObject(), new GiveFeedbackEventArgs(DragDropEffects.All, false, new Bitmap(1, 1), new Point(0, 0), false) }; 32yield return new object[] { new DataObject(), new GiveFeedbackEventArgs(DragDropEffects.All, false, null, new Point(0, 0), false) }; 33yield return new object[] { new DataObject(), new GiveFeedbackEventArgs(DragDropEffects.All, false, new Bitmap(1, 1), new Point(0, 0), true) }; 169Assert.Throws<InvalidOperationException>(() => DragDropHelper.SetDragImage(new DataObject(), bitmap, new Point(0, 0), false)); 178() => DragDropHelper.SetDragImage(dataObject, bitmap, new Point(0, 0), false));
System\Windows\Forms\ErrorProviderTests.cs (4)
1153control.Location = new Point(1, 2); 1154Assert.Equal(new Point(1, 2), control.Location); 1185control.Location = new Point(2, 3); 1186Assert.Equal(new Point(2, 3), control.Location);
System\Windows\Forms\FormTests.cs (9)
78Assert.Equal(new Point(-SystemInformation.WorkingArea.X, -SystemInformation.WorkingArea.Y), control.DesktopLocation); 988form.Location = new Point(10, 11); 993form.Location = new Point(20, 21); 997Assert.NotEqual(new Point(20, 21), form.Location); 1002Assert.Equal(new Point(20, 21), form.Location); 1017form.Location = new Point(10, 11); 1022form.Location = new Point(20, 21); 1026Assert.NotEqual(new Point(20, 21), form.Location); 1031Assert.Equal(new Point(20, 21), form.Location);
System\Windows\Forms\GiveFeedbackEventArgsTests.cs (5)
27GiveFeedbackEventArgs e = new(DragDropEffects.None, false, new Bitmap(1, 1), new Point(0, 0), false) 36yield return new object[] { new Point(1, 1) }; 37yield return new object[] { new Point(-1, -1) }; 44GiveFeedbackEventArgs e = new(DragDropEffects.None, false, new Bitmap(2, 2), new Point(0, 0), false) 74GiveFeedbackEventArgs e = new(DragDropEffects.None, false, new Bitmap(1, 1), new Point(0, 0), false)
System\Windows\Forms\HandledMouseEventArgsTests.cs (2)
25Assert.Equal(new Point(x, y), e.Location); 41Assert.Equal(new Point(x, y), e.Location);
System\Windows\Forms\HelpEventArgsTests.cs (3)
16yield return new object[] { new Point(1, 2) }; 17yield return new object[] { new Point(-1, -2) }; 34HelpEventArgs e = new(new Point(1, 2))
System\Windows\Forms\HelpProviderTests.cs (3)
522control.OnHelpRequested(new HelpEventArgs(new Point(1, 2))); 532HelpEventArgs e = new(new Point(1, 2)); 551HelpEventArgs e = new(new Point(1, 2));
System\Windows\Forms\HtmlDocumentTests.cs (2)
1754Assert.Equal("BODY", document.GetElementFromPoint(new Point(int.MinValue, int.MinValue)).TagName); 1755Assert.Equal("BODY", document.GetElementFromPoint(new Point(int.MaxValue, int.MaxValue)).TagName);
System\Windows\Forms\ImageListTests.cs (2)
920yield return new object[] { new Point(1, 2) }; 921yield return new object[] { new Point(-1, -2) };
System\Windows\Forms\ListViewInsertionMarkTests.cs (3)
567Assert.True(insertionMark.NearestIndex(new Point(-10, -11)) >= -1); 584Assert.True(insertionMark.NearestIndex(new Point(-10, -11)) >= -1); 604Assert.Equal(result, insertionMark.NearestIndex(new Point(1, 2)));
System\Windows\Forms\ListViewItemTests.cs (22)
32Assert.Equal(new Point(-1, -1), item.Position); 71Assert.Equal(new Point(-1, -1), item.Position); 109Assert.Equal(new Point(-1, -1), item.Position); 147Assert.Equal(new Point(-1, -1), item.Position); 185Assert.Equal(new Point(-1, -1), item.Position); 222Assert.Equal(new Point(-1, -1), item.Position); 259Assert.Equal(new Point(-1, -1), item.Position); 297Assert.Equal(new Point(-1, -1), item.Position); 335Assert.Equal(new Point(-1, -1), item.Position); 372Assert.Equal(new Point(-1, -1), item.Position); 410Assert.Equal(new Point(-1, -1), item.Position); 448Assert.Equal(new Point(-1, -1), item.Position); 485Assert.Equal(new Point(-1, -1), item.Position); 523Assert.Equal(new Point(-1, -1), item.Position); 561Assert.Equal(new Point(-1, -1), item.Position); 599Assert.Equal(new Point(-1, -1), item.Position); 636Assert.Equal(new Point(-1, -1), item.Position); 674Assert.Equal(new Point(-1, -1), item.Position); 712Assert.Equal(new Point(-1, -1), item.Position); 749Assert.Equal(new Point(-1, -1), item.Position); 788Assert.Equal(new Point(-1, -1), item.Position); 818Assert.Equal(new Point(-1, -1), item.Position);
System\Windows\Forms\ListViewTests.cs (4)
5157listView.AnnounceColumnHeader(new Point(15, 40)); 5182listView.AnnounceColumnHeader(new Point(15, 40)); 5207listView.AnnounceColumnHeader(new Point(10, 20)); 5234listView.AnnounceColumnHeader(new Point(x, y));
System\Windows\Forms\MdiClientTests.cs (12)
441control.Location = new Point(1, 0); 442Assert.Equal(new Point(1, 0), control.Location); 445control.Location = new Point(0, 1); 446Assert.Equal(new Point(0, 1), control.Location); 449control.Location = new Point(1, 2); 450Assert.Equal(new Point(1, 2), control.Location); 465control.Location = new Point(1, 0); 466Assert.Equal(new Point(1, 0), control.Location); 469control.Location = new Point(0, 1); 470Assert.Equal(new Point(0, 1), control.Location); 473control.Location = new Point(1, 2); 474Assert.Equal(new Point(1, 2), control.Location);
System\Windows\Forms\MonthCalendar.HitTestInfoTests.cs (2)
19Point point = new(5, 5); 46Point point = new(5, 5);
System\Windows\Forms\MonthCalendarTests.cs (1)
4492HitTestInfo hitTestInfo = calendar.HitTest(new Point(x, y));
System\Windows\Forms\MouseEventArgsTests.cs (1)
25Assert.Equal(new Point(x, y), e.Location);
System\Windows\Forms\NativeToWinFormsAdapterTests.cs (3)
79TestData value = new(new(6, 7)); 438SimpleTestData value = new("text", new(10, 10)); 458SimpleTestData value = new("text", new(10, 10));
System\Windows\Forms\RadioButtonRendererTests.cs (8)
28Point point = new(control.Location.X, control.Location.Y); 59Point point = new(control.Location.X, control.Location.Y); 96Point point = new(control.Location.X, control.Location.Y); 123Point point = new(control.Location.X, control.Location.Y); 150? Validate.PolyPolygon16(new(new(bounds.X, bounds.Y), new Size(-1, -1))) 226Point glyphLocation = new(2, 2); 254Point glyphLocation = new(0, 0); 303Point glyphLocation = new(1, 1);
System\Windows\Forms\RichTextBoxTests.cs (1)
10648Point pt = new(x, y);
System\Windows\Forms\ScreenTests.cs (4)
109yield return new object[] { new Point(-1, -2) }; 110yield return new object[] { new Point(0, 0) }; 111yield return new object[] { new Point(1, 2) }; 112yield return new object[] { new Point(int.MaxValue, int.MaxValue) };
System\Windows\Forms\ScrollableControlTests.cs (33)
2298yield return new object[] { true, width, height, 0, 0, new Point(0, 0), scrollableSize }; 2299yield return new object[] { false, width, height, 0, 0, new Point(0, 0), nonScrollableSize }; 2301yield return new object[] { true, width, height, -10, 0, new Point(-10, 0), scrollableSize }; 2302yield return new object[] { false, width, height, -10, 0, new Point(0, 0), nonScrollableSize }; 2304yield return new object[] { true, width, height, 0, -20, new Point(0, -20), scrollableSize }; 2305yield return new object[] { false, width, height, 0, -20, new Point(0, 0), nonScrollableSize }; 2307yield return new object[] { true, width, height, -10, -20, new Point(-10, -20), scrollableSize }; 2308yield return new object[] { false, width, height, -10, -20, new Point(0, 0), nonScrollableSize }; 2311yield return new object[] { true, width, height, -100, -20, new Point(-30, -20), scrollableSize }; 2312yield return new object[] { false, width, height, -100, -20, new Point(0, 0), nonScrollableSize }; 2314yield return new object[] { true, width, height, -10, -200, new Point(-10, -70), scrollableSize }; 2315yield return new object[] { false, width, height, -10, -200, new Point(0, 0), nonScrollableSize }; 2318yield return new object[] { true, width, height, 1, 20, new Point(0, 0), scrollableSize }; 2319yield return new object[] { false, width, height, 1, 20, new Point(0, 0), nonScrollableSize }; 2321yield return new object[] { true, width, height, 10, 2, new Point(0, 0), scrollableSize }; 2322yield return new object[] { false, width, height, 10, 2, new Point(0, 0), nonScrollableSize }; 2359yield return new object[] { true, width, height, 0, 0, new Point(0, 0), scrollableSize, 1 }; 2360yield return new object[] { false, width, height, 0, 0, new Point(0, 0), nonScrollableSize, 0 }; 2362yield return new object[] { true, width, height, -10, 0, new Point(-10, 0), scrollableSize, 1 }; 2363yield return new object[] { false, width, height, -10, 0, new Point(0, 0), nonScrollableSize, 0 }; 2365yield return new object[] { true, width, height, 0, -20, new Point(0, -20), scrollableSize, 1 }; 2366yield return new object[] { false, width, height, 0, -20, new Point(0, 0), nonScrollableSize, 0 }; 2368yield return new object[] { true, width, height, -10, -20, new Point(-10, -20), scrollableSize, 1 }; 2369yield return new object[] { false, width, height, -10, -20, new Point(0, 0), nonScrollableSize, 0 }; 2372yield return new object[] { true, width, height, -100, -20, new Point(-47, -20), scrollableSize, 1 }; 2373yield return new object[] { false, width, height, -100, -20, new Point(0, 0), nonScrollableSize, 0 }; 2375yield return new object[] { true, width, height, -10, -200, new Point(-10, -87), scrollableSize, 1 }; 2376yield return new object[] { false, width, height, -10, -200, new Point(0, 0), nonScrollableSize, 0 }; 2379yield return new object[] { true, width, height, 1, 20, new Point(0, 0), scrollableSize, 1 }; 2380yield return new object[] { false, width, height, 1, 20, new Point(0, 0), nonScrollableSize, 0 }; 2382yield return new object[] { true, width, height, 10, 2, new Point(0, 0), scrollableSize, 1 }; 2383yield return new object[] { false, width, height, 10, 2, new Point(0, 0), nonScrollableSize, 0 }; 2554public Rectangle ExpectedSize => new(new Point(0, 0), DefaultSize);
System\Windows\Forms\SearchForVirtualItemEventArgsTests.cs (4)
16yield return new object[] { false, true, false, "", new Point(1, 2), SearchDirectionHint.Down, -1 }; 17yield return new object[] { false, true, false, "text", new Point(-1, -2), SearchDirectionHint.Down, 0 }; 18yield return new object[] { false, true, false, "text", new Point(1, 2), SearchDirectionHint.Down, 1 }; 43SearchForVirtualItemEventArgs e = new(false, true, false, "text", new Point(1, 2), SearchDirectionHint.Down, 1)
System\Windows\Forms\SplitterPanelTests.cs (15)
504yield return new object[] { new Point(0, 0), 0 }; 505yield return new object[] { new Point(-1, -2), 1 }; 506yield return new object[] { new Point(1, 0), 1 }; 507yield return new object[] { new Point(0, 2), 1 }; 508yield return new object[] { new Point(1, 2), 1 }; 607control.Location = new Point(1, 2); 608Assert.Equal(new Point(1, 2), control.Location); 613control.Location = new Point(1, 2); 614Assert.Equal(new Point(1, 2), control.Location); 619control.Location = new Point(2, 2); 620Assert.Equal(new Point(2, 2), control.Location); 625control.Location = new Point(2, 3); 626Assert.Equal(new Point(2, 3), control.Location); 633control.Location = new Point(1, 2); 634Assert.Equal(new Point(1, 2), control.Location);
System\Windows\Forms\SplitterTests.cs (1)
1212Location = new Point(50, 0)
System\Windows\Forms\TabControlTests.cs (21)
86Assert.Equal(new Point(6, 3), control.Padding); 1713yield return new object[] { new Point(0, 0) }; 1714yield return new object[] { new Point(0, 16) }; 1715yield return new object[] { new Point(16, 0) }; 1716yield return new object[] { new Point(16, 16) }; 1772control.Padding = new Point(1, 0); 1773Assert.Equal(new Point(1, 0), control.Padding); 1776control.Padding = new Point(0, 1); 1777Assert.Equal(new Point(0, 1), control.Padding); 1780control.Padding = new Point(1, 2); 1781Assert.Equal(new Point(1, 2), control.Padding); 1785Assert.Equal(new Point(6, 3), control.Padding); 1796control.Padding = new Point(1, 0); 1797Assert.Equal(new Point(1, 0), control.Padding); 1800control.Padding = new Point(0, 1); 1801Assert.Equal(new Point(0, 1), control.Padding); 1804control.Padding = new Point(1, 2); 1805Assert.Equal(new Point(1, 2), control.Padding); 1809Assert.Equal(new Point(6, 3), control.Padding); 1817Assert.Throws<ArgumentOutOfRangeException>("value", () => control.Padding = new Point(-1, 1)); 1824Assert.Throws<ArgumentOutOfRangeException>("value", () => control.Padding = new Point(1, -1));
System\Windows\Forms\TabPageTests.cs (45)
1862yield return new object[] { new Point(0, 0), 0 }; 1863yield return new object[] { new Point(-1, -2), 1 }; 1864yield return new object[] { new Point(1, 0), 1 }; 1865yield return new object[] { new Point(0, 2), 1 }; 1866yield return new object[] { new Point(1, 2), 1 }; 2044yield return new object[] { resizeRedraw, new Point(0, 0), 0 }; 2045yield return new object[] { resizeRedraw, new Point(-1, -2), 1 }; 2046yield return new object[] { resizeRedraw, new Point(1, 0), 1 }; 2047yield return new object[] { resizeRedraw, new Point(0, 2), 1 }; 2048yield return new object[] { resizeRedraw, new Point(1, 2), 1 }; 2144yield return new object[] { resizeRedraw, new Point(0, 0) }; 2145yield return new object[] { resizeRedraw, new Point(-1, -2) }; 2146yield return new object[] { resizeRedraw, new Point(1, 0) }; 2147yield return new object[] { resizeRedraw, new Point(0, 2) }; 2148yield return new object[] { resizeRedraw, new Point(1, 2) }; 2294control.Location = new Point(1, 2); 2295Assert.Equal(new Point(1, 2), control.Location); 2299control.Location = new Point(1, 2); 2300Assert.Equal(new Point(1, 2), control.Location); 2304control.Location = new Point(2, 3); 2305Assert.Equal(new Point(2, 3), control.Location); 2331control.Location = new Point(1, 2); 2332Assert.Equal(new Point(1, 2), control.Location); 2337control.Location = new Point(1, 2); 2338Assert.Equal(new Point(1, 2), control.Location); 2343control.Location = new Point(2, 2); 2344Assert.Equal(new Point(2, 2), control.Location); 2349control.Location = new Point(2, 3); 2350Assert.Equal(new Point(2, 3), control.Location); 2357control.Location = new Point(1, 2); 2358Assert.Equal(new Point(1, 2), control.Location); 2370control.Location = new Point(1, 0); 2371Assert.Equal(new Point(1, 0), control.Location); 2374control.Location = new Point(0, 1); 2375Assert.Equal(new Point(0, 1), control.Location); 2378control.Location = new Point(1, 2); 2379Assert.Equal(new Point(1, 2), control.Location); 2383Assert.Equal(new Point(1, 2), control.Location); 2398control.Location = new Point(1, 0); 2399Assert.Equal(new Point(1, 0), control.Location); 2402control.Location = new Point(0, 1); 2403Assert.Equal(new Point(0, 1), control.Location); 2406control.Location = new Point(1, 2); 2407Assert.Equal(new Point(1, 2), control.Location); 2411Assert.Equal(new Point(1, 2), control.Location);
System\Windows\Forms\TextBoxBase.TextBoxBaseUiaTextProviderTests.cs (21)
390yield return new object[] { new Size(50, 20), "Some test text for testing", false, 0, new Point(1, 0) }; 391yield return new object[] { new Size(50, 20), "Some test text for testing", false, 15, new Point(79, 0) }; 392yield return new object[] { new Size(50, 20), "Some test text for testing", true, 15, new Point(27, 30) }; 393yield return new object[] { new Size(100, 60), "This is a\r\nlong long text\r\nfor testing\r\nGetPositionFromChar method", true, 0, new Point(4, 1) }; 394yield return new object[] { new Size(100, 60), "This is a\r\nlong long text\r\nfor testing\r\nGetPositionFromChar method", true, 6, new Point(31, 1) }; 395yield return new object[] { new Size(100, 60), "This is a\r\nlong long text\r\nfor testing\r\nGetPositionFromChar method", true, 26, new Point(78, 16) }; 428yield return new object[] { new Size(50, 20), "", false, 0, new Point(0, 0) }; 429yield return new object[] { new Size(50, 20), "Some test text", false, 100, new Point(0, 0) }; 430yield return new object[] { new Size(50, 20), "Some test text", false, -1, new Point(0, 0) }; 431yield return new object[] { new Size(50, 20), "Some test text", false, 12, new Point(71, 0) }; 432yield return new object[] { new Size(50, 20), "Some test text", true, 12, new Point(19, 30) }; 433yield return new object[] { new Size(100, 60), "Some test \n text", false, 10, new Point(56, 0) }; 434yield return new object[] { new Size(100, 60), "Some test \n text", true, 10, new Point(59, 1) }; 435yield return new object[] { new Size(100, 60), "Some test \r\n text", false, 10, new Point(56, 0) }; 436yield return new object[] { new Size(100, 60), "Some test \r\n text", true, 10, new Point(59, 1) }; 437yield return new object[] { new Size(100, 60), "Some test \r\n text", false, 12, new Point(60, 0) }; 438yield return new object[] { new Size(100, 60), "Some test \r\n text", true, 12, new Point(7, 16) }; 439yield return new object[] { new Size(100, 60), "Some test \t text", false, 10, new Point(57, 0) }; 440yield return new object[] { new Size(100, 60), "Some test \t text", true, 10, new Point(60, 1) }; 441yield return new object[] { new Size(40, 60), "Some test \t text", true, 12, new Point(8, 46) }; 784yield return new object[] { new Point(10, 10) };
System\Windows\Forms\TextBoxRendererTests.cs (3)
46? Validate.Polygon16(new(new(1, 1), new(bounds.Width - 2, bounds.Height - 2))) 76? Validate.Polygon16(new(new(1, 1), new(bounds.Width - 2, bounds.Height - 2))) 112? Validate.Polygon16(new(new(1, 1), new(bounds.Width - 2, bounds.Height - 2)))
System\Windows\Forms\TextRendererTests.cs (20)
24yield return new object[] { hint, text, SystemFonts.MenuFont, new Point(1, 2), Color.Red }; 25yield return new object[] { hint, text, SystemFonts.MenuFont, new Point(1, 2), Color.Black }; 26yield return new object[] { hint, text, SystemFonts.MenuFont, new Point(1, 2), Color.White }; 27yield return new object[] { hint, text, SystemFonts.MenuFont, new Point(1, 2), Color.Transparent }; 28yield return new object[] { hint, text, SystemFonts.MenuFont, new Point(1, 2), Color.Empty }; 53yield return new object[] { hint, text, SystemFonts.MenuFont, new Point(1, 2), Color.Red, Color.Blue }; 54yield return new object[] { hint, text, SystemFonts.MenuFont, new Point(1, 2), Color.Black, Color.Blue }; 55yield return new object[] { hint, text, SystemFonts.MenuFont, new Point(1, 2), Color.White, Color.Blue }; 56yield return new object[] { hint, text, SystemFonts.MenuFont, new Point(1, 2), Color.Transparent, Color.Blue }; 57yield return new object[] { hint, text, SystemFonts.MenuFont, new Point(1, 2), Color.Empty, Color.Blue }; 87yield return new object[] { hint, text, SystemFonts.MenuFont, new Point(1, 2), Color.Red, TextFormatFlags.Default, }; 88yield return new object[] { hint, text, SystemFonts.MenuFont, new Point(1, 2), Color.Black, TextFormatFlags.Default, }; 89yield return new object[] { hint, text, SystemFonts.MenuFont, new Point(1, 2), Color.White, TextFormatFlags.Default, }; 90yield return new object[] { hint, text, SystemFonts.MenuFont, new Point(1, 2), Color.Transparent, TextFormatFlags.Default, }; 91yield return new object[] { hint, text, SystemFonts.MenuFont, new Point(1, 2), Color.Empty, TextFormatFlags.Default, }; 124yield return new object[] { hint, text, SystemFonts.MenuFont, new Point(1, 2), Color.Red, Color.Blue, TextFormatFlags.Default, }; 125yield return new object[] { hint, text, SystemFonts.MenuFont, new Point(1, 2), Color.Black, Color.Blue, TextFormatFlags.Default, }; 126yield return new object[] { hint, text, SystemFonts.MenuFont, new Point(1, 2), Color.White, Color.Blue, TextFormatFlags.Default, }; 127yield return new object[] { hint, text, SystemFonts.MenuFont, new Point(1, 2), Color.Transparent, Color.Blue, TextFormatFlags.Default, }; 128yield return new object[] { hint, text, SystemFonts.MenuFont, new Point(1, 2), Color.Empty, Color.Blue, TextFormatFlags.Default, };
System\Windows\Forms\ToolStripContentPanelTests.cs (15)
903yield return new object[] { new Point(0, 0), 0 }; 904yield return new object[] { new Point(-1, -2), 1 }; 905yield return new object[] { new Point(1, 0), 1 }; 906yield return new object[] { new Point(0, 2), 1 }; 907yield return new object[] { new Point(1, 2), 1 }; 1006control.Location = new Point(1, 2); 1007Assert.Equal(new Point(1, 2), control.Location); 1012control.Location = new Point(1, 2); 1013Assert.Equal(new Point(1, 2), control.Location); 1018control.Location = new Point(2, 2); 1019Assert.Equal(new Point(2, 2), control.Location); 1024control.Location = new Point(2, 3); 1025Assert.Equal(new Point(2, 3), control.Location); 1032control.Location = new Point(1, 2); 1033Assert.Equal(new Point(1, 2), control.Location);
System\Windows\Forms\ToolStripDropDownTests.cs (19)
1920yield return new object[] { new Point(0, 0), new Point(0, 0), 0 }; 1921yield return new object[] { new Point(-1, -2), new Point(0, 0), 0 }; 1922yield return new object[] { new Point(1, 0), new Point(1, 0), 1 }; 1923yield return new object[] { new Point(0, 2), new Point(0, 2), 1 }; 1924yield return new object[] { new Point(1, 2), new Point(1, 2), 1 }; 4035yield return new object[] { new HelpEventArgs(new Point(1, 2)) }; 4994toolStripDropDown.Show(control, new Point(x, y), direction); 4996toolStripDropDown.Location.Should().Be(new Point(x + 6, y + 27)); 5005toolStripDropDown.Show(new Point(x, y), direction); 5006Point expectedLocation = new(x, y); 5028toolStripDropDown.Show(control, new Point(x, y)); 5035toolStripDropDown.Location.Should().Be(new Point(x + 8, y + 31)); 5047toolStripDropDown.Show(new Point(x, y)); 5054toolStripDropDown.Location.Should().Be(new Point(x, y));
System\Windows\Forms\ToolStripItemTests.cs (2)
15421menuStrip1.MoveMouse(new MouseEventArgs(MouseButtons.None, 0, new Point(i, 5))); 15428menuStrip1.MoveMouse(new MouseEventArgs(MouseButtons.None, 0, new Point(i, 5)));
System\Windows\Forms\ToolStripPanelRow.ToolStripPanelRowControlCollectionTests.cs (2)
28toolStrip1.Location = new Point(3, 0); 29toolStrip2.Location = new Point(148, 0);
System\Windows\Forms\ToolStripSplitStackDragDropHandlerTests.cs (2)
115Point point = new(10, 10); 125Point point = new(10, 10);
System\Windows\Forms\ToolStripTests.cs (36)
6679yield return new object[] { new ScrollEventArgs(scrollEventType, 100, 200), new Point(x, 101), new Point(0, 100) }; 6680yield return new object[] { new ScrollEventArgs(scrollEventType, 200, 100), new Point(x, -99), new Point(0, -100) }; 6681yield return new object[] { new ScrollEventArgs(scrollEventType, 100, 100), new Point(x, 1), new Point(0, 0) }; 6684yield return new object[] { new ScrollEventArgs(ScrollEventType.ThumbTrack, 100, 200), new Point(x, 1), new Point(0, 0) }; 6685yield return new object[] { new ScrollEventArgs(ScrollEventType.ThumbTrack, 200, 100), new Point(x, 1), new Point(0, 0) }; 6686yield return new object[] { new ScrollEventArgs(ScrollEventType.ThumbTrack, 0, 0), new Point(x, 1), new Point(0, 0) }; 6724yield return new object[] { new ScrollEventArgs(scrollEventType, 100, 200), new Point(x, 101), new Point(0, 100), 1 }; 6725yield return new object[] { new ScrollEventArgs(scrollEventType, 200, 100), new Point(x, -99), new Point(0, -100), 1 }; 6726yield return new object[] { new ScrollEventArgs(scrollEventType, 100, 100), new Point(x, 1), new Point(0, 0), 0 }; 6729yield return new object[] { new ScrollEventArgs(ScrollEventType.ThumbTrack, 100, 200), new Point(x, 1), new Point(0, 0), 0 }; 6730yield return new object[] { new ScrollEventArgs(ScrollEventType.ThumbTrack, 200, 100), new Point(x, 1), new Point(0, 0), 0 }; 6731yield return new object[] { new ScrollEventArgs(ScrollEventType.ThumbTrack, 0, 0), new Point(x, 1), new Point(0, 0), 0 }; 6986yield return new object[] { new Point(1, 0), 1 }; 6987yield return new object[] { new Point(0, 2), 1 }; 6988yield return new object[] { new Point(1, 2), 1 }; 6989yield return new object[] { new Point(0, 0), 0 }; 6990yield return new object[] { new Point(0, 0), 0 }; 6991yield return new object[] { new Point(0, 0), 0 }; 6992yield return new object[] { new Point(0, 0), 0 }; 6993yield return new object[] { new Point(0, 0), 0 }; 6994yield return new object[] { new Point(0, 0), 0 }; 6995yield return new object[] { new Point(1, 2), 1 }; 7349var child = toolStrip.GetChildAtPoint(new Point(x, y)); 7362var child = toolStrip.GetChildAtPoint(new Point(10, 10), skipValue);
System\Windows\Forms\ToolStripTextBoxTests.cs (5)
731char result = _toolStripTextBox.GetCharFromPosition(new Point(x, y)); 739int result = _toolStripTextBox.GetCharIndexFromPosition(new Point(1, 1)); 780_toolStripTextBox.GetPositionFromCharIndex(0).Should().Be(new Point(1, 0)); 781_toolStripTextBox.GetPositionFromCharIndex(5).Should().Be(new Point(29, 0)); 782_toolStripTextBox.GetPositionFromCharIndex(10).Should().Be(new Point(57, 0));
System\Windows\Forms\TreeNodeMouseClickEventArgsTests.cs (1)
31Assert.Equal(new Point(x, y), e.Location);
System\Windows\Forms\TreeViewTests.cs (39)
4759yield return new object[] { new Point(int.MinValue, int.MinValue) }; 4760yield return new object[] { new Point(-1, -2) }; 4761yield return new object[] { new Point(-1, 0) }; 4762yield return new object[] { new Point(-1, 2) }; 4763yield return new object[] { new Point(0, -2) }; 4764yield return new object[] { new Point(0, 0) }; 4765yield return new object[] { new Point(0, 2) }; 4766yield return new object[] { new Point(1, -2) }; 4767yield return new object[] { new Point(1, 0) }; 4768yield return new object[] { new Point(1, 2) }; 4769yield return new object[] { new Point(int.MaxValue, int.MaxValue) }; 4787yield return new object[] { new Point(0, 0) }; 4788yield return new object[] { new Point(20, 0) }; 4808yield return new object[] { new Point(int.MinValue, int.MinValue) }; 4809yield return new object[] { new Point(-1, -2) }; 4810yield return new object[] { new Point(-1, 0) }; 4811yield return new object[] { new Point(-1, 2) }; 4812yield return new object[] { new Point(0, -2) }; 4813yield return new object[] { new Point(1, -2) }; 4814yield return new object[] { new Point(int.MaxValue, int.MaxValue) }; 5084yield return new object[] { new Point(int.MinValue, int.MinValue), TreeViewHitTestLocations.AboveClientArea | TreeViewHitTestLocations.LeftOfClientArea }; 5085yield return new object[] { new Point(-1, -2), TreeViewHitTestLocations.AboveClientArea | TreeViewHitTestLocations.LeftOfClientArea }; 5086yield return new object[] { new Point(-1, 0), TreeViewHitTestLocations.LeftOfClientArea }; 5087yield return new object[] { new Point(-1, 2), TreeViewHitTestLocations.LeftOfClientArea }; 5088yield return new object[] { new Point(0, -2), TreeViewHitTestLocations.AboveClientArea }; 5089yield return new object[] { new Point(0, 0), TreeViewHitTestLocations.None }; 5090yield return new object[] { new Point(0, 2), TreeViewHitTestLocations.None }; 5091yield return new object[] { new Point(1, -2), TreeViewHitTestLocations.AboveClientArea }; 5092yield return new object[] { new Point(1, 0), TreeViewHitTestLocations.None }; 5093yield return new object[] { new Point(1, 2), TreeViewHitTestLocations.None }; 5094yield return new object[] { new Point(int.MaxValue, int.MaxValue), TreeViewHitTestLocations.BelowClientArea | TreeViewHitTestLocations.RightOfClientArea }; 5116yield return new object[] { new Point(0, 0), TreeViewHitTestLocations.Indent }; 5140yield return new object[] { new Point(int.MinValue, int.MinValue), TreeViewHitTestLocations.AboveClientArea | TreeViewHitTestLocations.LeftOfClientArea }; 5141yield return new object[] { new Point(-1, -2), TreeViewHitTestLocations.AboveClientArea | TreeViewHitTestLocations.LeftOfClientArea }; 5142yield return new object[] { new Point(-1, 0), TreeViewHitTestLocations.LeftOfClientArea }; 5143yield return new object[] { new Point(-1, 2), TreeViewHitTestLocations.LeftOfClientArea }; 5144yield return new object[] { new Point(0, -2), TreeViewHitTestLocations.AboveClientArea }; 5145yield return new object[] { new Point(1, -2), TreeViewHitTestLocations.AboveClientArea }; 5146yield return new object[] { new Point(int.MaxValue, int.MaxValue), TreeViewHitTestLocations.BelowClientArea | TreeViewHitTestLocations.RightOfClientArea };
System\Windows\Forms\WebBrowserTests.cs (2)
4526Point p = control.PointToScreen(new Point(5, 5)); 4600Point p = control.PointToScreen(new Point(5, 5));
TextBoxBaseTests.cs (25)
4249yield return new object[] { new Point(-1, -2) }; 4250yield return new object[] { new Point(1, 2) }; 4270Assert.NotEqual('\0', control.GetCharFromPosition(new Point(10, 2))); 4277yield return new object[] { new Point(-1, -2), "t" }; 4278yield return new object[] { new Point(1, 2), "T" }; 4279yield return new object[] { new Point(int.MaxValue, int.MaxValue), "t" }; 4329Assert.NotEqual('\0', control.GetCharFromPosition(new Point(10, 2))); 4362yield return new object[] { new Point(-1, -2) }; 4363yield return new object[] { new Point(1, 2) }; 4383int index = control.GetCharIndexFromPosition(new Point(10, 2)); 4391yield return new object[] { new Point(-1, -2), 3 }; 4392yield return new object[] { new Point(1, 2), 0 }; 4393yield return new object[] { new Point(int.MaxValue, int.MaxValue), 3 }; 4443int index = control.GetCharIndexFromPosition(new Point(10, 2)); 4502Assert.Equal(expected, control.GetCharIndexFromPosition(new Point(1, 2))); 4955yield return new object[] { (IntPtr)1, new Point(1, 0) }; 4956yield return new object[] { PARAM.FromLowHigh(1, 2), new Point(1, 2) }; 4957yield return new object[] { PARAM.FromLowHigh(-1, -2), new Point(-1, -2) }; 4958yield return new object[] { PARAM.FromLowHigh(int.MaxValue, int.MaxValue), new Point(-1, -1) }; 6975Point p = control.PointToScreen(new Point(5, 5)); 7056Point p = control.PointToScreen(new Point(5, 5)); 7814yield return new object[] { new Size(50, 20), false, 0, new Point(1, 0) }; 7815yield return new object[] { new Size(50, 20), false, 15, new Point(79, 0) }; 7816yield return new object[] { new Size(50, 50), true, 12, new Point(14, 31) }; 7817yield return new object[] { new Size(100, 50), true, 22, new Point(37, 16) };
System.Windows.Forms.UI.IntegrationTests (50)
AnchorLayoutTests.cs (1)
280Location = new Point(20, 30),
ButtonTests.cs (8)
119Point mouseDragHandleOnForm = new(form.DisplayRectangle.Right, form.DisplayRectangle.Top + form.DisplayRectangle.Height / 2); 143Point mouseDragHandleOnForm = new(form.DisplayRectangle.Left + form.DisplayRectangle.Width / 2, form.DisplayRectangle.Bottom); 169Point mouseDragHandleOnForm = new(form.DisplayRectangle.Right, form.DisplayRectangle.Top + form.DisplayRectangle.Height / 2); 199Point mouseDragHandleOnForm = new(form.DisplayRectangle.Left + form.DisplayRectangle.Width / 2, form.DisplayRectangle.Bottom); 262Point virtualPoint = new((int)Math.Round(65535.0 / horizontalResolution * centerOnScreen.X), 298Point virtualPoint = new((int)Math.Round(65535.0 / horizontalResolution * centerOnScreen.X), (int)Math.Round(65535.0 / verticalResolution * centerOnScreen.Y)); 299Point virtualPoint1 = new((int)Math.Round(65535.0 / horizontalResolution * centerOnScreen1.X), (int)Math.Round(65535.0 / verticalResolution * centerOnScreen1.Y)); 402Location = new Point(0, 0),
Dpi\SplitContainerTests.cs (1)
48Location = new Point(0, 0),
Dpi\ToolStripItemTests.Dpi.cs (1)
41toolStrip.Location = new Point(0, 0);
DragDropTests.cs (21)
41var targetMousePosition = ToVirtualPoint(form.ListDragTarget.PointToScreen(new Point(20, 20))); 102Point endCoordinates = new(startCoordinates.X + 5, startCoordinates.Y + 5); 168WaitForExplorer(DragDrop, new Point(dragDropForm.Location.X + dragDropForm.Width, dragDropForm.Location.Y)); 196Point virtualPointStart = new() 201Point virtualPointEnd = new() 317Point endCoordinates = new(startCoordinates.X + 5, startCoordinates.Y + 5); 351e.CursorOffset = new Point(0, 48); 430Point startCoordinates = form.PictureBoxDragSource.PointToScreen(new Point(20, 20)); 466Point toolStripItemCoordinates = form.ToolStrip.PointToScreen(new Point(5, 5)); 527Point endCoordinates = new(startCoordinates.X + 5, startCoordinates.Y + 5); 593Location = new Point(0, 0), 665ListDragSource.Location = new Point(10, 17); 675ListDragTarget.Location = new Point(154, 17); 683_useCustomCursorsCheck.Location = new Point(10, 243); 688_dropLocationLabel.Location = new Point(154, 245); 720new Point(e.X - (dragSize.Width / 2), 866ListDragTarget.IndexFromPoint(ListDragTarget.PointToClient(new Point(e.X, e.Y))); 969PictureBoxDragSource.Location = new Point(10, 45); 978RichTextBoxDropTarget.Location = new Point(145, 45); 1089dragAcceptItem.DoDragDrop(data, DragDropEffects.All, _dragAcceptBmp, new Point(0, 16), false); 1149PictureBoxDragSource.DoDragDrop(data, DragDropEffects.All, _dragImage, new Point(0, 16), false);
FormTests.cs (2)
33form.Location = new Point(20, 21); 92form.Location = new Point(20, 21);
ImageListTests.cs (1)
101Location = new Point(12, 33),
Infra\ControlTestBase.cs (2)
175return new Point( 388return new Point(GetMiddle(cell.Right, cell.Left), GetMiddle(cell.Top, cell.Bottom));
ListBoxAccesibleObjectTests.cs (2)
39Point testPoint = listBox.PointToScreen(new Point(0, listBox.ClientRectangle.Height - 1)); 55Point testPoint = listBox.PointToScreen(new Point(itemBounds.Left + 1, itemBounds.Top + 1));
MonthCalendarAccessibleObjectTests.cs (1)
45Location = new Point(0, 0)
MonthCalendarTests.cs (2)
207Location = new Point(0, 0), 231Location = new Point(0, 0),
PropertyGridTests.cs (1)
229Point newLocation = new(10, 20);
RichTextBoxTests.cs (1)
252Location = new Point(100, 100),
TabControlTests.cs (6)
21bool result = await IsHoveredWithMouseAsync(form, tabControl, new(10, 10)); 33bool result = await IsHoveredWithMouseAsync(form, tabControl, new(60, 10)); 45bool result = await IsHoveredWithMouseAsync(form, tabControl, new(300, 300)); 60bool result = await IsHoveredWithMouseAsync(form, tabControl, new(1000, 1000), assertCorrectLocation: false); 84Location = new Point(0, 0) 134Location = new Point(0, 0)
TestPassApp (221)
CommonControl1.Designer.cs (48)
105this.groupBox1.Location = new System.Drawing.Point(32, 4); 117this.button12.Location = new System.Drawing.Point(15, 309); 128this.button1.Location = new System.Drawing.Point(240, 245); 140this.button10.Location = new System.Drawing.Point(15, 105); 150this.button9.Location = new System.Drawing.Point(15, 245); 161this.button8.Location = new System.Drawing.Point(15, 175); 172this.button3.Location = new System.Drawing.Point(15, 34); 184this.button4.Location = new System.Drawing.Point(240, 309); 196this.button5.Location = new System.Drawing.Point(240, 100); 207this.button2.Location = new System.Drawing.Point(241, 34); 218this.button6.Location = new System.Drawing.Point(240, 175); 233this.groupBox2.Location = new System.Drawing.Point(32, 397); 249this.checkedListBox1.Location = new System.Drawing.Point(299, 83); 258this.label7.Location = new System.Drawing.Point(301, 32); 268this.checkBox3.Location = new System.Drawing.Point(15, 137); 280this.checkBox2.Location = new System.Drawing.Point(15, 83); 293this.checkBox1.Location = new System.Drawing.Point(15, 30); 307this.groupBox3.Location = new System.Drawing.Point(839, 4); 326this.comboBox2.Location = new System.Drawing.Point(314, 85); 335this.label11.Location = new System.Drawing.Point(371, 34); 351this.comboBox1.Location = new System.Drawing.Point(15, 90); 360this.label10.Location = new System.Drawing.Point(15, 41); 371this.groupBox4.Location = new System.Drawing.Point(839, 397); 387this.listView1.Location = new System.Drawing.Point(149, 83); 397this.label8.Location = new System.Drawing.Point(223, 30); 418this.groupBox5.Location = new System.Drawing.Point(33, 678); 431this.linkLabel6.Location = new System.Drawing.Point(386, 38); 443this.linkLabel5.Location = new System.Drawing.Point(340, 207); 455this.linkLabel4.Location = new System.Drawing.Point(598, 143); 467this.linkLabel3.Location = new System.Drawing.Point(17, 143); 479this.label6.Location = new System.Drawing.Point(154, 207); 490this.label5.Location = new System.Drawing.Point(15, 87); 501this.label4.Location = new System.Drawing.Point(598, 87); 512this.label3.Location = new System.Drawing.Point(171, 41); 521this.linkLabel2.Location = new System.Drawing.Point(340, 143); 532this.linkLabel1.Location = new System.Drawing.Point(340, 87); 542this.label2.Location = new System.Drawing.Point(121, 143); 552this.label1.Location = new System.Drawing.Point(121, 87); 563this.groupBox6.Location = new System.Drawing.Point(839, 678); 581this.listBox1.Location = new System.Drawing.Point(150, 77); 590this.label12.Location = new System.Drawing.Point(223, 38); 601this.groupBox7.Location = new System.Drawing.Point(702, 983); 612this.maskedTextBox1.Location = new System.Drawing.Point(288, 119); 621this.label9.Location = new System.Drawing.Point(15, 126); 633this.groupBox8.Location = new System.Drawing.Point(33, 983); 645this.dateTimePicker3.Location = new System.Drawing.Point(37, 126); 655this.dateTimePicker2.Location = new System.Drawing.Point(37, 205); 670this.dateTimePicker1.Location = new System.Drawing.Point(37, 47);
CommonControl2.Designer.cs (17)
69this.label3.Location = new System.Drawing.Point(18, 278); 79this.pictureBox1.Location = new System.Drawing.Point(18, 301); 90this.label4.Location = new System.Drawing.Point(517, 153); 100this.progressBar1.Location = new System.Drawing.Point(517, 175); 111this.radioButton1.Location = new System.Drawing.Point(18, 459); 123this.label5.Location = new System.Drawing.Point(309, 10); 133this.richTextBox1.Location = new System.Drawing.Point(313, 36); 143this.label6.Location = new System.Drawing.Point(313, 153); 157this.textBox1.Location = new System.Drawing.Point(313, 175); 166this.label7.Location = new System.Drawing.Point(517, 10); 175this.treeView1.Location = new System.Drawing.Point(517, 36); 203this.label8.Location = new System.Drawing.Point(313, 218); 212this.webBrowser1.Location = new System.Drawing.Point(313, 236); 224this.label1.Location = new System.Drawing.Point(14, 10); 233this.monthCalendar1.Location = new System.Drawing.Point(18, 36); 241this.label2.Location = new System.Drawing.Point(18, 218); 250this.numericUpDown1.Location = new System.Drawing.Point(18, 236);
ContainerControls.Designer.cs (63)
128this.flowLayoutPanel2.Location = new System.Drawing.Point(26, 31); 136this.button2.Location = new System.Drawing.Point(90, 3); 146this.button5.Location = new System.Drawing.Point(90, 36); 156this.button6.Location = new System.Drawing.Point(90, 69); 167this.label2.Location = new System.Drawing.Point(26, 172); 177this.label3.Location = new System.Drawing.Point(26, 10); 187this.label4.Location = new System.Drawing.Point(28, 427); 197this.groupBox1.Location = new System.Drawing.Point(194, 445); 208this.button7.Location = new System.Drawing.Point(12, 22); 220this.groupBox2.Location = new System.Drawing.Point(33, 445); 231this.button8.Location = new System.Drawing.Point(12, 22); 243this.groupBox3.Location = new System.Drawing.Point(522, 445); 254this.button9.Location = new System.Drawing.Point(12, 22); 266this.groupBox4.Location = new System.Drawing.Point(350, 445); 277this.button10.Location = new System.Drawing.Point(12, 22); 288this.label6.Location = new System.Drawing.Point(285, 172); 298this.label7.Location = new System.Drawing.Point(561, 172); 308this.radioButton6.Location = new System.Drawing.Point(223, 72); 318this.radioButton5.Location = new System.Drawing.Point(203, 72); 328this.radioButton4.Location = new System.Drawing.Point(183, 72); 340this.checkBox2.Location = new System.Drawing.Point(93, 72); 351this.radioButton3.Location = new System.Drawing.Point(223, 3); 362this.radioButton2.Location = new System.Drawing.Point(203, 3); 371this.button18.Location = new System.Drawing.Point(93, 3); 380this.button17.Location = new System.Drawing.Point(3, 3); 390this.radioButton1.Location = new System.Drawing.Point(183, 3); 400this.checkBox1.Location = new System.Drawing.Point(3, 72); 410this.label10.Location = new System.Drawing.Point(561, 10); 421this.tabControl5.Location = new System.Drawing.Point(561, 31); 431this.tabPage9.Location = new System.Drawing.Point(4, 24); 442this.button19.Location = new System.Drawing.Point(16, 24); 453this.tabPage10.Location = new System.Drawing.Point(4, 24); 467this.tabControl6.Location = new System.Drawing.Point(4, 3); 477this.tabPage11.Location = new System.Drawing.Point(4, 24); 488this.button20.Location = new System.Drawing.Point(0, 0); 499this.tabPage12.Location = new System.Drawing.Point(4, 24); 510this.button21.Location = new System.Drawing.Point(9, 9); 526this.flowLayoutPanel1.Location = new System.Drawing.Point(26, 192); 534this.button4.Location = new System.Drawing.Point(4, 3); 544this.button1.Location = new System.Drawing.Point(100, 3); 554this.button3.Location = new System.Drawing.Point(4, 36); 565this.label1.Location = new System.Drawing.Point(26, 308); 576this.panel2.Location = new System.Drawing.Point(285, 199); 586this.tabControl2.Location = new System.Drawing.Point(8, 12); 595this.tabPage1.Location = new System.Drawing.Point(4, 24); 607this.tabPage2.Location = new System.Drawing.Point(4, 24); 618this.button12.Location = new System.Drawing.Point(17, 24); 629this.label5.Location = new System.Drawing.Point(286, 9); 641this.panel1.Location = new System.Drawing.Point(286, 30); 651this.tabControl1.Location = new System.Drawing.Point(5, 4); 661this.tabPage3.Location = new System.Drawing.Point(4, 24); 672this.button11.Location = new System.Drawing.Point(9, 9); 683this.tabPage4.Location = new System.Drawing.Point(4, 24); 694this.button13.Location = new System.Drawing.Point(9, 9); 709this.flowLayoutPanel3.Location = new System.Drawing.Point(26, 326); 717this.button14.Location = new System.Drawing.Point(4, 3); 727this.button22.Location = new System.Drawing.Point(4, 36); 737this.button23.Location = new System.Drawing.Point(4, 69); 748this.panel3.Location = new System.Drawing.Point(561, 199); 758this.tabControl3.Location = new System.Drawing.Point(12, 14); 767this.tabPage5.Location = new System.Drawing.Point(4, 24); 779this.tabPage6.Location = new System.Drawing.Point(4, 24); 790this.button24.Location = new System.Drawing.Point(19, 23);
ContainerControls2.Designer.cs (30)
75this.label8.Location = new System.Drawing.Point(13, 21); 84this.splitContainer1.Location = new System.Drawing.Point(13, 45); 107this.button15.Location = new System.Drawing.Point(10, 57); 117this.button16.Location = new System.Drawing.Point(21, 57); 128this.label9.Location = new System.Drawing.Point(27, 294); 144this.tableLayoutPanel1.Location = new System.Drawing.Point(27, 329); 159this.radioButton6.Location = new System.Drawing.Point(223, 72); 169this.radioButton5.Location = new System.Drawing.Point(203, 72); 179this.radioButton4.Location = new System.Drawing.Point(183, 72); 191this.checkBox2.Location = new System.Drawing.Point(93, 72); 202this.radioButton3.Location = new System.Drawing.Point(223, 3); 213this.radioButton2.Location = new System.Drawing.Point(203, 3); 222this.button18.Location = new System.Drawing.Point(93, 3); 231this.button17.Location = new System.Drawing.Point(3, 3); 241this.radioButton1.Location = new System.Drawing.Point(183, 3); 251this.checkBox1.Location = new System.Drawing.Point(3, 72); 261this.label13.Location = new System.Drawing.Point(337, 21); 271this.flowLayoutPanel4.Location = new System.Drawing.Point(337, 45); 280this.label14.Location = new System.Drawing.Point(337, 157); 291this.groupBox5.Location = new System.Drawing.Point(337, 182); 303this.label15.Location = new System.Drawing.Point(337, 294); 313this.panel4.Location = new System.Drawing.Point(337, 329); 322this.label16.Location = new System.Drawing.Point(582, 21); 331this.splitContainer2.Location = new System.Drawing.Point(586, 39); 350this.label17.Location = new System.Drawing.Point(582, 157); 361this.tabControl4.Location = new System.Drawing.Point(582, 182); 371this.tabPage7.Location = new System.Drawing.Point(4, 24); 382this.tabPage8.Location = new System.Drawing.Point(4, 24); 393this.label18.Location = new System.Drawing.Point(582, 294); 406this.tableLayoutPanel2.Location = new System.Drawing.Point(582, 329);
DataBindingExample.Designer.cs (19)
57this.comboBox1.Location = new System.Drawing.Point(10, 9); 68this.dataGridView1.Location = new System.Drawing.Point(12, 21); 80this.label1.Location = new System.Drawing.Point(10, 48); 90this.textBox1.Location = new System.Drawing.Point(10, 77); 100this.button1.Location = new System.Drawing.Point(10, 136); 122this.panel1.Location = new System.Drawing.Point(272, 12); 132this.radioButton1.Location = new System.Drawing.Point(336, 77); 144this.numericUpDown1.Location = new System.Drawing.Point(336, 39); 153this.domainUpDown1.Location = new System.Drawing.Point(336, 10); 163this.richTextBox1.Location = new System.Drawing.Point(169, 102); 175this.checkBox1.Location = new System.Drawing.Point(169, 77); 186this.maskedTextBox1.Location = new System.Drawing.Point(169, 45); 197this.linkLabel1.Location = new System.Drawing.Point(169, 12); 209this.label2.Location = new System.Drawing.Point(37, 224); 219this.treeView1.Location = new System.Drawing.Point(12, 242); 229this.label3.Location = new System.Drawing.Point(244, 225); 240this.listView1.Location = new System.Drawing.Point(162, 246); 252this.label4.Location = new System.Drawing.Point(476, 225); 264this.listBox1.Location = new System.Drawing.Point(453, 249);
DataControls.Designer.cs (3)
98this.bindingNavigator1.Location = new System.Drawing.Point(0, 0); 276this.dataGridView1.Location = new System.Drawing.Point(13, 323); 340this.dataGridView2.Location = new System.Drawing.Point(13, 46);
DialogControls.Designer.cs (4)
38this.ColorDialog.Location = new System.Drawing.Point(42, 12); 49this.FolderBrowserDialog.Location = new System.Drawing.Point(42, 67); 60this.OpenFileDialog.Location = new System.Drawing.Point(42, 125); 71this.SaveFileDialog.Location = new System.Drawing.Point(42, 181);
Main.Designer.cs (11)
47this.button1.Location = new System.Drawing.Point(14, 14); 58this.button2.Location = new System.Drawing.Point(14, 60); 69this.button3.Location = new System.Drawing.Point(13, 105); 80this.button4.Location = new System.Drawing.Point(13, 152); 91this.button5.Location = new System.Drawing.Point(13, 199); 102this.button6.Location = new System.Drawing.Point(14, 247); 113this.button7.Location = new System.Drawing.Point(13, 292); 124this.button8.Location = new System.Drawing.Point(14, 336); 135this.button9.Location = new System.Drawing.Point(13, 380); 146this.button10.Location = new System.Drawing.Point(14, 425); 156this.button12.Location = new System.Drawing.Point(15, 470);
Menu_Toolbars_controls.Designer.cs (3)
111menuStrip1.Location = new Point(0, 0); 422statusStrip1.Location = new Point(0, 520); 505toolStrip1.Location = new Point(0, 34);
MenuForm.Designer.cs (2)
37this.button1.Location = new System.Drawing.Point(78, 46); 48this.button2.Location = new System.Drawing.Point(264, 46);
PrintingControls.Designer.cs (8)
73this.label1.Location = new System.Drawing.Point(14, 10); 82this.txtPrint.Location = new System.Drawing.Point(191, 7); 91this.btnSetting.Location = new System.Drawing.Point(18, 43); 102this.btnPreView.Location = new System.Drawing.Point(112, 43); 113this.btnPrint.Location = new System.Drawing.Point(206, 43); 124this.button1.Location = new System.Drawing.Point(301, 43); 136this.label2.Location = new System.Drawing.Point(18, 86); 148this.printPreviewControl1.Location = new System.Drawing.Point(18, 104);
RemainingControls.Designer.cs (8)
46this.hScrollBar1.Location = new System.Drawing.Point(0, 406); 55this.vScrollBar1.Location = new System.Drawing.Point(576, 0); 63this.propertyGrid1.Location = new System.Drawing.Point(19, 80); 71this.propertyGrid2.Location = new System.Drawing.Point(292, 80); 80this.label1.Location = new System.Drawing.Point(19, 33); 89this.domainUpDown1.Location = new System.Drawing.Point(192, 31); 99this.label2.Location = new System.Drawing.Point(373, 33); 108this.trackBar1.Location = new System.Drawing.Point(431, 29);
ToolStripContainer.Designer.cs (5)
106this.toolStripContainer2.Location = new System.Drawing.Point(76, 44); 136this.toolStrip1.Location = new System.Drawing.Point(0, 200); 279this.statusStrip1.Location = new System.Drawing.Point(0, 0); 338this.menuStrip1.Location = new System.Drawing.Point(0, 0); 581this.button1.Location = new System.Drawing.Point(40, 369);
TrimTest (4)
Form1.Designer.cs (4)
47splitContainer1.Location = new Point(0, 0); 66textBox1.Location = new Point(0, 0); 81comboBox1.Location = new Point(37, 37); 88button1.Location = new Point(76, 108);
TrimTestBinaryDeserialization (1)
Form1.Designer.cs (1)
49listView1.Location = new Point(0, 0);
UnsupportedTypes (3)
CreateFrameworkTypes.cs (3)
69Location = new Point(200, 60), 119Location = new Point(0, 0), 138Location = new Point(0, 0),
VisualBasicRuntimeTest (2)
Program.cs (2)
135if (expectedValue == new Point(0, 0)) 159if (expectedValue == new Point(0, 0))
WindowsFormsIntegration (1)
System\Windows\Integration\WindowsFormsHost.cs (1)
799this.Location = new SD.Point(short.MinValue, short.MinValue);
WinFormsControlsTest (303)
AnchorLayoutTests.Designer.cs (9)
47this.button1.Location = new System.Drawing.Point(12, 12); 57this.button2.Location = new System.Drawing.Point(338, 12); 67this.button3.Location = new System.Drawing.Point(676, 12); 77this.button4.Location = new System.Drawing.Point(12, 198); 87this.button5.Location = new System.Drawing.Point(12, 404); 99this.button6.Location = new System.Drawing.Point(338, 198); 109this.button7.Location = new System.Drawing.Point(676, 198); 119this.button8.Location = new System.Drawing.Point(338, 404); 129this.button9.Location = new System.Drawing.Point(676, 404);
Calendar.Designer.cs (16)
63this.monthCalendar1.Location = new System.Drawing.Point(18, 80); 73this.minDateDateTimePicker.Location = new System.Drawing.Point(18, 334); 81this.setMinDateButton.Location = new System.Drawing.Point(18, 367); 93this.label1.Location = new System.Drawing.Point(18, 308); 103this.label2.Location = new System.Drawing.Point(19, 422); 112this.setMaxDateButton.Location = new System.Drawing.Point(19, 481); 123this.maxDateDateTimePicker.Location = new System.Drawing.Point(19, 448); 132this.label3.Location = new System.Drawing.Point(301, 336); 151this.daysOfWeekComboBox.Location = new System.Drawing.Point(301, 363); 160this.label4.Location = new System.Drawing.Point(18, 50); 169this.resetMinDateButton.Location = new System.Drawing.Point(146, 367); 180this.resetMaxDateButton.Location = new System.Drawing.Point(146, 481); 192this.showWeekNumbersCheckBox.Location = new System.Drawing.Point(301, 452); 204this.showTodayCheckBox.Location = new System.Drawing.Point(301, 484); 216this.label5.Location = new System.Drawing.Point(301, 422); 224this.currentDPILabel1.Location = new System.Drawing.Point(18, 18);
ChartControl.Designer.cs (4)
142this.chart1.Location = new System.Drawing.Point(16, 64); 215this.chart2.Location = new System.Drawing.Point(752, 64); 288this.chart3.Location = new System.Drawing.Point(16, 522); 357this.chart4.Location = new System.Drawing.Point(752, 522);
CollectionEditors.Designer.cs (7)
46this.comboBox1.Location = new System.Drawing.Point(4, 64); 54this.maskedTextBox1.Location = new System.Drawing.Point(4, 91); 62this.textBox1.Location = new System.Drawing.Point(4, 12); 71this.listView1.Location = new System.Drawing.Point(4, 117); 83this.propertyGrid1.Location = new System.Drawing.Point(132, 37); 91this.label1.Location = new System.Drawing.Point(132, 13); 99this.domainUpDown1.Location = new System.Drawing.Point(4, 38);
ComboBoxes.Designer.cs (16)
59this.comboBox1.Location = new System.Drawing.Point(21, 22); 79this.comboBox2.Location = new System.Drawing.Point(148, 22); 98this.comboBox3.Location = new System.Drawing.Point(21, 59); 113this.comboBox4.Location = new System.Drawing.Point(148, 59); 124this.comboBox5.Location = new System.Drawing.Point(21, 96); 137this.comboBox6.Location = new System.Drawing.Point(148, 96); 149this.comboBox7.Location = new System.Drawing.Point(21, 136); 162this.comboBox8.Location = new System.Drawing.Point(148, 136); 175this.comboBox9.Location = new System.Drawing.Point(696, 22); 188this.comboBox10.Location = new System.Drawing.Point(560, 22); 202this.comboBox11.Location = new System.Drawing.Point(419, 22); 222this.comboBox12.Location = new System.Drawing.Point(275, 22); 231this.dataBoundComboBox.Location = new System.Drawing.Point(836, 22); 239this.currentDPILabel1.Location = new System.Drawing.Point(18, 173); 249this.label1.Location = new System.Drawing.Point(18, 6); 258this.dataBoundLabel.Location = new System.Drawing.Point(836, 6);
ComboBoxesWithScrollBars.Designer.cs (22)
74this.comboBox1.Location = new System.Drawing.Point(37, 348); 86this.comboBox2.Location = new System.Drawing.Point(206, 348); 98this.comboBox3.Location = new System.Drawing.Point(370, 348); 113this.changeHeightGroupBox1.Location = new System.Drawing.Point(14, 14); 125this.label1.Location = new System.Drawing.Point(23, 28); 134this.changeDDH_UpDown1.Location = new System.Drawing.Point(23, 61); 150this.label2.Location = new System.Drawing.Point(192, 28); 159this.changeCBHeight_UpDown2.Location = new System.Drawing.Point(192, 61); 173this.label3.Location = new System.Drawing.Point(356, 28); 182this.changeDDH_UpDown3.Location = new System.Drawing.Point(356, 61); 200this.changeMaxDropDownItemsGroupBox2.Location = new System.Drawing.Point(14, 121); 211this.maxDropDownItemsUpDown1.Location = new System.Drawing.Point(23, 22); 224this.maxDropDownItemsUpDown2.Location = new System.Drawing.Point(192, 22); 238this.maxDropDownItemsUpDown3.Location = new System.Drawing.Point(356, 22); 254this.changeIntegralHeightGroupBox3.Location = new System.Drawing.Point(14, 192); 266this.integralHeightCheckBox1.Location = new System.Drawing.Point(23, 33); 277this.integralHeightCheckBox2.Location = new System.Drawing.Point(192, 33); 288this.integralHeightCheckBox3.Location = new System.Drawing.Point(356, 33); 301this.changeHeightsStyleGroupBox4.Location = new System.Drawing.Point(14, 262); 313this.useDifferentHeightsCheckBox1.Location = new System.Drawing.Point(23, 33); 324this.useDifferentHeightsCheckBox2.Location = new System.Drawing.Point(192, 33); 335this.useDifferentHeightsCheckBox3.Location = new System.Drawing.Point(356, 33);
CustomComCtl32Button.cs (3)
30Location = new Point(1, 0) 40Location = new Point(1, 30) 49Location = new Point(1, 60)
DataGridViewInVirtualModeTest.Designer.cs (1)
53this.dataGridView1.Location = new System.Drawing.Point(0, 15);
DataGridViewTest.Designer.cs (6)
84this.dataGridView1.Location = new System.Drawing.Point(0, 0); 138this.currentDPILabel1.Location = new System.Drawing.Point(12, 174); 149this.changeFontButton.Location = new System.Drawing.Point(12, 234); 160this.numericUpDown1.Location = new System.Drawing.Point(89, 208); 186this.label1.Location = new System.Drawing.Point(12, 210); 197this.resetFontButton.Location = new System.Drawing.Point(192, 234);
DateTimePicker.Designer.cs (5)
45this.dateTimePicker1.Location = new Point(31, 32); 55this.dateTimePicker2.Location = new Point(31, 78); 66this.dateTimePicker3.Location = new Point(31, 128); 76this.dateTimePicker4.Location = new Point(31, 175); 86this.dateTimePicker5.Location = new Point(31, 221);
DesignTimeAligned.Designer.cs (5)
44this.label1.Location = new System.Drawing.Point(72, 18); 55this.label2.Location = new System.Drawing.Point(72, 76); 65this.button1.Location = new System.Drawing.Point(122, 66); 76this.textBox1.Location = new System.Drawing.Point(122, 12); 86this.currentDPILabel1.Location = new System.Drawing.Point(25, 159);
Dialogs.Designer.cs (8)
54this.propertyGrid1.Location = new System.Drawing.Point(171, 0); 63this.btnOpenFileDialog.Location = new System.Drawing.Point(3, 3); 73this.btnColorDialog.Location = new System.Drawing.Point(3, 32); 83this.btnThreadExceptionDialog.Location = new System.Drawing.Point(3, 32); 93this.btnPrintDialog.Location = new System.Drawing.Point(3, 32); 103this.btnFolderBrowserDialog.Location = new System.Drawing.Point(3, 61); 113this.btnSaveFileDialog.Location = new System.Drawing.Point(3, 3); 130this.flowLayoutPanel1.Location = new System.Drawing.Point(0, 0);
DockLayoutTests.Designer.cs (5)
46this.button1.Location = new System.Drawing.Point(0, 0); 56this.button3.Location = new System.Drawing.Point(688, 0); 66this.button2.Location = new System.Drawing.Point(112, 0); 76this.button4.Location = new System.Drawing.Point(112, 384); 86this.button5.Location = new System.Drawing.Point(112, 89);
DragDrop.cs (6)
183pictureBox.DoDragDrop(data, DragDropEffects.All, _nyanCatBmp, new Point(0, 96), true); 196e.CursorOffset = new Point(0, 111); 204e.CursorOffset = new Point(0, 96); 546toolStripItem.DoDragDrop(data, DragDropEffects.All, _dragAcceptBmp, new Point(0, 96), true); 558toolStripItem.DoDragDrop(data, DragDropEffects.All, _nyanCatBmp, new Point(0, 96), true); 570toolStripItem.DoDragDrop(data, DragDropEffects.All, _nyanCatAscii301Bmp, new Point(0, 111), false);
DragDrop.Designer.cs (11)
71tableLayoutPanel1.Location = new Point(0, 0); 87textBox.Location = new Point(735, 3); 98richTextBox.Location = new Point(118, 3); 110pictureBox1.Location = new Point(3, 3); 121pictureBox2.Location = new Point(3, 115); 132pictureBox3.Location = new Point(3, 227); 143pictureBox4.Location = new Point(3, 339); 154pictureBox5.Location = new Point(3, 451); 168tableLayoutPanel2.Location = new Point(1046, 563); 178buttonOpenCats.Location = new Point(3, 3); 188buttonClear.Location = new Point(92, 3);
ErrorProviderTest.Designer.cs (7)
60this.label1.Location = new System.Drawing.Point(19, 26); 69this.label1_2.Location = new System.Drawing.Point(19, 41); 77this.textBox1.Location = new System.Drawing.Point(19, 60); 90this.label2.Location = new System.Drawing.Point(19, 100); 99this.label2_1.Location = new System.Drawing.Point(19, 115); 107this.textBox2.Location = new System.Drawing.Point(19, 135); 118this.submitButton.Location = new System.Drawing.Point(19, 180);
FormBorderStyles.Designer.cs (2)
37this.btnChangeFormBorderStyle.Location = new System.Drawing.Point(13, 13); 48this.lblFormBorderStyle.Location = new System.Drawing.Point(13, 43);
FormShowInTaskbar.cs (2)
20Location = new Point(10, 10), 41Location = new Point(10, 10),
ListBoxes.Designer.cs (20)
58this.label1.Location = new System.Drawing.Point(20, 10); 65this.listBox1.Location = new System.Drawing.Point(20, 40); 74this.textBox1.Location = new System.Drawing.Point(240, 40); 82this.addButton1.Location = new System.Drawing.Point(240, 80); 91this.deleteButton1.Location = new System.Drawing.Point(240, 110); 99this.label2.Location = new System.Drawing.Point(20, 200); 105this.listBox2.Location = new System.Drawing.Point(20, 240); 112this.textBox2.Location = new System.Drawing.Point(240, 240); 120this.addButton2.Location = new System.Drawing.Point(240, 300); 129this.deleteButton2.Location = new System.Drawing.Point(240, 330); 137this.label3.Location = new System.Drawing.Point(360, 10); 143this.listBox3.Location = new System.Drawing.Point(360, 40); 152this.textBox3.Location = new System.Drawing.Point(600, 40); 160this.addButton3.Location = new System.Drawing.Point(600, 80); 169this.deleteButton3.Location = new System.Drawing.Point(600, 110); 177this.label4.Location = new System.Drawing.Point(360, 200); 184this.listBox4.Location = new System.Drawing.Point(360, 240); 194this.textBox4.Location = new System.Drawing.Point(600, 240); 202this.addButton4.Location = new System.Drawing.Point(600, 300); 211this.deleteButton4.Location = new System.Drawing.Point(600, 330);
ListViewTest.cs (1)
57Bounds = new Rectangle(new Point(0, 0), new Size(400, 200)),
ListViewTest.Designer.cs (4)
79this.listView1.Location = new System.Drawing.Point(12, 33); 109this.btnClearListView1.Location = new System.Drawing.Point(13, 4); 119this.btnLoadImagesListView1.Location = new System.Drawing.Point(95, 4); 141this.btnReplaceImageListView1.Location = new System.Drawing.Point(176, 4);
MainForm.Designer.cs (1)
42this.overarchingFlowLayoutPanel.Location = new System.Drawing.Point(8, 8);
MdiChild.Designer.cs (8)
55this.panel1.Location = new System.Drawing.Point(0, 0); 64this.chkChildAlign.Location = new System.Drawing.Point(43, 121); 75this.chkRightToLeft.Location = new System.Drawing.Point(228, 121); 86this.btnOpenChild.Location = new System.Drawing.Point(40, 22); 97this.chkSetParentMenustrip.Location = new System.Drawing.Point(43, 73); 108this.chkSetMenustrip.Location = new System.Drawing.Point(228, 73); 119this.chkAddParentMenustrip.Location = new System.Drawing.Point(43, 97); 130this.chkAddMenustrip.Location = new System.Drawing.Point(228, 97);
MediaPlayer.Designer.cs (1)
45this.axWindowsMediaPlayer1.Location = new System.Drawing.Point(0, 0);
MenuStripAndCheckedListBox.Designer.cs (2)
73this.menuStrip1.Location = new System.Drawing.Point(0, 0); 274this.currentDpiLabel.Location = new System.Drawing.Point(22, 66);
MessageBoxes.Designer.cs (1)
42this.propertyGrid1.Location = new System.Drawing.Point(171, 0);
MultipleControls.cs (1)
22Bounds = new Rectangle(new Point(0, 0), new Size(400, 200)),
MultipleControls.Designer.cs (21)
65this.progressBar1.Location = new System.Drawing.Point(0, 0); 79this.button1.Location = new System.Drawing.Point(15, 50); 93this.label1.Location = new System.Drawing.Point(15, 84); 101this.maskedTextBox1.Location = new System.Drawing.Point(15, 104); 110this.richTextBox1.Location = new System.Drawing.Point(15, 135); 118this.textBox1.Location = new System.Drawing.Point(15, 264); 129this.tabControl1.Location = new System.Drawing.Point(141, 50); 140this.tabPage1.Location = new System.Drawing.Point(4, 24); 151this.comboBox1.Location = new System.Drawing.Point(22, 30); 160this.tabPage2.Location = new System.Drawing.Point(4, 24); 171this.checkBox1.Location = new System.Drawing.Point(8, 22); 181this.checkBox2.Location = new System.Drawing.Point(8, 50); 191this.radioButton2.Location = new System.Drawing.Point(19, 55); 201this.radioButton1.Location = new System.Drawing.Point(19, 29); 216this.groupBox1.Location = new System.Drawing.Point(146, 197); 232this.checkedListBox1.Location = new System.Drawing.Point(378, 49); 241this.numericUpDown1.Location = new System.Drawing.Point(378, 197); 252this.domainUpDown1.Location = new System.Drawing.Point(378, 227); 261this.linkLabel1.Location = new System.Drawing.Point(62, 84); 271this.linkLabel2.Location = new System.Drawing.Point(378, 255); 290this.checkedListBox2.Location = new System.Drawing.Point(525, 49);
Password.Designer.cs (20)
60textBox1.Location = new Point(26, 113); 68textBox2.Location = new Point(26, 191); 77label1.Location = new Point(26, 84); 86label2.Location = new Point(25, 163); 94maskedTextBox1.Location = new Point(316, 191); 102maskedTextBox2.Location = new Point(316, 113); 110maskedTextBox3.Location = new Point(316, 279); 120textBox3.Location = new Point(26, 279); 128button1.Location = new Point(26, 338); 138textBox4.Location = new Point(623, 251); 147textBox5.Location = new Point(623, 113); 157label3.Location = new Point(26, 27); 166label4.Location = new Point(310, 27); 175label5.Location = new Point(611, 27); 184label6.Location = new Point(611, 213); 193label7.Location = new Point(611, 84); 202label8.Location = new Point(310, 163); 211label9.Location = new Point(310, 84); 220label10.Location = new Point(26, 251); 229label11.Location = new Point(310, 251);
PictureBoxes.Designer.cs (3)
45this.pictureBox1.Location = new System.Drawing.Point(11, 39); 58this.btnloadImage.Location = new System.Drawing.Point(539, 9); 71this.imageUri.Location = new System.Drawing.Point(13, 11);
PropertyGrid.Designer.cs (1)
41this.propertyGrid1.Location = new System.Drawing.Point(0, 0);
RichTextBoxes.Designer.cs (2)
41this.richTextBox1.Location = new System.Drawing.Point(0, 0); 52this.richTextBox2.Location = new System.Drawing.Point(0, 104);
ScalingBeforeChanges.Designer.cs (1)
40this.checkBox1.Location = new System.Drawing.Point(39, 73);
ScrollableControls.Designer.cs (33)
97flowLayoutPanel1.Location = new Point(12, 33); 104button1.Location = new Point(3, 3); 113button2.Location = new Point(3, 32); 122button3.Location = new Point(3, 61); 131button4.Location = new Point(3, 90); 140button5.Location = new Point(3, 119); 150label1.Location = new Point(12, 9); 164panel1.Location = new Point(166, 37); 171button9.Location = new Point(24, 113); 180button8.Location = new Point(24, 87); 189button7.Location = new Point(3, 29); 198button6.Location = new Point(3, 3); 208label2.Location = new Point(200, 9); 217splitContainer1.Location = new Point(344, 40); 240button16.Location = new Point(3, 87); 249button15.Location = new Point(-11, 61); 258button10.Location = new Point(-31, 31); 267button14.Location = new Point(62, 112); 276button13.Location = new Point(48, 87); 285button12.Location = new Point(31, 61); 294button11.Location = new Point(16, 31); 304label3.Location = new Point(371, 4); 314tabControl1.Location = new Point(538, 47); 324tabPage1.Location = new Point(4, 24); 334button17.Location = new Point(11, 24); 343tabPage2.Location = new Point(4, 24); 354label4.Location = new Point(593, 9); 363label5.Location = new Point(29, 193); 371textBox1.Location = new Point(16, 247); 382treeView1.Location = new Point(170, 229); 409label6.Location = new Point(181, 193); 418label7.Location = new Point(389, 193); 429listBox1.Location = new Point(348, 229);
ScrollBars.Designer.cs (9)
51this.hScrollBar.Location = new System.Drawing.Point(37, 63); 59this.vScrollBar.Location = new System.Drawing.Point(275, 63); 67this.numericMinimum.Location = new System.Drawing.Point(37, 132); 75this.numericMaximum.Location = new System.Drawing.Point(37, 194); 89this.chbRightToLeft.Location = new System.Drawing.Point(37, 250); 100this.lblMinimum.Location = new System.Drawing.Point(37, 109); 109this.lblMaximum.Location = new System.Drawing.Point(37, 171); 118this.lblHValue.Location = new System.Drawing.Point(37, 33); 127this.lblVValue.Location = new System.Drawing.Point(275, 33);
Splitter.Designer.cs (1)
42this.splitContainer1.Location = new System.Drawing.Point(0, 0);
TextBoxes.Designer.cs (6)
44this.textBox.Location = new System.Drawing.Point(20, 20); 52this.RTLTextBox.Location = new System.Drawing.Point(160, 20); 61this.multilineTextBox.Location = new System.Drawing.Point(20, 60); 84this.RTLMultilineTextBox.Location = new System.Drawing.Point(160, 60); 108this.richTextBox.Location = new System.Drawing.Point(20, 190); 129this.RTLRichTextBox.Location = new System.Drawing.Point(160, 190);
ToolStripSeparatorPreferredSize.cs (3)
48_toolStrip1.Location = new System.Drawing.Point(0, 0); 71_buttonChangeOrientation.Location = new System.Drawing.Point(10, 75); 80_label1.Location = new System.Drawing.Point(10, 50);
ToolStripTests.Designer.cs (6)
88this.toolStrip1.Location = new System.Drawing.Point(0, 0); 108this.toolStrip2.Location = new System.Drawing.Point(0, 22); 120this.toolStrip3.Location = new System.Drawing.Point(0, 45); 132this.toolStrip4.Location = new System.Drawing.Point(0, 68); 381this.statusStrip1.Location = new System.Drawing.Point(0, 142); 391this.label1.Location = new System.Drawing.Point(12, 127);
ToolTipTests.Designer.cs (8)
52this.delaysNotSetButton.Location = new System.Drawing.Point(8, 411); 63this.automaticDelayButton.Location = new System.Drawing.Point(8, 9); 74this.autoPopDelayButton.Location = new System.Drawing.Point(8, 210); 92this.flowLayoutPanel1.Location = new System.Drawing.Point(0, 0); 100this.defaultAutomaticDelayButton.Location = new System.Drawing.Point(8, 612); 111this.defaultAutoPopDelayButton.Location = new System.Drawing.Point(8, 813); 122this.initialDelayButton.Location = new System.Drawing.Point(8, 1014); 134this.autoEllipsisButton.Location = new System.Drawing.Point(8, 1215);
TrackBars.Designer.cs (15)
60this.trackBar1.Location = new System.Drawing.Point(10, 30); 72this.rbHorizontal.Location = new System.Drawing.Point(18, 26); 85this.rbVertical.Location = new System.Drawing.Point(18, 56); 98this.gbOrientation.Location = new System.Drawing.Point(65, 78); 110this.chbRightToLeft.Location = new System.Drawing.Point(83, 176); 122this.chbRightToLeftLayout.Location = new System.Drawing.Point(83, 199); 134this.tickstyleNone.Location = new System.Drawing.Point(83, 222); 145this.numericMinimum.Location = new System.Drawing.Point(260, 104); 164this.numericMaximum.Location = new System.Drawing.Point(260, 149); 183this.numericFrequency.Location = new System.Drawing.Point(260, 193); 203this.lblMinimum.Location = new System.Drawing.Point(260, 87); 212this.lblMaximum.Location = new System.Drawing.Point(260, 131); 221this.lblTickFrequency.Location = new System.Drawing.Point(260, 176); 230this.lblTrackBarSize.Location = new System.Drawing.Point(166, 9); 239this.lblTrackBarValue.Location = new System.Drawing.Point(12, 9);
2128 references to Point
BinaryFormatTests (5)
FormatTests\FormattedObject\BinaryFormattedTypes.cs (1)
53typeof(Point),
FormatTests\FormattedObject\BinaryFormatWriterTests.cs (2)
192Point.Empty, 232new Point[] { default },
FormatTests\FormattedObject\HashTableTests.cs (1)
236{ "Foo", default(Point) }
FormatTests\FormattedObject\ListTests.cs (1)
50default(Point)
DesignSurfaceExt (2)
DesignSurfaceExt.cs (1)
154public TControl CreateControl<TControl>(Size controlSize, Point controlLocation)
IDesignSurfaceExt.cs (1)
24TControl CreateControl<TControl>(Size controlSize, Point controlLocation)
Microsoft.VisualStudio.LanguageServices.Test.Utilities2 (1)
CodeModel\CodeModelTestHelpers.vb (1)
41SystemDrawingPath = GetType(System.Drawing.Point).Assembly.Location
netstandard (1)
netstandard.cs (1)
748[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Drawing.Point))]
PresentationUI (1)
MS\Internal\Documents\RMPublishingDialog.RightsTable.cs (1)
1040System.Drawing.Point p = new System.Drawing.Point(
System.ComponentModel.TypeConverter (3)
System\Drawing\PointConverter.cs (3)
60if (value is Point pt) 77ConstructorInfo? ctor = typeof(Point).GetConstructor([typeof(int), typeof(int)]); 110PropertyDescriptorCollection props = TypeDescriptor.GetProperties(typeof(Point), attributes);
System.Data.Common (1)
System\Data\TypeLimiter.cs (1)
175typeof(Point),
System.Drawing (1)
System.Drawing.cs (1)
105[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Drawing.Point))]
System.Drawing.Common (1)
Special\Forwards.cs (1)
8[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Drawing.Point))]
System.Drawing.Common.Tests (228)
mono\System.Drawing\GraphicsTests.cs (17)
706private static readonly Point[] s_tooSmallCurve = [new(0, 0), new(15, 5)]; 1523Point[] pts = [new(5, 5), new(15, 5), new(15, 15)]; 2510Assert.Throws<ArgumentNullException>(() => g.DrawImage(null, Array.Empty<Point>())); 2518Assert.Throws<ArgumentNullException>(() => g.DrawImage(bmp, (Point[])null)); 2526Assert.Throws<ArgumentException>(() => g.DrawImage(bmp, Array.Empty<Point>())); 2624Point[] pts = [new(1, 1), new(2, 2), new(3, 3)]; 2630private static void DrawImage_ImagePointRectangleGraphicsUnit(Point[] pts) 2653Point p = new(1, 1); 2660Point p = new(1, 1); 2667Point p = new(1, 1); 2674Point p = new(1, 1); 2739Point p = new(1, 1); 2740Point[] pts = [p, p, p]; 2750Point p = new(1, 1); 2751Point[] pts = [p, p, p]; 2939Point[] pts = new Point[5];
System\Drawing\Drawing2D\GraphicsPathIteratorTests.cs (1)
189Point[] points = [new(1, 1), new(2, 2), new(3, 3), new(4, 4)];
System\Drawing\Drawing2D\GraphicsPathTests.cs (34)
56Point[] points = [ 82AssertExtensions.Throws<ArgumentNullException>("pts", () => new GraphicsPath((Point[])null, new byte[1])); 95AssertExtensions.Throws<ArgumentException>(null, () => new GraphicsPath(new Point[pointsLength], new byte[typesLength])); 280Point[] intPoints = [ 316AssertExtensions.Throws<ArgumentNullException>("points", () => new GraphicsPath().AddLines((Point[])null)); 323AssertExtensions.Throws<ArgumentException>("points", null, () => new GraphicsPath().AddLines(Array.Empty<Point>())); 428AssertExtensions.Throws<ArgumentNullException>("points", () => gp.AddBeziers((Point[])null)); 450Point[] intPoints = [new(1, 1), new(2, 2)]; 466Point[] intPoints = [new(1, 1), new(2, 2)]; 481Point[] intPoints = [new(1, 1), new(1, 1)]; 500Point[] intPoints = [new(1, 1), new(2, 2)]; 559AssertExtensions.Throws<ArgumentException>(null, () => gp.AddCurve((Point[])null)); 579yield return new object[] { Array.Empty<Point>() }; 580yield return new object[] { new Point[1] { new(1, 1) } }; 585public void AddCurve_InvalidPointsLength_ThrowsArgumentException(Point[] points) 667AssertExtensions.Throws<ArgumentNullException>("points", () => gp.AddClosedCurve((Point[])null)); 672yield return new object[] { Array.Empty<Point>() }; 673yield return new object[] { new Point[1] { new(1, 1) } }; 674yield return new object[] { new Point[2] { new(1, 1), new(2, 2) } }; 679public void AddClosedCurve_InvalidPointsLength_ThrowsArgumentException(Point[] points) 939AssertExtensions.Throws<ArgumentNullException>("points", () => new GraphicsPath().AddPolygon((Point[])null)); 960yield return new object[] { Array.Empty<Point>() }; 961yield return new object[] { new Point[1] { new(1, 1) } }; 962yield return new object[] { new Point[2] { new(1, 1), new(2, 2) } }; 967public void AddPolygon_InvalidPointsLength_ThrowsArgumentException(Point[] points) 1849new Point[] 1859public void Reverse_Beziers_Success(Point[] points) 1868public void Reverse_ClosedCurve_Success(Point[] points) 1877public void Reverse_Curve_Success(Point[] points) 1911public void Reverse_Lines_Success(Point[] points) 1920public void Reverse_Polygon_Success(Point[] points) 2043Point[] expectedPoints = [ 2253Point point = new(12, 2); 2281Point point = new(15, 10);
System\Drawing\Drawing2D\LinearGradientBrushTests.cs (4)
24public void Ctor_PointF_PointF_Color_Color(Point point1, Point point2, Color color1, Color color2, RectangleF expectedRectangle) 51public void Ctor_Point_Point_Color_Color(Point point1, Point point2, Color color1, Color color2, RectangleF expectedRectangle)
System\Drawing\Drawing2D\MatrixTests.cs (40)
98yield return new object[] { new Rectangle(1, 4, 8, 16), new Point[] { new(32, 64), new(128, 256), new(512, 1024) }, new float[] { 12, 24, 30, 60, -100, -200 }, false, false }; 99yield return new object[] { new Rectangle(0, 0, 2, 4), new Point[] { new(8, 16), new(32, 64), new(128, 256) }, new float[] { 12, 24, 30, 60, 8, 16 }, false, false }; 100yield return new object[] { new Rectangle(0, 0, 1, 1), new Point[] { new(0, 0), new(0, 0), new(0, 0) }, new float[] { 0, 0, 0, 0, 0, 0 }, false, false }; 101yield return new object[] { new Rectangle(0, 0, 1, 1), new Point[] { new(0, 0), new(1, 0), new(0, 1) }, new float[] { 1, 0, 0, 1, 0, 0 }, true, true }; 106public void Ctor_Rectangle_Points(Rectangle rect, Point[] plgpnts, float[] expectedElements, bool isIdentity, bool isInvertible) 118public void Ctor_RectangleF_Points(Rectangle rect, Point[] plgpnts, float[] expectedElements, bool isIdentity, bool isInvertible) 142AssertExtensions.Throws<ArgumentException>(null, () => new Matrix(default, new Point[length])); 148Assert.Throws<ExternalException>(() => new Matrix(new Rectangle(1, 1, 0, 1), new Point[3])); 155Assert.Throws<ExternalException>(() => new Matrix(new Rectangle(1, 1, 1, 0), new Point[3])); 446if (point == Point.Empty) 460if (point == Point.Empty) 699yield return new object[] { new Matrix(2, 4, 6, 8, 10, 12), new Point[] { new(2, 4), new(4, 8) }, new Point[] { new(38, 52), new(66, 92) } }; 700yield return new object[] { new Matrix(), new Point[] { new(2, 4), new(4, 8) }, new Point[] { new(2, 4), new(4, 8) } }; 701yield return new object[] { new Matrix(2, 4, 6, 8, 10, 12), new Point[1], new Point[] { new(10, 12) } }; 706public void TransformPoints_Point_Success(Matrix matrix, Point[] points, Point[] expectedPoints) 717public void TransformPoints_PointF_Success(Matrix matrix, Point[] points, Point[] expectedPoints) 731AssertExtensions.Throws<ArgumentNullException>("pts", () => matrix.TransformPoints((Point[])null)); 739AssertExtensions.Throws<ArgumentException>(null, () => matrix.TransformPoints(Array.Empty<Point>())); 748AssertExtensions.Throws<ArgumentException>(null, () => disposedMatrix.TransformPoints(new Point[1])); 754yield return new object[] { new Matrix(2, 4, 6, 8, 10, 12), new Point[] { new(2, 4), new(4, 8) }, new Point[] { new(28, 40), new(56, 80) } }; 755yield return new object[] { new Matrix(), new Point[] { new(2, 4), new(4, 8) }, new Point[] { new(2, 4), new(4, 8) } }; 756yield return new object[] { new Matrix(2, 4, 6, 8, 10, 12), new Point[1], new Point[1] }; 761public void TransformVectors_Point_Success(Matrix matrix, Point[] points, Point[] expectedPoints) 772public void TransformVectors_PointF_Success(Matrix matrix, Point[] points, Point[] expectedPoints) 784public void VectorTransformPoints_Points_Success(Matrix matrix, Point[] points, Point[] expectedPoints) 798AssertExtensions.Throws<ArgumentNullException>("pts", () => matrix.TransformVectors((Point[])null)); 807AssertExtensions.Throws<ArgumentException>(null, () => matrix.TransformVectors(Array.Empty<Point>())); 816AssertExtensions.Throws<ArgumentException>(null, () => disposedMatrix.VectorTransformPoints(new Point[1])); 817AssertExtensions.Throws<ArgumentException>(null, () => disposedMatrix.TransformPoints(new Point[1]));
System\Drawing\Drawing2D\PathGradientBrushTests.cs (7)
32private readonly Point[] _defaultIntPoints = [new(1, 2), new(20, 30)]; 71AssertExtensions.Throws<ArgumentNullException>("points", () => new PathGradientBrush((Point[])null)); 80Assert.Throws<ArgumentException>(() => new PathGradientBrush(new Point[pointsLength])); 81Assert.Throws<ArgumentException>(() => new PathGradientBrush(new Point[pointsLength], WrapMode.Clamp)); 199yield return new object[] { new Point[2] { new(1, 1), new(2, 2) }, Array.Empty<Color>() }; 200yield return new object[] { new Point[2] { new(1, 1), new(2, 2) }, new Color[3] }; 205public void SurroundColors_InvalidColorsLength_ThrowsArgumentException(Point[] points, Color[] colors)
System\Drawing\Graphics_DrawBezierTests.cs (19)
28Point[] points = 66AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawBezier(null, Point.Empty, Point.Empty, Point.Empty, Point.Empty)); 79AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawBezier(pen, Point.Empty, Point.Empty, Point.Empty, Point.Empty)); 93Assert.Throws<InvalidOperationException>(() => graphics.DrawBezier(pen, Point.Empty, Point.Empty, Point.Empty, Point.Empty)); 121AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawBeziers(null, new Point[2])); 133AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawBeziers(pen, new Point[2])); 143AssertExtensions.Throws<ArgumentNullException>("points", () => graphics.DrawBeziers(pen, (Point[])null)); 153AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawBeziers(pen, Array.Empty<Point>())); 166Assert.Throws<InvalidOperationException>(() => graphics.DrawBeziers(pen, new Point[2])); 183AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawBeziers(pen, new Point[2]));
System\Drawing\Graphics_DrawLineTests.cs (14)
43AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawLine(null, Point.Empty, Point.Empty)); 57AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawLine(pen, Point.Empty, Point.Empty)); 72Assert.Throws<InvalidOperationException>(() => graphics.DrawLine(pen, Point.Empty, Point.Empty)); 91AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawLine(pen, Point.Empty, Point.Empty)); 102AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawLines(null, new Point[2])); 114AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawLines(pen, new Point[2])); 124AssertExtensions.Throws<ArgumentNullException>("points", () => graphics.DrawLines(pen, (Point[])null)); 136AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawLines(pen, new Point[length])); 149Assert.Throws<InvalidOperationException>(() => graphics.DrawLines(pen, new Point[2])); 166AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawLines(pen, new Point[2]));
System\Drawing\GraphicsTests.cs (75)
253VerifyGraphics(graphics, new Rectangle(Point.Empty, image.Size)); 324targetGraphics.DrawImage(image, Point.Empty); 857public void RenderingOrigin_SetToCustom_RendersExpected(Point renderingOrigin, Color[][] expectedRendering) 880Assert.Throws<InvalidOperationException>(() => graphics.RenderingOrigin = Point.Empty); 896AssertExtensions.Throws<ArgumentException>(null, () => graphics.RenderingOrigin = Point.Empty); 1623graphics.CopyFromScreen(Point.Empty, Point.Empty, new Size(1, 1), copyPixelOperation); 1663Assert.Throws<InvalidOperationException>(() => graphics.CopyFromScreen(Point.Empty, Point.Empty, Size.Empty)); 1664Assert.Throws<InvalidOperationException>(() => graphics.CopyFromScreen(Point.Empty, Point.Empty, Size.Empty, CopyPixelOperation.DestinationInvert)); 1681AssertExtensions.Throws<ArgumentException>(null, () => graphics.CopyFromScreen(Point.Empty, Point.Empty, Size.Empty)); 1682AssertExtensions.Throws<ArgumentException>(null, () => graphics.CopyFromScreen(Point.Empty, Point.Empty, Size.Empty, CopyPixelOperation.MergeCopy)); 1691new Point[] { new(1, 1), new(2, 2) }, 1692new Point[] { new(1, 1), new(2, 2) } 1699new Point[] { new(1, 1), new(2, 2) }, 1700new Point[] { new(9, 12), new(13, 18) } 1707new Point[] { new(1, 1), new(2, 2) }, 1708new Point[] { new(1, 1), new(2, 2) } 1715new Point[] { new(1, 1), new(2, 2) }, 1716new Point[] { new(9, 12), new(13, 18) } 1723new Point[] { new(1, 1), new(2, 2) }, 1724new Point[] { new(1, -1), new(0, -1) } 1731new Point[] { new(1, 1), new(2, 2) }, 1732new Point[] { new(1, -1), new(0, -1) } 1738public void TransformPoints_Points_Success(CoordinateSpace destSpace, CoordinateSpace srcSpace, Point[] points, Point[] expected) 1826var points = new Point[] { new(1, 1) }; 1874AssertExtensions.Throws<ArgumentNullException>("pts", () => graphics.TransformPoints(CoordinateSpace.Page, CoordinateSpace.Page, (Point[])null)); 1883AssertExtensions.Throws<ArgumentException>(null, () => graphics.TransformPoints(CoordinateSpace.Page, CoordinateSpace.Page, Array.Empty<Point>())); 1895Assert.Throws<InvalidOperationException>(() => graphics.TransformPoints(CoordinateSpace.Page, CoordinateSpace.Page, [Point.Empty])); 1911AssertExtensions.Throws<ArgumentException>(null, () => graphics.TransformPoints(CoordinateSpace.Page, CoordinateSpace.Page, [Point.Empty])); 2312AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawPolygon(null, new Point[2])); 2324AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawPolygon(pen, new Point[2])); 2334AssertExtensions.Throws<ArgumentNullException>("points", () => graphics.DrawPolygon(pen, (Point[])null)); 2346AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawPolygon(pen, new Point[length])); 2359Assert.Throws<InvalidOperationException>(() => graphics.DrawPolygon(pen, new Point[2])); 2376AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawPolygon(pen, new Point[2])); 2457AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawCurve(null, new Point[2])); 2459AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawCurve(null, new Point[2], 1)); 2462AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawCurve(null, new Point[2], 0, 2, 1)); 2474AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new Point[2])); 2476AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new Point[2], 1)); 2479AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new Point[2], 0, 2, 1)); 2489AssertExtensions.Throws<ArgumentNullException>("points", () => graphics.DrawCurve(pen, (Point[])null)); 2491AssertExtensions.Throws<ArgumentNullException>("points", () => graphics.DrawCurve(pen, (Point[])null, 1)); 2494AssertExtensions.Throws<ArgumentNullException>("points", () => graphics.DrawCurve(pen, (Point[])null, 0, 2, 1)); 2506AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new Point[length])); 2508AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new Point[length], 1)); 2511AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new Point[length], 0, length, 1)); 2527AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new Point[length], offset, numberOfSegments, 1)); 2540Assert.Throws<InvalidOperationException>(() => graphics.DrawCurve(pen, new Point[2])); 2542Assert.Throws<InvalidOperationException>(() => graphics.DrawCurve(pen, new Point[2], 1)); 2545Assert.Throws<InvalidOperationException>(() => graphics.DrawCurve(pen, new Point[2], 0, 2, 1)); 2562AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new Point[2])); 2564AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new Point[2], 1)); 2567AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new Point[2], 0, 2, 1)); 2576AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawClosedCurve(null, new Point[3])); 2577AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawClosedCurve(null, new Point[3], 1, FillMode.Winding)); 2590AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawClosedCurve(pen, new Point[3])); 2591AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawClosedCurve(pen, new Point[3], 1, FillMode.Winding)); 2602AssertExtensions.Throws<ArgumentNullException>("points", () => graphics.DrawClosedCurve(pen, (Point[])null)); 2603AssertExtensions.Throws<ArgumentNullException>("points", () => graphics.DrawClosedCurve(pen, (Point[])null, 1, FillMode.Winding)); 2617AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawClosedCurve(pen, new Point[length])); 2618AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawClosedCurve(pen, new Point[length], 1, FillMode.Winding)); 2632Assert.Throws<InvalidOperationException>(() => graphics.DrawClosedCurve(pen, new Point[3])); 2633Assert.Throws<InvalidOperationException>(() => graphics.DrawClosedCurve(pen, new Point[3], 1, FillMode.Winding)); 2651AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawClosedCurve(pen, new Point[3])); 2652AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawClosedCurve(pen, new Point[3], 1, FillMode.Alternate)); 2785graphics.DrawString("Test text", SystemFonts.DefaultFont, Brushes.White, default(Point)); 2797() => graphics.DrawString("Test text", SystemFonts.DefaultFont, Brushes.White, default(Point))); 2814Assert.Equal(Point.Empty, graphics.RenderingOrigin); 2829Point point = new(10, 10);
System\Drawing\IconConverterTests.cs (6)
42Assert.False(_icoConv.CanConvertFrom(null, typeof(Point)), "Point"); 55Assert.False(_icoConvFrmTD.CanConvertFrom(null, typeof(Point)), "TD Point"); 78Assert.False(_icoConv.CanConvertTo(null, typeof(Point)), "Point"); 96Assert.False(_icoConvFrmTD.CanConvertTo(null, typeof(Point)), "TD Point"); 147Assert.Throws<NotSupportedException>(() => _icoConv.ConvertTo(null, CultureInfo.InvariantCulture, _icon, typeof(Point))); 164Assert.Throws<NotSupportedException>(() => _icoConvFrmTD.ConvertTo(null, CultureInfo.InvariantCulture, _icon, typeof(Point)));
System\Drawing\ImageConverterTests.cs (6)
68Assert.False(_imgConv.CanConvertFrom(null, typeof(Point)), "Point"); 81Assert.False(_imgConvFrmTD.CanConvertFrom(null, typeof(Point)), "TD Point"); 100Assert.False(_imgConv.CanConvertTo(null, typeof(Point)), "Point"); 114Assert.False(_imgConvFrmTD.CanConvertTo(null, typeof(Point)), "TD Point"); 201Assert.Throws<NotSupportedException>(() => _imgConv.ConvertTo(null, CultureInfo.InvariantCulture, _image, typeof(Point))); 210Assert.Throws<NotSupportedException>(() => _imgConvFrmTD.ConvertTo(null, CultureInfo.InvariantCulture, _image, typeof(Point)));
System\Drawing\Imaging\MetafileTests.cs (1)
1040default(Point),
System\Drawing\PenTests.cs (1)
253using LinearGradientBrush brush = new(Point.Empty, new Point(1, 2), Color.Blue, Color.Red);
System\Drawing\Printing\PrinterUnitConvertTests.cs (1)
76var converted = PrinterUnitConvert.Convert(new Point(100, 1000), fromUnit, toUnit);
System\Drawing\RegionTests.cs (2)
1360yield return new object[] { new Region(), Point.Empty, true }; 1379public void IsVisible_Point_ReturnsExpected(Region region, Point point, bool expected)
System.Drawing.Primitives (55)
System\Drawing\Point.cs (47)
15public struct Point : IEquatable<Point> 18/// Creates a new instance of the <see cref='System.Drawing.Point'/> class with member data left uninitialized. 20public static readonly Point Empty; 26/// Initializes a new instance of the <see cref='System.Drawing.Point'/> class with the specified coordinates. 35/// Initializes a new instance of the <see cref='System.Drawing.Point'/> class from a <see cref='System.Drawing.Size'/> . 53/// Gets a value indicating whether this <see cref='System.Drawing.Point'/> is empty. 59/// Gets the x-coordinate of this <see cref='System.Drawing.Point'/>. 68/// Gets the y-coordinate of this <see cref='System.Drawing.Point'/>. 77/// Creates a <see cref='System.Drawing.PointF'/> with the coordinates of the specified <see cref='System.Drawing.Point'/> 79public static implicit operator PointF(Point p) => new PointF(p.X, p.Y); 82/// Creates a <see cref='System.Drawing.Size'/> with the coordinates of the specified <see cref='System.Drawing.Point'/> . 84public static explicit operator Size(Point p) => new Size(p.X, p.Y); 87/// Translates a <see cref='System.Drawing.Point'/> by a given <see cref='System.Drawing.Size'/> . 89public static Point operator +(Point pt, Size sz) => Add(pt, sz); 92/// Translates a <see cref='System.Drawing.Point'/> by the negative of a given <see cref='System.Drawing.Size'/> . 94public static Point operator -(Point pt, Size sz) => Subtract(pt, sz); 97/// Compares two <see cref='System.Drawing.Point'/> objects. The result specifies whether the values of the 98/// <see cref='System.Drawing.Point.X'/> and <see cref='System.Drawing.Point.Y'/> properties of the two 99/// <see cref='System.Drawing.Point'/> objects are equal. 101public static bool operator ==(Point left, Point right) => left.X == right.X && left.Y == right.Y; 104/// Compares two <see cref='System.Drawing.Point'/> objects. The result specifies whether the values of the 105/// <see cref='System.Drawing.Point.X'/> or <see cref='System.Drawing.Point.Y'/> properties of the two 106/// <see cref='System.Drawing.Point'/> objects are unequal. 108public static bool operator !=(Point left, Point right) => !(left == right); 111/// Translates a <see cref='System.Drawing.Point'/> by a given <see cref='System.Drawing.Size'/> . 113public static Point Add(Point pt, Size sz) => new Point(unchecked(pt.X + sz.Width), unchecked(pt.Y + sz.Height)); 116/// Translates a <see cref='System.Drawing.Point'/> by the negative of a given <see cref='System.Drawing.Size'/> . 118public static Point Subtract(Point pt, Size sz) => new Point(unchecked(pt.X - sz.Width), unchecked(pt.Y - sz.Height)); 123public static Point Ceiling(PointF value) => new Point(unchecked((int)Math.Ceiling(value.X)), unchecked((int)Math.Ceiling(value.Y))); 128public static Point Truncate(PointF value) => new Point(unchecked((int)value.X), unchecked((int)value.Y)); 133public static Point Round(PointF value) => new Point(unchecked((int)Math.Round(value.X)), unchecked((int)Math.Round(value.Y))); 136/// Specifies whether this <see cref='System.Drawing.Point'/> contains the same coordinates as the specified 139public override readonly bool Equals([NotNullWhen(true)] object? obj) => obj is Point && Equals((Point)obj); 141public readonly bool Equals(Point other) => this == other; 149/// Translates this <see cref='System.Drawing.Point'/> by the specified amount. 161/// Translates this <see cref='System.Drawing.Point'/> by the specified amount. 163public void Offset(Point p) => Offset(p.X, p.Y); 166/// Converts this <see cref='System.Drawing.Point'/> to a human readable string.
System\Drawing\Rectangle.cs (4)
39public Rectangle(Point location, Size size) 58public Point Location 229public readonly bool Contains(Point pt) => Contains(pt.X, pt.Y); 326public void Offset(Point pos) => Offset(pos.X, pos.Y);
System\Drawing\Size.cs (4)
27/// <see cref='System.Drawing.Point'/>. 29public Size(Point pt) 119/// Converts the specified <see cref='System.Drawing.Size'/> to a <see cref='System.Drawing.Point'/>. 121public static explicit operator Point(Size size) => new Point(size.Width, size.Height);
System.Private.Windows.Core (35)
System\Private\Windows\BinaryFormat\BinaryFormatWriter.cs (4)
132/// Writes a <see cref="Point"/> in binary format. 134public static void WritePoint(Stream stream, Point value) 139new ClassInfo(1, typeof(Point).FullName!, s_pointMemberNames), 735case Point point:
System\Private\Windows\Nrbf\CoreNrbfSerializer.cs (2)
91{ Types.ToTypeName($"{Types.PointType}"), typeof(Point) }, 158|| type == typeof(Point)
System\Private\Windows\Nrbf\SerializationRecordExtensions.cs (2)
81/// Tries to get this object as a <see cref="Point"/>. 92|| !classInfo.TypeNameMatches(typeof(Point))
System\Private\Windows\Ole\Composition.ManagedToNativeAdapter.cs (1)
345pt = Point.Empty,
System\Private\Windows\Ole\DragDropHelper.cs (5)
51Point point = new(e.X, e.Y); 59public static void DragEnter(HWND targetWindowHandle, IComVisibleDataObject dataObject, ref Point point, DROPEFFECT effect) 97Point point = new(e.X, e.Y); 113Point point = new(e.X, e.Y); 249public static void SetDragImage(IComVisibleDataObject dataObject, IBitmap? dragImage, Point cursorOffset, bool usingDefaultDragImage)
System\Private\Windows\Ole\IGiveFeedbackEvent.cs (1)
22Point CursorOffset { get; set; }
System\Value.cs (9)
426public Value(Point value) 432public Value(Point? value) 445public static implicit operator Value(Point value) => new(value); 446public static explicit operator Point(in Value value) => value.GetValue<Point>(); 447public static implicit operator Value(Point? value) => new(value); 448public static explicit operator Point?(in Value value) => value.GetValue<Point?>(); 715|| (typeof(T) == typeof(Point) && _object == TypeFlags.Point)))
System\Value.TypeFlags.cs (2)
29internal static StraightCastFlag<Point> Point { get; } = StraightCastFlag<Point>.Instance;
System\Value.Union.cs (1)
40[FieldOffset(0)] public Point Point;
Windows\Win32\Foundation\LPARAM.cs (2)
27public static explicit operator Point(LPARAM value) => new(value.SIGNEDLOWORD, value.SIGNEDHIWORD); 28public static explicit operator LPARAM(Point value) => MAKELPARAM(value.X, value.Y);
Windows\Win32\Foundation\POINTS.cs (1)
10public static implicit operator Point(POINTS point) => new(point.x, point.y);
Windows\Win32\PInvokeCore.MapWindowPoints.cs (5)
10/// <inheritdoc cref="MapWindowPoints(HWND, HWND, Point*, uint)"/> 17int result = MapWindowPoints(hWndFrom.Handle, hWndTo.Handle, (Point*)p, cPoints: 2); 24/// <inheritdoc cref="MapWindowPoints(HWND, HWND, Point*, uint)"/> 25public static unsafe int MapWindowPoints<TFrom, TTo>(TFrom hWndFrom, TTo hWndTo, ref Point lpPoint) 31int result = MapWindowPoints(hWndFrom.Handle, hWndTo.Handle, (Point*)p, cPoints: 1);
System.Private.Windows.Core.Tests (3)
System\Private\Windows\Ole\BinaryFormatUtilitiesTests.cs (3)
967public Point Location; 1004public Point Point = new(1, 2); 1142public Point Point { get; set; } = new(1, 2);
System.Private.Windows.Core.TestUtilities (4)
CommonTestHelper.cs (4)
74public static TheoryData<Point> GetPointTheoryData() => GetPointTheoryData(TestIncludeType.All); 76public static TheoryData<Point> GetPointTheoryData(TestIncludeType includeType) 78TheoryData<Point> data = new(); 81data.Add(default(Point));
System.Windows.Forms (676)
GlobalUsings.cs (1)
35global using Point = System.Drawing.Point;
System\Resources\DataNodeInfo.cs (1)
12public Point ReaderPosition; // Only used to track position in the reader
System\Resources\ResXDataNode.cs (1)
512public Point GetNodePosition() => _nodeInfo?.ReaderPosition ?? default;
System\Resources\ResXResourceReader.cs (5)
326private static Point GetPosition(XmlReader reader) 328Point pt = default; 378Point pt = GetPosition(reader); 385Point pt = GetPosition(reader); 402Point pt = GetPosition(reader);
System\Windows\Forms\Accessibility\LabelEditUiaTextProvider.cs (12)
103public override Point GetPositionFromChar(int charIndex) => GetPositionFromCharIndex(charIndex); 106public override Point GetPositionFromCharForUpperRightCorner(int startCharIndex, string text) 110return Point.Empty; 114Point pt; 192Point ptStart = new(rectangle.X + 1, rectangle.Y + 1); 193Point ptEnd = new(rectangle.Right - 1, rectangle.Bottom - 1); 226public override Point PointToScreen(Point pt) 268Point clientLocation = point; 329private int GetCharIndexFromPosition(Point pt) 360private Point GetPositionFromCharIndex(int index) 364return Point.Empty;
System\Windows\Forms\ActiveX\AxHost.cs (4)
1076Point phm = new(sz.Width, sz.Height); 1089Point phm = default; 1754PInvoke.GetCursorPos(out Point point); 3254Point location = Location;
System\Windows\Forms\ActiveX\Control.ActiveXImpl.cs (12)
121private static Point s_logPixels = Point.Empty; 275private static Point LogPixels 361Point pt = new(PARAM.LOWORD(lpmsg->lParam), PARAM.HIWORD(lpmsg->lParam)); 440Point pVp = default; 441Point pW = default; 459Point p1 = new(rc.left, rc.top); 460Point p2 = new(rc.right - rc.left, rc.bottom - rc.top); 700Point pt = PixelToHiMetric(size.Width, size.Height); 767private static Point HiMetricToPixel(int x, int y) 769Point pt = new Point 1348private static Point PixelToHiMetric(int x, int y) => new()
System\Windows\Forms\ContextMenuStrip.cs (1)
82internal void ShowInternal(Control source, Point location, bool isKeyboardActivated)
System\Windows\Forms\Control.cs (30)
719[DefaultValue(typeof(Point), "0, 0")] 720public virtual Point AutoScrollOffset 722get => Properties.GetValueOrDefault(s_autoScrollOffsetProperty, Point.Empty); 723set => Properties.AddOrRemoveValue(s_autoScrollOffsetProperty, value, defaultValue: Point.Empty); 1562PInvoke.GetCursorPos(out Point p); 2487public Point Location 2644public static Point MousePosition 2648PInvoke.GetCursorPos(out Point pt); 4851/// <inheritdoc cref="DoDragDropAsJson{T}(T, DragDropEffects, Bitmap?, Point, bool)"/> 4879Point cursorOffset, 4923/// Because <see cref="DoDragDrop(object, DragDropEffects, Bitmap, Point, bool)"/> always performs the 4934Point cursorOffset, 5280public Control? GetChildAtPoint(Point pt, GetChildAtPointSkip skipValue) 5304public Control? GetChildAtPoint(Point pt) => GetChildAtPoint(pt, GetChildAtPointSkip.None); 7984Point offs = Location; 8131PaintBackground(e, rectangle, BackColor, Point.Empty); 8133internal void PaintBackground(PaintEventArgs e, Rectangle rectangle, Color backColor, Point scrollOffset = default) 8157Point scrollLocation = scrollOffset; 8158if (this is ScrollableControl scrollControl && scrollLocation != Point.Empty) 8561public Point PointToClient(Point p) 8570public Point PointToScreen(Point p) 8778Point viewportOrg = default; 8796PrintToMetaFileRecursive(hDC, lParam, new Rectangle(Point.Empty, Size)); 8811Point clientOffset = PointToScreen(Point.Empty); 11180Point client; 11630Point location = PARAM.ToPoint(m.LParamInternal); 11631Point screenLocation = PointToScreen(location);
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonBaseAdapter.cs (17)
139Point p1 = new(bounds.X + bounds.Width - 1, bounds.Y); // Upper inner right 140Point p2 = new(bounds.X, bounds.Y); // Upper left 141Point p3 = new(bounds.X, bounds.Y + bounds.Height - 1); // Bottom inner left 142Point p4 = new(bounds.X + bounds.Width - 1, bounds.Y + bounds.Height - 1); // Inner bottom right 194Point p1 = new(bounds.X + bounds.Width - 1, bounds.Y); // Upper inner right 195Point p2 = new(bounds.X, bounds.Y); // Upper left 196Point p3 = new(bounds.X, bounds.Y + bounds.Height - 1); // Bottom inner left 197Point p4 = new(bounds.X + bounds.Width - 1, bounds.Y + bounds.Height - 1); // Inner bottom right 242Point p1 = new(bounds.X + bounds.Width - 1, bounds.Y); // Upper inner right 243Point p2 = new(bounds.X, bounds.Y); // Upper left 244Point p3 = new(bounds.X, bounds.Y + bounds.Height - 1); // Bottom inner left 245Point p4 = new(bounds.X + bounds.Width - 1, bounds.Y + bounds.Height - 1); // Inner bottom right 300Point p1 = new(r.Right - 1, r.Top); // Upper inner right 301Point p2 = new(r.Left, r.Top); // Upper left 302Point p3 = new(r.Left, r.Bottom - 1); // Bottom inner left 303Point p4 = new(r.Right - 1, r.Bottom - 1); // Inner bottom right 376internal virtual void DrawImageCore(Graphics graphics, Image image, Rectangle imageBounds, Point imageStart, LayoutData layout)
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonBaseAdapter.LayoutData.cs (1)
22public Point ImageStart;
System\Windows\Forms\Controls\Buttons\CheckBoxRenderer.cs (11)
49/// <inheritdoc cref="DrawCheckBox(Graphics, Point, Rectangle, string?, Font?, TextFormatFlags, Image, Rectangle, bool, CheckBoxState)"/> 50public static void DrawCheckBox(Graphics g, Point glyphLocation, CheckBoxState state) 72Point glyphLocation, 83/// <inheritdoc cref="DrawCheckBox(Graphics, Point, Rectangle, string?, Font?, TextFormatFlags, Image, Rectangle, bool, CheckBoxState)"/> 86Point glyphLocation, 101/// <inheritdoc cref="DrawCheckBox(Graphics, Point, Rectangle, string?, Font?, TextFormatFlags, Image, Rectangle, bool, CheckBoxState)"/> 104Point glyphLocation, 114Point glyphLocation, 155/// <inheritdoc cref="DrawCheckBox(Graphics, Point, Rectangle, string?, Font?, TextFormatFlags, Image, Rectangle, bool, CheckBoxState)"/> 158Point glyphLocation, 182Point glyphLocation,
System\Windows\Forms\Controls\Buttons\RadioButtonRenderer.cs (13)
49/// <inheritdoc cref="DrawRadioButton(Graphics, Point, Rectangle, string?, Font?, TextFormatFlags, Image, Rectangle, bool, RadioButtonState)" /> 50public static void DrawRadioButton(Graphics g, Point glyphLocation, RadioButtonState state) => 55Point glyphLocation, 66Point glyphLocation, 87/// <inheritdoc cref="DrawRadioButton(Graphics, Point, Rectangle, string?, Font?, TextFormatFlags, Image, Rectangle, bool, RadioButtonState)" /> 90Point glyphLocation, 102/// <inheritdoc cref="DrawRadioButton(Graphics, Point, Rectangle, string?, Font?, TextFormatFlags, Image, Rectangle, bool, RadioButtonState)" /> 105Point glyphLocation, 118Point glyphLocation, 155/// <inheritdoc cref="DrawRadioButton(Graphics, Point, Rectangle, string?, Font?, TextFormatFlags, Image, Rectangle, bool, RadioButtonState)" /> 158Point glyphLocation, 182Point glyphLocation, 205Point glyphLocation,
System\Windows\Forms\Controls\ComboBox\ComboBox.ComboBoxUiaTextProvider.cs (13)
155public override Point GetPositionFromChar(int charIndex) 158: Point.Empty; 161public override Point GetPositionFromCharForUpperRightCorner(int startCharIndex, string text) 165return Point.Empty; 169Point pt; 253Point ptStart = new(rectangle.X + 1, rectangle.Y + 1); 254Point ptEnd = new(rectangle.Right - 1, rectangle.Bottom - 1); 293public override Point PointToScreen(Point pt) 341Point clientLocation = point; 402private int GetCharIndexFromPosition(Point pt) 435private Point GetPositionFromCharIndex(int index) 439return Point.Empty;
System\Windows\Forms\Controls\ComboBox\ComboBox.cs (11)
1366internal Point EditToComboboxMapping(Message m) 1593Point Ptlc = EditToComboboxMapping(m); 1610Point Ptmc = EditToComboboxMapping(m); 1627Point Ptrc = EditToComboboxMapping(m); 1640Point Ptl = EditToComboboxMapping(m); 1685Point P = EditToComboboxMapping(m); 1702Point Pt = EditToComboboxMapping(m); 1722Point ptRBtnUp = EditToComboboxMapping(m); 1741Point point = EditToComboboxMapping(m); 1802Point p = MousePosition; 3702Point point = PointToScreen(PARAM.ToPoint(m.LParamInternal));
System\Windows\Forms\Controls\ComboBox\ComboBox.FlatComboAdapter.cs (2)
148Point middle = new(dropDownRect.Left + dropDownRect.Width / 2, dropDownRect.Top + dropDownRect.Height / 2); 162(ReadOnlySpan<Point>)
System\Windows\Forms\Controls\DataGridView\DataGridView.AccessibleObject.cs (1)
160Point pt = owner.PointToClient(new Point(x, y));
System\Windows\Forms\Controls\DataGridView\DataGridView.cs (18)
272private Point _ptCurrentCell; 273private Point _ptCurrentCellCache = Point.Empty; 274private Point _ptAnchorCell; 275private Point _ptMouseDownCell; 276private Point _ptMouseEnteredCell; 277private Point _ptToolTipCell; 278private Point _ptMouseDownGridCoord; 1776public Point CurrentCellAddress => _ptCurrentCell; 2176internal Point MouseEnteredCellAddress => _ptMouseEnteredCell; 2184Point ptMouse = PointToClient(MousePosition); 2198Point ptMouse = PointToClient(MousePosition); 2210Point ptMouse = PointToClient(MousePosition); 2286Point firstDisplayedCellAddress = FirstDisplayedCellAddress; 2335private Point FirstDisplayedCellAddress 2339Point ptFirstDisplayedCellAddress = new(-1, -1) 2990internal Point MouseDownCellAddress => _ptMouseDownCell; 3859Point mouseCoord = MousePosition;
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (23)
20protected virtual void AccessibilityNotifyCurrentCellChanged(Point cellAddress) 4910private Point ConvertCellToGridCoord(int columnIndex, int rowIndex, int x, int y) 6020Point ptMouse = PointToClient(MousePosition); 9632Point ptMouse = PointToClient(MousePosition); 10389Point firstDisplayedCellAddress = FirstDisplayedCellAddress; 11900Point ptGridCoord = ConvertCellToGridCoord(e.ColumnIndex, e.RowIndex, e.X, e.Y); 12070Point ptOriginalCurrentCell = _ptCurrentCell; 12683Point ptGridCoord = ConvertCellToGridCoord(e.ColumnIndex, e.RowIndex, e.X, e.Y); 15269internal void OnInsertedColumn_PostNotification(Point newCurrentCell) 15302internal void OnInsertedRow_PostNotification(int rowIndex, Point newCurrentCell, bool lastInsertion) 15341internal void OnInsertedRows_PostNotification(DataGridViewRow[] dataGridViewRows, Point newCurrentCell) 15365internal void OnInsertingColumn(int columnIndexInserted, DataGridViewColumn dataGridViewColumn, out Point newCurrentCell) 15523ref Point newCurrentCell, 15609internal void OnInsertingRows(int rowIndexInserted, DataGridViewRow[] dataGridViewRows, ref Point newCurrentCell) 16894internal void OnRemovedColumn_PostNotification(DataGridViewColumn dataGridViewColumn, Point newCurrentCell) 16945internal void OnRemovedRow_PostNotification(DataGridViewRow dataGridViewRow, Point newCurrentCell) 17023internal void OnRemovingColumn(DataGridViewColumn dataGridViewColumn, out Point newCurrentCell, bool force) 17236internal void OnRemovingRow(int rowIndexDeleted, out Point newCurrentCell, bool force) 18809Point pt = PointToScreen(Location); 25994Point ptMouse = PointToClient(MousePosition); 29157Point ptMouse = PointToClient(MousePosition); 29867Point ptMouse = PointToClient(MousePosition); 29962Point client;
System\Windows\Forms\Controls\DataGridView\DataGridViewButtonCell.cs (1)
658Point ptCurrentCell = DataGridView!.CurrentCellAddress;
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (3)
405Point ptCurrentCell = DataGridView.CurrentCellAddress; 1487Point ptCurrentCell = DataGridView.CurrentCellAddress; 2708Point ptCurrentCell = DataGridView.CurrentCellAddress;
System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxCell.cs (4)
432Point ptCurrentCell = DataGridView.CurrentCellAddress; 519Point ptCurrentCell = DataGridView.CurrentCellAddress; 788Point ptCurrentCell = DataGridView.CurrentCellAddress; 1080Point ptCurrentCell = DataGridView.CurrentCellAddress;
System\Windows\Forms\Controls\DataGridView\DataGridViewColumnCollection.cs (4)
887Point newCurrentCell; 955private void OnCollectionChanged(CollectionChangeEventArgs ccea, bool changeIsInsertion, Point newCurrentCell) 971private void OnCollectionChanged_PostNotification(CollectionChangeEventArgs ccea, bool changeIsInsertion, Point newCurrentCell) 1075DataGridView.OnRemovingColumn(dataGridViewColumn, out Point newCurrentCell, force);
System\Windows\Forms\Controls\DataGridView\DataGridViewColumnHeaderCell.cs (1)
894Point sortGlyphLocation = new(0, 0);
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.cs (8)
1666Point ptCurrentCell = DataGridView.CurrentCellAddress; 1915Point ptCurrentCell = DataGridView.CurrentCellAddress; 2152Point middle = new(dropRect.Left + dropRect.Width / 2, dropRect.Top + dropRect.Height / 2); 2160(ReadOnlySpan<Point>) 2175Point middle = new(dropRect.Left + (dropRect.Width - 1) / 2, 2181Point pt1 = new(middle.X - (s_nonXPTriangleWidth - 1) / 2, middle.Y - s_nonXPTriangleHeight); 2182Point pt2 = new(middle.X + (s_nonXPTriangleWidth - 1) / 2, middle.Y - s_nonXPTriangleHeight); 2183g.FillPolygon(SystemBrushes.ControlText, (ReadOnlySpan<Point>)[pt1, pt2, middle]);
System\Windows\Forms\Controls\DataGridView\DataGridViewImageCell.cs (1)
888Point ptCurrentCell = DataGridView!.CurrentCellAddress;
System\Windows\Forms\Controls\DataGridView\DataGridViewLinkCell.cs (1)
907Point ptCurrentCell = DataGridView!.CurrentCellAddress;
System\Windows\Forms\Controls\DataGridView\DataGridViewRowCollection.cs (7)
1502Point newCurrentCell = new(-1, -1); 1612Point newCurrentCell = new(-1, -1); 1708private void InsertDuplicateRow(int indexDestination, DataGridViewRow rowTemplate, bool firstInsertion, ref Point newCurrentCell) 1786Point newCurrentCell = new(-1, -1); 1911Point newCurrentCell = new(-1, -1); 1936Point newCurrentCell) 2091Point newCurrentCell)
System\Windows\Forms\Controls\DataGridView\DataGridViewTextBoxCell.cs (2)
575Point ptCurrentCell = DataGridView.CurrentCellAddress; 677Point ptCurrentCell = DataGridView!.CurrentCellAddress;
System\Windows\Forms\Controls\DataGridView\DataGridViewUtilities.cs (2)
349internal static Point GetTextLocation( 355Point ptTextLocation = new(0, 0);
System\Windows\Forms\Controls\ImageList\ImageList.cs (1)
510public void Draw(Graphics g, Point pt, int index) => Draw(g, pt.X, pt.Y, index);
System\Windows\Forms\Controls\Labels\Label.cs (2)
1357ControlPaint.PrintBorder(g, new Rectangle(Point.Empty, Size), BorderStyle, Border3DStyle.SunkenOuter); 1436Point pt = new((int)m.LParamInternal);
System\Windows\Forms\Controls\Labels\LinkLabel.cs (1)
300PInvoke.GetCursorPos(out Point p);
System\Windows\Forms\Controls\Labels\LinkLabel.LinkLabelAccessibleObject.cs (1)
64Point p = owner.PointToClient(new Point(x, y));
System\Windows\Forms\Controls\ListBoxes\ListBox.cs (3)
1502public int IndexFromPoint(Point p) 2420Point point = PARAM.ToPoint(m.LParamInternal); 2462if (Capture && PInvoke.WindowFromPoint(PointToScreen((Point)m.LParamInternal)) == HWND)
System\Windows\Forms\Controls\ListView\ListView.cs (13)
2182internal unsafe void AnnounceColumnHeader(Point point) 3220public ListViewItem? FindNearestItem(SearchDirectionHint dir, Point point) 3279private unsafe ListViewItem? FindItem(bool isTextSearch, string text, bool isPrefixSearch, Point pt, SearchDirectionHint dir, int startIndex, bool includeSubItemsInSearch) 3553internal Point GetItemPosition(int index) 3555Point position = default; 3713public ListViewHitTestInfo HitTest(Point point) => HitTest(point.X, point.Y); 4386Point pos = Cursor.Position; 5487Point pt = new(x, y); 5965Point point = PARAM.ToPoint(m.LParamInternal); 6003Point screenPoint = PointToScreen(point); 6724Point pos = Cursor.Position; 6929Point startingPoint = Point.Empty;
System\Windows\Forms\Controls\ListView\ListView.ListViewAccessibleObject.cs (2)
291Point hitTestPoint = new(x, y); 292Point point = owningListView.PointToClient(hitTestPoint);
System\Windows\Forms\Controls\ListView\ListViewInsertionMark.cs (1)
114public unsafe int NearestIndex(Point pt)
System\Windows\Forms\Controls\ListView\ListViewItem.cs (2)
33private Point _position = new(-1, -1); 626public Point Position
System\Windows\Forms\Controls\ListView\ListViewItem.IKeyboardToolTip.cs (3)
97Point point = new(listviewBounds.X + itemBounds.X, listviewBounds.Y + itemBounds.Y); 107private static Rectangle GetDetailsListRectangle(Point point, ListViewItem item, Rectangle itemBounds) 118private Rectangle GetTileRectangle(Point point, ListViewItem item, Rectangle itemBounds)
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewItemDetailsAccessibleObject.cs (1)
58internal AccessibleObject? GetChild(int subItemIndex, Point point)
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewItemWithImageAccessibleObject.cs (1)
39internal AccessibleObject GetAccessibleObject(Point point)
System\Windows\Forms\Controls\ListView\SearchForVirtualItemEventArgs.cs (2)
13Point startingPoint, 36public Point StartingPoint { get; }
System\Windows\Forms\Controls\Menus\MenuStrip.cs (1)
255Point pt = PointToClient(WindowsFormsUtils.LastCursorPoint);
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.CalendarButtonAccessibleObject.cs (1)
71BOOL setOldCursorPos = PInvoke.GetPhysicalCursorPos(out Point previousPosition);
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.cs (1)
1332public HitTestInfo HitTest(Point point) => HitTest(point.X, point.Y);
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.HitTestInfo.cs (3)
15internal HitTestInfo(Point pt, HitArea area, DateTime time) 25internal HitTestInfo(Point pt, HitArea area) 34public Point Point { get; }
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.MonthCalendarAccessibleObject.cs (1)
394Point point = owner.PointToClient(new Point(xScreen, yScreen));
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.cs (11)
530public Point ContextMenuDefaultLocation => _gridView.ContextMenuDefaultLocation; 1892Point location = _commandsPane.Location; 1904Point location = _helpPane.Location; 2195internal Control? GetElementFromPoint(Point point) 2392Point newPoint = Point.Empty; 2407Point newPoint = Point.Empty; 2888Point psheetLoc = _gridView.Location; 4092private bool ShouldForwardChildMouseMessage(Control? child, MouseEventArgs e, ref Point point) 4105Point temp = new(e.X, e.Y);
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.PropertyGridAccessibleObject.cs (1)
29Point clientPoint = owningPropertyGrid.PointToClient(new Point((int)x, (int)y));
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\CommandsPane.cs (2)
207Point[] links = new Point[_verbs!.Length];
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\DropDownButton.DropDownButtonAdapter.cs (1)
89internal override void DrawImageCore(Graphics graphics, Image image, Rectangle imageBounds, Point imageStart, LayoutData layout)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridEntry.cs (5)
20protected static Point InvalidPoint { get; } = new(int.MinValue, int.MinValue); 51private Point _labelTipPoint = InvalidPoint; 52private Point _valueTipPoint = InvalidPoint; 622internal virtual Point GetLabelToolTipLocation(int mouseX, int mouseY) => _labelTipPoint; 783internal Point ValueToolTipLocation
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyDescriptorGridEntry.cs (1)
312internal override Point GetLabelToolTipLocation(int mouseX, int mouseY)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (29)
23private static Point InvalidPoint { get; } = new(int.MinValue, int.MinValue); 53private static Point InvalidPosition { get; } = new(int.MinValue, int.MinValue); 91private Point _location = new(1, 1); 96private Point _rowSelectPos = Point.Empty; // the position that we clicked on a row to test for double clicks 97private Point _lastMouseDown = InvalidPosition; 450public Point ContextMenuDefaultLocation 456Point point = PointToScreen(new(rect.X, rect.Y)); 602Point pt = new(rect.X, rect.Y); 675private static void AdjustOrigin(Graphics g, Point newOrigin, ref Rectangle r) 1102Point newOrigin = new(rect.X, rect.Y); 1157Point newOrigin = new(rect.X, rect.Y); 1419Point location = PointToScreen(new Point(0, 0)); 1644private Point FindPosition(int x, int y) 1658Point pt = new(RowLabel, 0); 2604Point screenPoint = EditTextBox.PointToScreen(e.Location); 2614_rowSelectPos = Point.Empty; 2983Point pos = FindPosition(e.X, e.Y); 3029Point point; 3286Point startPosition = FindPosition(clipRect.X, clipRect.Y); 3287Point endPosition = FindPosition(clipRect.X, clipRect.Y + clipRect.Height); 3303Point location = _location; 3453Point editPoint = PointToScreen(_lastMouseDown); 3467_rowSelectPos = Point.Empty; 3801Point location = parent.PointToScreen(new(rect.left, rect.top)); 4873Point location = topControl.Location; 5255Point mouseLoc = Cursor.Position; 5273Point tipPt = Point.Empty;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.DropDownHolder.cs (4)
26private Point _dragStart = Point.Empty; // the point at which the drag started to compute the delta 429Point dragPoint = PointToScreen(new Point(e.X, e.Y)); 498_dragStart = Point.Empty;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.PropertyGridViewAccessibleObject.cs (2)
431Point point = new(x, y); 435Point position = owner.FindPosition(point.X, point.Y);
System\Windows\Forms\Controls\RichTextBox\RichTextBox.cs (5)
2216public override int GetCharIndexFromPosition(Point pt) 2218Point wpt = new(pt.X, pt.Y); 2261public override unsafe Point GetPositionFromCharIndex(int index) 2270return Point.Empty; 2273Point position = default;
System\Windows\Forms\Controls\Splitter\Splitter.cs (3)
31private Point _anchor = Point.Empty; 941_anchor = Point.Empty;
System\Windows\Forms\Controls\TabControl\TabControl.cs (4)
25private static readonly Point s_defaultPaddingPoint = new(6, 3); 33private Point _padding = s_defaultPaddingPoint; 392Point p = Location; 586public new Point Padding
System\Windows\Forms\Controls\TabControl\TabControl.TabControlAccessibleObject.cs (1)
90Point point = new(x, y);
System\Windows\Forms\Controls\TabControl\TabPage.cs (1)
342public new Point Location
System\Windows\Forms\Controls\TextBox\MaskedTextBox.cs (4)
1612public override char GetCharFromPosition(Point pt) 1632public override int GetCharIndexFromPosition(Point pt) 1727public override Point GetPositionFromCharIndex(int index) 1729Point pos;
System\Windows\Forms\Controls\TextBox\TextBoxBase.cs (5)
1561public virtual char GetCharFromPosition(Point pt) 1571public virtual int GetCharIndexFromPosition(Point pt) 1608public virtual Point GetPositionFromCharIndex(int index) 1612return Point.Empty; 2060Point client;
System\Windows\Forms\Controls\TextBox\TextBoxBase.TextBoxBaseUiaTextProvider.cs (11)
106Point clientLocation = point; 183public override Point PointToScreen(Point pt) => Owner is not null ? Owner.PointToScreen(pt) : Point.Empty; 304public override Point GetPositionFromChar(int charIndex) 307: Point.Empty; 310public override Point GetPositionFromCharForUpperRightCorner(int startCharIndex, string text) 314return Point.Empty; 318Point pt; 371Point ptStart = new(rectangle.X + 1, rectangle.Y + 1); 372Point ptEnd = new(rectangle.Right - 1, rectangle.Bottom - 1);
System\Windows\Forms\Controls\ToolStrips\StatusStrip.cs (2)
378Point noMansLand = displayRect.Location; 583Point gripLocation = RightToLeft == RightToLeft.Yes
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (23)
27internal static Point s_invalidMouseEnter = new(int.MaxValue, int.MaxValue); 69private Point _mouseEnterWhenShown = s_invalidMouseEnter; 251public new Point AutoScrollPosition 2139Point midPointOfCurrent = new(selectedItem.Bounds.X + selectedItem.Width / 2, 2163Point otherItemMidLocation = new(otherItem.Bounds.X + otherItem.Width / 2, (down) ? otherItem.Bounds.Top : otherItem.Bounds.Bottom); 2599Point location = Location; 3330Point itemRelativePoint = item.TranslatePoint(new Point(mea.X, mea.Y), ToolStripPointType.ToolStripCoords, ToolStripPointType.ToolStripItemCoords); 3386Point itemRelativePoint = item!.TranslatePoint(new Point(mea.X, mea.Y), ToolStripPointType.ToolStripCoords, ToolStripPointType.ToolStripItemCoords); 3430Point itemRelativePoint = item.TranslatePoint(new Point(mea.X, mea.Y), ToolStripPointType.ToolStripCoords, ToolStripPointType.ToolStripItemCoords); 3793g.DrawLines(SystemPens.ControlText, (ReadOnlySpan<Point>) 3800g.DrawLines(SystemPens.ControlText, (ReadOnlySpan<Point>) 3807g.DrawLines(SystemPens.ControlText, (ReadOnlySpan<Point>) 3820g.DrawLines(SystemPens.ControlText, (ReadOnlySpan<Point>) 3827g.DrawLines(SystemPens.ControlText, (ReadOnlySpan<Point>) 3834g.DrawLines(SystemPens.ControlText, (ReadOnlySpan<Point>) 3857public new Control? GetChildAtPoint(Point point) => base.GetChildAtPoint(point); 3860public new Control? GetChildAtPoint(Point pt, GetChildAtPointSkip skipValue) => base.GetChildAtPoint(pt, skipValue); 3877public ToolStripItem? GetItemAt(Point point) 4056Point newLocation = item.Bounds.Location; 4067protected internal void SetItemLocation(ToolStripItem item, Point location) 4125Point mousePosition = WindowsFormsUtils.LastCursorPoint; 4511Point cursorLocation = Cursor.Position; 4597Point pt = PointToClient(WindowsFormsUtils.LastCursorPoint);
System\Windows\Forms\Controls\ToolStrips\ToolStrip.ToolStripAccessibleObject.cs (1)
29Point clientHit = owner.PointToClient(new Point(x, y));
System\Windows\Forms\Controls\ToolStrips\ToolStripComboBox.ToolStripComboBoxControl.ToolStripComboBoxFlatComboAdapter.cs (2)
142Point middle = new(dropDownRect.Left + dropDownRect.Width / 2, dropDownRect.Top + dropDownRect.Height / 2); 148(ReadOnlySpan<Point>)
System\Windows\Forms\Controls\ToolStrips\ToolStripContentPanel.cs (1)
165public new Point Location
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDown.cs (12)
21private Point _displayLocation = new(0, 0); 523public new Point Location 988Point screenPoint = _ownerItem is ToolStripDropDownItem dropDownItem 999Point parentClientPoint = (_ownerItem is ToolStripDropDownItem dropDownItem) && (ParentInternal is not null) 1009internal Rectangle CalculateDropDownLocation(Point start, ToolStripDropDownDirection dropDownDirection) 1011Point offset = Point.Empty; 1020Rectangle dropDownBounds = new(Point.Empty, GetSuggestedSize()); 1813public void Show(Control control, Point position) 1829public void Show(Control control, Point position, ToolStripDropDownDirection direction) 1845public void Show(Point screenLocation) 1852public void Show(Point position, ToolStripDropDownDirection direction)
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownItem.cs (9)
141Rectangle ownerItemBounds = new(TranslatePoint(Point.Empty, ToolStripPointType.ToolStripItemCoords, ToolStripPointType.ScreenCoords), Size); 205protected internal virtual Point DropDownLocation 211return Point.Empty; 302Point offset = Point.Empty; 335Point itemScreenLocation = TranslatePoint(Point.Empty, ToolStripPointType.ToolStripItemCoords, ToolStripPointType.ScreenCoords); 379Rectangle dropDownBounds = new(Point.Empty, DropDown.GetSuggestedSize()); 384Rectangle itemScreenBounds = new(TranslatePoint(Point.Empty, ToolStripPointType.ToolStripItemCoords, ToolStripPointType.ScreenCoords), Size);
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownMenu.cs (5)
348Point nextPoint = Point.Empty; 456_textRectangle.Y = LayoutUtils.VAlign(_textRectangle.Size, new Rectangle(Point.Empty, _maxItemSize), ContentAlignment.MiddleCenter).Y; 796Point upLocation = new(1, 0); 803Point downLocation = new(1, height - downSize.Height);
System\Windows\Forms\Controls\ToolStrips\ToolStripGrip.cs (6)
12private Point _startLocation = Point.Empty; 14private Point _lastEndLocation = ToolStrip.s_invalidMouseEnter; 131Point currentLocation = TranslatePoint(mea.Location, ToolStripPointType.ToolStripItemCoords, ToolStripPointType.ScreenCoords); 160Point endLocation = TranslatePoint(new Point(mea.X, mea.Y), ToolStripPointType.ToolStripItemCoords, ToolStripPointType.ScreenCoords); 217Point endLocation = TranslatePoint(new Point(mea.X, mea.Y), ToolStripPointType.ToolStripItemCoords, ToolStripPointType.ScreenCoords);
System\Windows\Forms\Controls\ToolStrips\ToolStripHighContrastRenderer.cs (8)
135Rectangle bounds = new(Point.Empty, e.Item.Size); 187Rectangle bounds = new(Point.Empty, menuItem.Size); 208DrawArrow(new ToolStripArrowRenderEventArgs(g, item, new Rectangle(Point.Empty, item.Size), arrowColor, ArrowDirection.Down)); 258Rectangle bounds = new(Point.Empty, e.ToolStrip.Size); 287Rectangle bounds = new(Point.Empty, e.ToolStrip.Size); 350Rectangle bounds = new(Point.Empty, e.Item.Size); 410Rectangle bounds = new(Point.Empty, e.Item.Size); 442Rectangle bounds = new(Point.Empty, e.Item.Size);
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (9)
556client.Location = Point.Empty; 2153/// Because <see cref="DoDragDrop(object, DragDropEffects, Bitmap, Point, bool)"/> always performs the 2160public unsafe DragDropEffects DoDragDrop(object data, DragDropEffects allowedEffects, Bitmap? dragImage, Point cursorOffset, bool useDefaultDragImage) 2219internal IDropSource.Interface CreateDropSource(IComVisibleDataObject dataObject, Bitmap? dragImage, Point cursorOffset, bool useDefaultDragImage) 2372Point rectangleLocation = TranslatePoint(r.Location, ToolStripPointType.ToolStripItemCoords, ToolStripPointType.ToolStripCoords); 3426internal Point TranslatePoint(Point fromPoint, ToolStripPointType fromPointType, ToolStripPointType toPointType) 3443Point toPoint; 3444Point currentToolStripItemLocation = Bounds.Location;
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.ToolStripItemInternalLayout.cs (1)
99Rectangle bounds = new(Point.Empty, _ownerItem.Size);
System\Windows\Forms\Controls\ToolStrips\ToolStripLocationCancelEventArgs.cs (2)
16public ToolStripLocationCancelEventArgs(Point newLocation, bool value) : base(value) 24public Point NewLocation { get; }
System\Windows\Forms\Controls\ToolStrips\ToolStripManager.cs (1)
570internal static ToolStripPanel? ToolStripPanelFromPoint(Control draggedControl, Point screenLocation)
System\Windows\Forms\Controls\ToolStrips\ToolStripManager.ModalMenuFilter.cs (2)
321private void ProcessMouseButtonPressed(HWND hwndMouseMessageIsFrom, Point location) 330Point translatedLocation = location;
System\Windows\Forms\Controls\ToolStrips\ToolStripMenuItem.cs (1)
711ControlPaint.DrawCaptionButton(g, new Rectangle(Point.Empty, image.Size), (CaptionButton)buttonToUse, ButtonState.Flat);
System\Windows\Forms\Controls\ToolStrips\ToolStripPanel.cs (15)
416private Point GetStartLocation(ToolStrip toolStripToDrag) 522Point[] controlLocations = new Point[Controls.Count]; 666private void GiveToolStripPanelFeedback(ToolStrip toolStripToDrag, Point screenLocation) 711Join(toolStripToDrag, Point.Empty); 728Point location; 746public void Join(ToolStrip toolStripToDrag, Point location) 770internal void MoveControl(ToolStrip? toolStripToDrag, Point screenLocation) 778Point clientLocation = PointToClient(screenLocation); 790private void MoveInsideContainer(ToolStrip toolStripToDrag, Point clientLocation) 811Point currentCursorLoc = PointToClient(WindowsFormsUtils.LastCursorPoint); 894Point endLocation = (Orientation == Orientation.Horizontal) ? new Point(clientLocation.X, row.Bounds.Y) : new Point(row.Bounds.X, clientLocation.Y); 955Point cursorLoc = toolStripToDrag.PointToScreen(toolStripToDrag.GripRectangle.Location); 983private void MoveOutsideContainer(ToolStrip toolStripToDrag, Point screenLocation) 1013public ToolStripPanelRow? PointToRow(Point clientLocation)
System\Windows\Forms\Controls\ToolStrips\ToolStripPanel.FeedbackRectangle.cs (2)
42public void Show(Point newLocation) 47public void Move(Point newLocation)
System\Windows\Forms\Controls\ToolStrips\ToolStripPanel.FeedbackRectangle.FeedbackDropDown.cs (1)
92public void MoveTo(Point newLocation)
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelCell.cs (1)
365Point newloc = e.NewLocation;
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelRow.cs (3)
703internal void MoveControl(ToolStrip movingControl, Point startClientLocation, Point endClientLocation) 708internal void JoinRow(ToolStrip toolStripToDrag, Point locationToDrag)
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelRow.HorizontalRowManager.cs (3)
139public override void MoveControl(ToolStrip movingControl, Point clientStartLocation, Point clientEndLocation) 391public override void JoinRow(ToolStrip toolStripToDrag, Point locationToDrag)
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelRow.ToolStripPanelRowManager.cs (3)
171public virtual void MoveControl(ToolStrip movingControl, Point startClientLocation, Point endClientLocation) 180public virtual void JoinRow(ToolStrip toolStripToDrag, Point locationToDrag)
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelRow.VerticalRowManager.cs (3)
141public override void MoveControl(ToolStrip movingControl, Point clientStartLocation, Point clientEndLocation) 398public override void JoinRow(ToolStrip toolStripToDrag, Point locationToDrag)
System\Windows\Forms\Controls\ToolStrips\ToolStripProfessionalLowResolutionRenderer.cs (1)
53Rectangle bounds = new(Point.Empty, e.ToolStrip.Size);
System\Windows\Forms\Controls\ToolStrips\ToolstripProfessionalRenderer.cs (37)
186Point middle = RenderArrowInternal(g, overflowArrowRect, direction, SystemBrushes.ControlText); 230Rectangle bounds = new(Point.Empty, item.Size); 248RenderSeparatorInternal(e.Graphics, e.Item, new Rectangle(Point.Empty, e.Item.Size), e.Vertical); 266Rectangle bounds = new(Point.Empty, item.Size); 347Rectangle bounds = new(Point.Empty, item?.Size ?? Size.Empty); 417Rectangle bounds = new(Point.Empty, toolStrip.Size); 546Rectangle bounds = new(Point.Empty, item.Size); 769e.Graphics.DrawImage(image, imageRect, new Rectangle(Point.Empty, imageRect.Size), GraphicsUnit.Pixel); 846Rectangle bounds = new(Point.Empty, toolStrip.Size); 853Point topLeft = Point.Empty; 854Point topRight = new(bounds.Width - 1, 0); 855Point bottomLeft = new(0, bounds.Height - 1); 856Point bottomRight = new(bounds.Width - 1, bounds.Height - 1); 1108Rectangle bounds = new(Point.Empty, item.Size); 1134g.FillRectangle(brush, new Rectangle(Point.Empty, control.Size)); 1141Rectangle gradientBounds = new(Point.Empty, parent.Size); 1150g.FillRectangle(b, new Rectangle(Point.Empty, control.Size)); 1155Rectangle gradientBounds = new(Point.Empty, control.Size); 1174Rectangle bounds = new(Point.Empty, e.ToolStrip.Size); 1183Rectangle bounds = new(Point.Empty, e.ToolStrip.Size); 1195Rectangle bounds = new(Point.Empty, toolStripDropDown.Size); 1217Rectangle overflowBoundsFill = new(Point.Empty, e.Item.Size); 1270Point start = new(overflowBoundsFill.Left - 1, overflowBoundsFill.Height - 2); 1271Point end = new(overflowBoundsFill.Left, overflowBoundsFill.Height - 2); 1298Point top1 = new(overflowBoundsFill.X - 2, 0); 1299Point top2 = new(overflowBoundsFill.X - 1, 1); 1338Rectangle bounds = new(Point.Empty, e.ToolStrip.Size); 1344Point topLeft = Point.Empty; 1345Point topRight = new(bounds.Width - 1, 0); 1346Point bottomLeft = new(0, bounds.Height - 1); 1388Point gradientCopyPixel = bottomLeft; 1567Rectangle bounds = new(Point.Empty, item.Size); 1646private static Point RenderArrowInternal(Graphics g, Rectangle dropDownRect, ArrowDirection direction, Brush brush) 1648Point middle = new(dropDownRect.Left + dropDownRect.Width / 2, dropDownRect.Top + dropDownRect.Height / 2); 1653Point[] arrow = direction switch
System\Windows\Forms\Controls\ToolStrips\ToolStripRenderer.cs (5)
641Point middle = new( 665Span<Point> arrow = stackalloc Point[3]; 829e.Graphics.DrawImage(image, imageRect, new Rectangle(Point.Empty, imageRect.Size), GraphicsUnit.Pixel); 931bounds: new Rectangle(Point.Empty, textSize),
System\Windows\Forms\Controls\ToolStrips\ToolStripRenderEventArgs.cs (2)
16: this(g, toolStrip, new Rectangle(Point.Empty, toolStrip.OrThrowIfNull().Size), Color.Empty) 109Rectangle itemBounds = new(ToolStrip.PointToClient(ownerItem.TranslatePoint(Point.Empty, ToolStripPointType.ToolStripItemCoords, ToolStripPointType.ScreenCoords)), ownerItem.Size);
System\Windows\Forms\Controls\ToolStrips\ToolStripSettings.cs (2)
58public Point Location 62return (Point)this[nameof(Location)];
System\Windows\Forms\Controls\ToolStrips\ToolStripSettingsManager.SettingsStub.cs (1)
17public Point Location;
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitButton.cs (3)
301Rectangle dropDownButtonBounds = new(Point.Empty, new Size(Math.Min(Width, DropDownButtonWidth), Height)); 307Rectangle splitButtonButtonBounds = new(Point.Empty, new Size(splitButtonButtonWidth, splitButtonButtonHeight)); 466Point clickPoint = new(e.X, e.Y);
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitStackDragDropHandler.cs (4)
69private void OnDropItem(ToolStripItem droppedItem, Point ownerClientAreaRelativeDropPoint) 131private bool ShowItemDropPoint(Point ownerClientAreaRelativeDropPoint) 170private int GetItemInsertionIndex(Point ownerClientAreaRelativeDropPoint) 204private RelativeLocation ComparePositions(Rectangle orig, Point check)
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitStackLayout.cs (4)
11private Point _noMansLand; 320Point itemLocation = new(x, y); 452Point itemLocation = new(x, y); 487private void SetItemLocation(ToolStripItem item, Point itemLocation, Size itemSize)
System\Windows\Forms\Controls\ToolStrips\ToolStripSystemDarkModeRenderer.cs (6)
228Rectangle bounds = new(Point.Empty, e.Item.Size); 274Rectangle bounds = new(Point.Empty, e.Item.Size); 321Rectangle bounds = new(Point.Empty, e.Item.Size); 429Rectangle bounds = new(Point.Empty, e.Item.Size); 443Point middle = new( 476Point[] arrow = arrowDirection switch
System\Windows\Forms\Controls\ToolStrips\ToolStripSystemRenderer.cs (9)
333Rectangle bounds = new(Point.Empty, e.GripBounds.Size); 443vsRenderer.DrawBackground(g, new Rectangle(Point.Empty, item.Size)); 449DrawArrow(new ToolStripArrowRenderEventArgs(g, item, new Rectangle(Point.Empty, item.Size), arrowColor, ArrowDirection.Down)); 476Rectangle bounds = new(Point.Empty, item.Size); 499Rectangle fillRect = new(Point.Empty, item.Size); 545RenderSeparatorInternal(e.Graphics, e.Item, new Rectangle(Point.Empty, e.Item.Size), e.Vertical); 657Rectangle bounds = new(Point.Empty, splitButton.Size); 717vsRenderer.DrawBackground(g, new Rectangle(Point.Empty, item.Size)); 729RenderSmall3DBorderInternal(g, new Rectangle(Point.Empty, item.Size), state, (item.RightToLeft == RightToLeft.Yes));
System\Windows\Forms\Controls\ToolStrips\ToolStripTextBox.cs (3)
441public char GetCharFromPosition(Point pt) { return TextBox.GetCharFromPosition(pt); } 442public int GetCharIndexFromPosition(Point pt) { return TextBox.GetCharIndexFromPosition(pt); } 446public Point GetPositionFromCharIndex(int index) { return TextBox.GetPositionFromCharIndex(index); }
System\Windows\Forms\Controls\TrackBar\TrackBar.TrackBarAccessibleObject.cs (1)
107Point point = new(x, y);
System\Windows\Forms\Controls\TreeView\TreeView.cs (6)
1633public TreeViewHitTestInfo HitTest(Point pt) => HitTest(pt.X, pt.Y); 1674public TreeNode? GetNodeAt(Point pt) => GetNodeAt(pt.X, pt.Y); 2829Point textLoc = new(AppContextSwitches.MoveTreeViewTextLocationOnePixel ? bounds.X : bounds.X - 1, bounds.Y); 3028Point pos = PointToClient(Cursor.Position); 3305Point point = PARAM.ToPoint(m.LParamInternal); 3430Point client;
System\Windows\Forms\Controls\TreeView\TreeView.TreeViewAccessibleObject.cs (1)
64Point p = owningTreeView.PointToClient(new Point(x, y));
System\Windows\Forms\Controls\Unsupported\ContextMenu\ContextMenu.cs (2)
57public void Show(Control control, Point pos) { } 59public void Show(Control control, Point pos, LeftRightAlignment alignment) { }
System\Windows\Forms\Controls\Unsupported\DataGrid\DataGrid.cs (1)
554public HitTestInfo HitTest(Point position) => throw null;
System\Windows\Forms\Controls\UpDown\UpDownBase.cs (2)
833Rectangle clientArea = new(Point.Empty, ClientSize); 902Point point = e.Location;
System\Windows\Forms\Controls\UpDown\UpDownBase.UpDownButtons.cs (2)
320Point pt1 = new(clientRect.Left, clientRect.Bottom - 1); 321Point pt2 = new(clientRect.Right, clientRect.Bottom - 1);
System\Windows\Forms\Controls\WebBrowser\HtmlDocument.cs (1)
457public HtmlElement? GetElementFromPoint(Point point)
System\Windows\Forms\Controls\WebBrowser\HtmlElementEventArgs.cs (3)
48public Point ClientMousePosition 53public Point OffsetMousePosition 58public Point MousePosition
System\Windows\Forms\Controls\WebBrowser\HtmlWindow.cs (3)
167public Point Position 301public void MoveTo(Point point) 407public void ScrollTo(Point point)
System\Windows\Forms\Controls\WebBrowser\WebBrowser.cs (2)
1340private bool ShowContextMenu(Point location) 1348Point client;
System\Windows\Forms\Controls\WebBrowser\WebBrowser.WebBrowserSite.cs (1)
29unsafe HRESULT IDocHostUIHandler.ShowContextMenu(uint dwID, Point* pt, object pcmdtReserved, object pdispReserved)
System\Windows\Forms\Controls\WebBrowser\WebBrowserBase.cs (4)
340PInvoke.GetCursorPos(out Point p); 790Point location = Location; 1112Point phm = new(sz.Width, sz.Height); 1124Point phm = default;
System\Windows\Forms\ErrorProvider\ErrorProvider.ErrorWindow.cs (1)
176Point originalOrigin = default;
System\Windows\Forms\Form.cs (7)
915public Point DesktopLocation 920Point loc = Location; 1148public new Point Location 3925Point p = default; 3971Point p = default; 4414Point pointToSnap = new(button.Left + button.Width / 2, button.Top + button.Height / 2); 6993Point point = PointToClient(PARAM.ToPoint(m.LParamInternal));
System\Windows\Forms\GiveFeedbackEventArgs.cs (2)
26public GiveFeedbackEventArgs(DragDropEffects effect, bool useDefaultCursors, Bitmap? dragImage, Point cursorOffset, bool useDefaultDragImage) 65public Point CursorOffset { get; set; }
System\Windows\Forms\Help\Help.cs (1)
77public static unsafe void ShowPopup(Control? parent, string caption, Point location)
System\Windows\Forms\Help\HelpEventArgs.cs (2)
14public HelpEventArgs(Point mousePos) 22public Point MousePos { get; }
System\Windows\Forms\Input\Cursor.cs (4)
168public Point HotSpot 178/// Gets or sets a <see cref="Point"/> that specifies the current cursor position in screen coordinates. 180public static Point Position 184PInvoke.GetCursorPos(out Point p);
System\Windows\Forms\Input\HandledMouseEventArgs.cs (1)
13internal HandledMouseEventArgs(MouseButtons button, int clicks, Point location, int delta)
System\Windows\Forms\Input\MouseEventArgs.cs (2)
27internal MouseEventArgs(MouseButtons button, int clicks, Point location, int delta = 0) 64public Point Location => new(X, Y);
System\Windows\Forms\Internal\WinFormsUtils.cs (3)
24public static Point LastCursorPoint 284public static Point TranslatePoint(Point point, Control fromControl, Control toControl)
System\Windows\Forms\Layout\Containers\ContainerControl.cs (1)
689Point topLeftPoint = default;
System\Windows\Forms\Layout\Containers\SplitContainer.cs (7)
55private Point _anchor = Point.Empty; 133[DefaultValue(typeof(Point), "0, 0")] 134public override Point AutoScrollOffset 169public new Point AutoScrollPosition 451PInvoke.GetCursorPos(out Point p); 2154_anchor = Point.Empty;
System\Windows\Forms\Layout\DefaultLayout.cs (1)
81Point location = oldBounds.Location;
System\Windows\Forms\Layout\FlowLayout.ContainerProxy.cs (6)
64Point ptScroll = flp.AutoScrollPosition; 65if (ptScroll != Point.Empty) 67Point pt = new(value.X, value.Y); 142Point ptScroll = flp.AutoScrollPosition; 143if (ptScroll != Point.Empty) 145Point pt = new(newBounds.X, newBounds.Y);
System\Windows\Forms\Layout\FlowLayout.cs (1)
166Point location = rowBounds.Location;
System\Windows\Forms\Layout\LayoutUtils.cs (2)
433public static Point FlipPoint(Point point)
System\Windows\Forms\NotifyIcon.cs (1)
608PInvoke.GetCursorPos(out Point pt);
System\Windows\Forms\OLE\DropSource.cs (2)
20public DropSource(ISupportOleDropSource peer, IComVisibleDataObject dataObject, Bitmap? dragImage, Point cursorOffset, bool useDefaultDragImage) 93if (!lastHwndTarget.IsNull && (Cursor.Position is Point point))
System\Windows\Forms\Panels\Panel.cs (1)
230ControlPaint.PrintBorder(g, new Rectangle(Point.Empty, Size), BorderStyle, Border3DStyle.Sunken);
System\Windows\Forms\Panels\SplitterPanel.cs (1)
141public new Point Location
System\Windows\Forms\Printing\PrintPreviewControl.cs (11)
35private Point _position = new(0, 0); 48private Point _screenDPI = Point.Empty; 404private Point Position 625Point offset = new( 635Point lastImageSize = Point.Empty; 751private static Size PixelsToPhysical(Size pixels, Point dpi) => 757private static Size PhysicalToPixels(Size physical, Point dpi) => 760private void SetPositionNoInvalidate(Point value) 905Point locPos = Position;
System\Windows\Forms\Printing\PrintPreviewDialog.cs (1)
402public new Point Location
System\Windows\Forms\Rendering\ControlPaint.cs (7)
418Point scrollOffset = default, 429if (scrollOffset != Point.Empty) 473Rectangle partOfImageToDraw = new(Point.Empty, imageRect.Size); 1671Point start = new(bounds.X + bounds.Width - 1, bounds.Y - 1); 1672Point end = new(bounds.X + bounds.Width - 1, bounds.Y + bounds.Height); 1820public static unsafe void DrawReversibleLine(Point start, Point end, Color backColor)
System\Windows\Forms\Rendering\DCMapping.cs (1)
40Point viewportOrg = default;
System\Windows\Forms\Rendering\ScreenDcCache.cs (1)
106Point point;
System\Windows\Forms\Rendering\TextRenderer.cs (14)
25public static void DrawText(IDeviceContext dc, string? text, Font? font, Point pt, Color foreColor) 34/// <param name="pt">The <see cref="Point"/> that represents the upper-left corner of the drawn text.</param> 37public static void DrawText(IDeviceContext dc, ReadOnlySpan<char> text, Font font, Point pt, Color foreColor) 44Point pt, 55/// <param name="pt">The <see cref="Point"/> that represents the upper-left corner of the drawn text.</param> 63Point pt, 72Point pt, 84/// <param name="pt">The <see cref="Point"/> that represents the upper-left corner of the drawn text.</param> 95Point pt, 111Point pt, 124/// <param name="pt">The <see cref="Point"/> that represents the upper-left corner of the drawn text.</param> 136Point pt, 283Point pt, 396/// versions of <see cref="DrawText(IDeviceContext, ReadOnlySpan{char}, Font, Point, Color)"/> and
System\Windows\Forms\Screen.cs (3)
249public static Screen FromPoint(Point point) 283public static Rectangle GetWorkingArea(Point pt) => FromPoint(pt).WorkingArea; 298public static Rectangle GetBounds(Point pt) => FromPoint(pt).Bounds;
System\Windows\Forms\Scrolling\ScrollableControl.cs (4)
115public Point AutoScrollPosition 831Point scrollLocation = ScrollToControl(activeControl); 846protected virtual Point ScrollToControl(Control activeControl) 1112Point pt = AutoScrollPosition;
System\Windows\Forms\Scrolling\ScrollBar.ScrollBarAccessibleObject.cs (1)
91Point point = new(x, y);
System\Windows\Forms\ToolTip\ToolTip.cs (18)
1028private HWND GetWindowFromPoint(Point screenCoords, ref bool success) 1055Point pt = screenCoords; 1314Point cursorLocation = Cursor.Position; 1315Point p = cursorLocation; 1402public void Show(string? text, IWin32Window window, Point point) 1421public void Show(string? text, IWin32Window window, Point point, int duration) 1495Point optimalPoint = GetOptimalToolTipPosition(tool, toolRectangle, bubbleSize.Width, bubbleSize.Height); 1547private Point GetOptimalToolTipPosition(IKeyboardToolTip tool, Rectangle toolRectangle, int width, int height) 1790private void SetTool(IWin32Window window, string? text, TipInfo.Type type, Point position) 1927private void Reposition(Point tipPosition, Size tipSize) 1929Point moveToLocation = tipPosition; 1990if (tipInfo.Position != Point.Empty) 2008Point cursorLocation = Cursor.Position; 2024var lpPoint = (Point*)(nint)message.LParamInternal; 2147Point cursorPos = Cursor.Position; 2180if (((tipInfo.TipType & TipInfo.Type.SemiAbsolute) != 0) && tipInfo.Position == Point.Empty) 2202else if ((tipInfo.TipType & TipInfo.Type.SemiAbsolute) != 0 && tipInfo.Position != Point.Empty) 2264tipInfo.Position = Point.Empty;
System\Windows\Forms\ToolTip\ToolTip.TipInfo.cs (1)
29public Point Position { get; set; }
System\Windows\Forms\VisualStyles\VisualStyleRenderer.cs (5)
613public Point GetPoint(PointProperty prop) 618_lastHResult = PInvoke.GetThemePosition(HTHEME, Part, State, (THEME_PROPERTY_SYMBOL_ID)prop, out Point point); 716public HitTestCode HitTestBackground(IDeviceContext dc, Rectangle backgroundRectangle, Point pt, HitTestOptions options) 738public HitTestCode HitTestBackground(Graphics g, Rectangle backgroundRectangle, Region region, Point pt, HitTestOptions options) 750public HitTestCode HitTestBackground(IDeviceContext dc, Rectangle backgroundRectangle, IntPtr hRgn, Point pt, HitTestOptions options)
System.Windows.Forms.Design (457)
Resources\MaskDesignerDialog.Designer.cs (24)
86internal static System.Drawing.Point btnCancel_Location { 89return ((System.Drawing.Point)(obj)); 145internal static System.Drawing.Point btnOK_Location { 148return ((System.Drawing.Point)(obj)); 204internal static System.Drawing.Point checkBoxUseValidatingType_Location { 207return ((System.Drawing.Point)(obj)); 273internal static System.Drawing.Point lblHeader_Location { 276return ((System.Drawing.Point)(obj)); 333internal static System.Drawing.Point lblMask_Location { 336return ((System.Drawing.Point)(obj)); 392internal static System.Drawing.Point lblTryIt_Location { 395return ((System.Drawing.Point)(obj)); 478internal static System.Drawing.Point listViewCannedMasks_Location { 481return ((System.Drawing.Point)(obj)); 528internal static System.Drawing.Point maskedTextBox_Location { 531return ((System.Drawing.Point)(obj)); 606internal static System.Drawing.Point maskTryItTable_Location { 609return ((System.Drawing.Point)(obj)); 690internal static System.Drawing.Point okCancelTableLayoutPanel_Location { 693return ((System.Drawing.Point)(obj)); 767internal static System.Drawing.Point overarchingTableLayoutPanel_Location { 770return ((System.Drawing.Point)(obj)); 817internal static System.Drawing.Point txtBoxMask_Location { 820return ((System.Drawing.Point)(obj));
System\ComponentModel\Design\CollectionEditor.SplitButton.cs (2)
244Point middle = new( 251Point[] arrow = [
System\ComponentModel\Design\DesignerActionPanel.cs (1)
232public static Point ComputePreferredDesktopLocation(Rectangle rectangleAnchor, Size sizePanel, out DockStyle edgeToDock)
System\ComponentModel\Design\DesignerActionPanel.EditorPropertyLine.cs (4)
341Rectangle editorBounds = new(Point.Empty, EditRegionSize); 343Point editorLocation = ActionPanel.PointToScreen(EditRegionLocation); 365Rectangle editorBounds = new(Point.Empty, EditRegionSize); 367Point editorLocation = ActionPanel.PointToScreen(EditRegionLocation);
System\ComponentModel\Design\DesignerActionPanel.TextBoxPropertyLine.cs (3)
18private Point _editRegionLocation; 65protected Point EditRegionLocation => _editRegionLocation; 67protected Point EditRegionRelativeLocation { get; private set; }
System\ComponentModel\Design\DesignerActionUI.cs (9)
612Point point = DesignerUtils.LastCursorPoint; 615Point glyphCoord = GetGlyphLocationScreenCoord(_lastPanelComponent, currentGlyph); 633internal Point UpdateDAPLocation(IComponent? component, DesignerActionGlyph? glyph) 639return Point.Empty; 655Point glyphLocationScreenCoord = GetGlyphLocationScreenCoord(component, glyph); 657Point pt = DesignerActionPanel.ComputePreferredDesktopLocation(rectGlyph, _designerActionHost.Size, out DockStyle edgeToDock); 663private Point GetGlyphLocationScreenCoord(IComponent relatedComponent, Glyph glyph) 665Point glyphLocationScreenCoord = new(0, 0); 712Point location = UpdateDAPLocation(relatedComponent, glyph);
System\ComponentModel\Design\MultilineStringEditor.MultilineStringEditorUI.cs (1)
164Point location = PointToScreen(Location);
System\Drawing\Design\ColorEditor.ColorPalette.ColorPaletteAccessibleObject.ColorCellAccessibleObject.cs (2)
31Point cellPt = Get2DFrom1D(_cell); 36Point pt = new(rect.X, rect.Y);
System\Drawing\Design\ColorEditor.ColorPalette.ColorPaletteAccessibleObject.cs (1)
43Point point = palette.PointToClient(new(x, y));
System\Drawing\Design\ColorEditor.ColorPalette.cs (10)
51private Point _focus; 129private Point GetCellFromColor(Color c) 142return Point.Empty; 157private static Point GetCell2DFromLocationMouse(int x, int y) 180private static int Get1DFrom2D(Point pt) => Get1DFrom2D(pt.X, pt.Y); 192private static Point Get2DFrom1D(int cell) 310Point cell2D = GetCell2DFromLocationMouse(me.X, me.Y); 324Point cell2D = GetCell2DFromLocationMouse(me.X, me.Y); 339Point cell2D = GetCell2DFromLocationMouse(me.X, me.Y); 436private void SetFocus(Point newFocus)
System\Windows\Forms\Design\Behavior\Behavior.cs (4)
126public virtual bool OnMouseDoubleClick(Glyph? g, MouseButtons button, Point mouseLoc) 148public virtual bool OnMouseDown(Glyph? g, MouseButtons button, Point mouseLoc) 189public virtual bool OnMouseHover(Glyph? g, Point mouseLoc) 229public virtual bool OnMouseMove(Glyph? g, MouseButtons button, Point mouseLoc)
System\Windows\Forms\Design\Behavior\BehaviorService.AdornerWindow.cs (7)
132Point scrollPosition = DesignerFrame.AutoScrollPosition; 149Point scrollPosition = DesignerFrame.AutoScrollPosition; 210PInvoke.GetCursorPos(out Point point); 246PInvoke.GetCursorPos(out Point point); 318Point pt = PARAM.ToPoint(m.LParamInternal); 319Point pt1 = PointToClient(default); 345Point mouseLoc = new(x, y);
System\Windows\Forms\Design\Behavior\BehaviorService.AdornerWindow.MouseHook.cs (1)
179Point pt = adornerWindow.PointToClient(new Point(x, y));
System\Windows\Forms\Design\Behavior\BehaviorService.cs (16)
255public Point AdornerWindowPointToScreen(Point p) => _adornerWindow.PointToScreen(p); 260public Point AdornerWindowToScreen() => AdornerWindowPointToScreen(new Point(0, 0)); 265public Point ControlToAdornerWindow(Control c) 269return Point.Empty; 272Point pt = new(c.Left, c.Top); 285public Point MapAdornerWindowPoint(IntPtr handle, Point pt) 301Point loc = ControlToAdornerWindow(c); 465public Point ScreenToAdornerWindow(Point p) => _adornerWindow.PointToClient(p); 483private bool PropagateHitTest(Point pt) 666private bool OnMouseDoubleClick(MouseButtons button, Point mouseLoc) 669private bool OnMouseDown(MouseButtons button, Point mouseLoc) 674private bool OnMouseHover(Point mouseLoc) 684private bool OnMouseMove(MouseButtons button, Point mouseLoc)
System\Windows\Forms\Design\Behavior\ComponentGlyph.cs (1)
42public override Cursor? GetHitTest(Point p) => null;
System\Windows\Forms\Design\Behavior\ContainerSelectorBehavior.cs (14)
21private Point _initialDragPoint; // cached "mouse down" point 61_initialDragPoint = Point.Empty; 81public Point InitialDragPoint 90public override bool OnMouseDown(Glyph? g, MouseButtons button, Point mouseLoc) 149private Point DetermineInitialDragPoint(Point mouseLoc) 154Point controlOrigin = _behaviorService.ControlToAdornerWindow(_containerControl); 170public override bool OnMouseMove(Glyph? g, MouseButtons button, Point mouseLoc) 174if (InitialDragPoint == Point.Empty) 183Point screenLoc = _behaviorService.AdornerWindowToScreen(); 197InitialDragPoint = Point.Empty; 205private void StartDragOperation(Point initialMouseLocation) 239Point controlOrigin; 259InitialDragPoint = Point.Empty;
System\Windows\Forms\Design\Behavior\ContainerSelectorGlyph.cs (1)
39public override Cursor? GetHitTest(Point p)
System\Windows\Forms\Design\Behavior\ControlBodyGlyph.cs (1)
53public override Cursor? GetHitTest(Point p)
System\Windows\Forms\Design\Behavior\DesignerActionBehavior.cs (2)
91public override bool OnMouseDoubleClick(Glyph? g, MouseButtons button, Point mouseLoc) 97public override bool OnMouseDown(Glyph? g, MouseButtons button, Point mouseLoc)
System\Windows\Forms\Design\Behavior\DesignerActionGlyph.cs (3)
87public override Cursor? GetHitTest(Point p) 132Point topRight = Point.Empty;
System\Windows\Forms\Design\Behavior\DragAssistanceManager.cs (16)
25private Point _dragOffset; // the offset from the new drag pos compared to the last 214Point offset = controlDesigner.GetOffsetToClientArea(); 545_dragOffset = _behaviorService.MapAdornerWindowPoint(rootControl.Handle, Point.Empty); 661internal Point OffsetToNearestSnapLocation(Control targetControl, IList targetSnaplines, Point directionOffset) 686internal Point OffsetToNearestSnapLocation(Control targetControl, Point directionOffset) 688Point offset = Point.Empty; 1035internal Point OnMouseMove(Rectangle dragBounds, SnapLine[] snapLines) 1046internal Point OnMouseMove(Rectangle dragBounds, SnapLine[] snapLines, ref bool didSnap, bool shouldSnapHorizontally) 1050return Point.Empty; 1075internal Point OnMouseMove(Rectangle dragBounds) 1085internal Point OnMouseMove(Control targetControl, SnapLine[] snapLines, ref bool didSnap, bool shouldSnapHorizontally) 1096private Point OnMouseMove(Rectangle dragBounds, bool offsetSnapLines, ref bool didSnap, bool shouldSnapHorizontally) 1143Point snapPoint = new(_snapPointX != INVALID_VALUE ? _snapPointX : 0, _snapPointY != INVALID_VALUE ? _snapPointY : 0);
System\Windows\Forms\Design\Behavior\DropSourceBehavior.cs (29)
25public Point originalControlLocation; // the original control of the control in AdornerWindow coordinates 26public Point draggedLocation; // the location of the component after each drag - in AdornerWindow coordinates 28public Point positionOffset; // control position offset from primary selection 39private Point _lastSnapOffset; // the last SnapOffset we used. 52private Point _initialMouseLoc; // original mouse location in screen coordinates 57private Point _originalDragImageLocation; // original location of the drag image 60private Point _lastFeedbackLocation; // the last position we got feedback at 63private Point _parentLocation; // location of parent on AdornerWindow - used for grid snap calculations 78internal DropSourceBehavior(List<IComponent> dragComponents, Control source, Point initialMouseLocation) 114_lastSnapOffset = Point.Empty; 140private Point AdjustToGrid(Point dragLoc) 143Point controlLocation = new(dragLoc.X - _parentLocation.X, dragLoc.Y - _parentLocation.Y); 144Point offset = Point.Empty; 170private Point MapPointFromSourceToTarget(Point pt) 183private Point MapPointFromTargetToSource(Point pt) 262private void SetLocationPropertyAndChildIndex(int dragComponentIndex, Control dragTarget, Point dropPoint, int newIndex, bool allowSetChildIndexOnDrop) 271Point pt = new(dropPoint.X, dropPoint.Y); 274Point ptScroll = p.AutoScrollPosition; 442Point initialDropPoint = _behaviorServiceSource.AdornerWindowPointToScreen(_dragComponents[_primaryComponentIndex].draggedLocation); 493Point dropPoint = new(initialDropPoint.X + _dragComponents[i].positionOffset.X, 618Point mouseLoc = Control.MousePosition; 739Point newPosition = new(mouseLoc.X - _initialMouseLoc.X + _dragComponents[_primaryComponentIndex].originalControlLocation.X, 823Point dropPoint = _behaviorServiceSource.AdornerWindowPointToScreen(_dragComponents[_primaryComponentIndex].draggedLocation); 887_parentLocation = bhvSvc.MapAdornerWindowPoint(parentControl.Handle, Point.Empty); 931private void InitiateDrag(Point initialMouseLocation, ICollection<IComponent> dragComps)
System\Windows\Forms\Design\Behavior\Glyph.cs (1)
47public abstract Cursor? GetHitTest(Point p);
System\Windows\Forms\Design\Behavior\ResizeBehavior.cs (12)
30private Point _initialPoint; // the initial point of the mouse down 38private Point _lastMouseLoc; // helps us avoid re-entering code if the mouse hasn't moved 39private Point _parentLocation; // used to snap resize ops to the grid 41private Point _lastMouseAbs; // last absolute mouse position 42private Point _lastSnapOffset; // the last snapoffset we used. 60_lastSnapOffset = Point.Empty; 158private SnapLine[] GenerateSnapLines(SelectionRules rules, Point loc) 290public override bool OnMouseDown(Glyph g, MouseButtons button, Point mouseLoc) 457public override bool OnMouseMove(Glyph g, MouseButtons button, Point mouseLoc) 480if (_lastMouseAbs != Point.Empty) 482Point mouseLocAbs = new(mouseLoc.X, mouseLoc.Y); 915_lastSnapOffset = Point.Empty;
System\Windows\Forms\Design\Behavior\SelectionGlyphBase.cs (1)
37public override Cursor? GetHitTest(Point p)
System\Windows\Forms\Design\Behavior\TableLayoutPanelBehavior.cs (5)
15private Point _lastMouseLoc; // used to track mouse movement deltas 44_lastMouseLoc = Point.Empty; 52_lastMouseLoc = Point.Empty; 87public override bool OnMouseDown(Glyph g, MouseButtons button, Point mouseLoc) 239public override bool OnMouseMove(Glyph g, MouseButtons button, Point mouseLoc)
System\Windows\Forms\Design\Behavior\TableLayoutPanelResizeGlyph.cs (1)
51public override Cursor? GetHitTest(Point p)
System\Windows\Forms\Design\Behavior\ToolboxItemSnapLineBehavior.cs (9)
21private Point _lastOffset; // cache the last snap so we know where to create our control if dropped 37_lastOffset = Point.Empty; 86_lastOffset = Point.Empty; 105private ToolboxSnapDragDropEventArgs CreateToolboxSnapArgs(DragEventArgs e, Point mouseLoc) 109Point offset = Point.Empty; 256Point screenOffset = _behaviorService.AdornerWindowToScreen(); 295public override bool OnMouseMove(Glyph? g, MouseButtons button, Point mouseLoc) 345Point adornerServiceOrigin = _behaviorService.MapAdornerWindowPoint(baseControl.Handle, new Point(0, 0));
System\Windows\Forms\Design\Behavior\ToolboxSnapDragDropEventArgs.cs (2)
21public ToolboxSnapDragDropEventArgs(SnapDirection snapDirections, Point offset, DragEventArgs origArgs) 38public Point Offset { get; }
System\Windows\Forms\Design\Behavior\ToolStripPanelSelectionBehavior.cs (2)
74public override bool OnMouseDown(Glyph? glyph, MouseButtons button, Point screenCoordinates) 118Point loc = _behaviorService.ControlToAdornerWindow(parent);
System\Windows\Forms\Design\Behavior\ToolStripPanelSelectionGlyph.cs (1)
205public override Cursor? GetHitTest(Point p)
System\Windows\Forms\Design\CommandSet.cs (50)
535private static Point GetLocation(IComponent comp) 543return (Point)prop.GetValue(comp)!; 551return Point.Empty; 689PInvoke.GetCursorPos(out Point p); 813Point snappedOffset = dragManager.OffsetToNearestSnapLocation(primaryControl, new Point(moveOffsetX, moveOffsetY)); 862Point loc = primaryControl.Location; 928Point loc = (Point)propLoc.GetValue(component)!; 969Point primaryLocation = GetLocation(primarySelection!); 993Point loc = Point.Empty; 1042loc = (Point)locProp.GetValue(comp)!; 1050loc = (Point)locProp.GetValue(comp)!; 1058loc = (Point)locProp.GetValue(comp)!; 1066loc = (Point)locProp.GetValue(comp)!; 1075loc = (Point)locProp.GetValue(comp)!; 1083loc = (Point)locProp.GetValue(comp)!; 1185var loc = (Point)locProp.GetValue(comp)!; 1296Point loc = (Point)locProp.GetValue(comp)!; 1345Point loc = (Point)locProp.GetValue(comp)!; 2428Point loc = (Point)locProp.GetValue(comp)!; 2558Point curLoc = Point.Empty, lastLoc = Point.Empty; 2559Point primaryLoc = Point.Empty; 2623curLoc = Point.Empty; 2640curLoc = (Point)curLocDesc.GetValue(curComp)!; 2679lastLoc = (Point)curLocDesc.GetValue(curComp)!; 2717primaryLoc = (Point)primaryLocDesc.GetValue(primary)!; 2750curLoc = (Point)curLocDesc.GetValue(curComp)!; 2781lastLoc = (Point)lastLocDesc.GetValue(lastComp)!; 3245Point min = controls[0].Location; 3246Point max = min; 3249Point loc = c.Location; 3278Point offset = new(-min.X, -min.Y); 3291Point parentOffset = new(parentSize.Width / 2, parentSize.Height / 2); 3416Point newLoc = c.Location; 3470Point pLoc = (Point)pProp.GetValue(p)!; 3471Point qLoc = (Point)qProp.GetValue(q)!; 3488Point pLoc = (Point)pProp.GetValue(p)!; 3489Point qLoc = (Point)qProp.GetValue(q)!;
System\Windows\Forms\Design\ComponentTray.cs (36)
27private static Point InvalidPoint { get; } = new(int.MinValue, int.MinValue); 29private Point _whiteSpace = Point.Empty; // space to leave between components. 52private Point _mouseDragStart = InvalidPoint; // the starting location of a drag 53private Point _mouseDragEnd = InvalidPoint; // the ending location of a drag 56private Point _mouseDropLocation = InvalidPoint; // where the tool was dropped 59private Point _autoScrollPosBeforeDragging = Point.Empty; // Used to return the correct scroll pos. after a drag 643private void OnContextMenu(Point location) 956public Point GetLocation(IComponent receiver) 964return (Point)(loc.GetValue(receiver)); 983public Point GetTrayLocation(IComponent receiver) 992Point loc = c.Location; 993Point autoScrollLoc = AutoScrollPosition; 1203private void DrawRubber(Point start, Point end) 1529public void SetLocation(IComponent receiver, Point location) 1563public void SetTrayLocation(IComponent receiver, Point location) 1574Point autoScrollLoc = AutoScrollPosition; 1618Point location = PARAM.ToPoint(m.LParamInternal); 1635Point location = PARAM.ToPoint(m.LParamInternal); 1808internal void RearrangeInAutoSlots(Control c, Point pos) 1832Point newLoc = new(display.X + _whiteSpace.X, display.Y + _whiteSpace.Y); 1843Point autoScrollLoc = AutoScrollPosition; 1860Point newLoc = new(bounds.X + bounds.Width + _whiteSpace.X, bounds.Y); 1878Point autoScrollLoc = AutoScrollPosition; 1907private Point _mouseDragLast = InvalidPoint; // the last position of the mouse during a drag. 2194Point newPt = PointToScreen(new Point(me.X, me.Y)); 2240private void OnContextMenu(Point location) 2538Point location = PARAM.ToPoint(m.LParamInternal); 2551Point pt = PARAM.ToPoint(m.LParamInternal); 2552Point pt1 = PointToClient(default); 2667public Cursor GetHitTest(Point p) 2774Point tcLoc1 = o1.Location; 2775Point tcLoc2 = o2.Location; 2944if (comp is Point)
System\Windows\Forms\Design\ControlCommandSet.cs (2)
466Point pt = BehaviorService.ControlToAdornerWindow(primaryControl); 634Point snappedOffset = dragManager.OffsetToNearestSnapLocation(primaryControl, targetSnaplines, new Point(moveOffsetX, moveOffsetY));
System\Windows\Forms\Design\ControlDesigner.cs (15)
20protected static readonly Point InvalidPoint = new(int.MinValue, int.MinValue); 46private Point _mouseDragLast = InvalidPoint; // the last position of the mouse during a drag. 80private Point Location 84Point loc = Control.Location; 88Point pt = parent.AutoScrollPosition; 98Point pt = parent.AutoScrollPosition; 285internal Point GetOffsetToClientArea() 287Point nativeOffset = default; 293Point offset = Control.Location; 869protected virtual bool GetHitTest(Point point) => false; 1720Point pt = PARAM.ToPoint(m.LParamInternal); 1773Point location = default; 2083Point point = default; 2134Rectangle clientAreaScreenBounds = new(Control.PointToScreen(Point.Empty), Control.ClientSize); 2395Point pt = PARAM.ToPoint(lParam);
System\Windows\Forms\Design\ControlDesigner.TransparentBehavior.cs (1)
30internal bool IsTransparent(Point p) => _designer.GetHitTest(p);
System\Windows\Forms\Design\DesignBindingPicker.cs (1)
1750Point pt = new(e.X, e.Y);
System\Windows\Forms\Design\DesignerFrame.cs (1)
58internal Point AutoScrollPosition => _designerRegion.AutoScrollPosition;
System\Windows\Forms\Design\DesignerToolStripControlHost.cs (1)
52Point loc = _behaviorService.ControlToAdornerWindow(Parent);
System\Windows\Forms\Design\DesignerUtils.cs (2)
154public static Point LastCursorPoint 569if (e.Offset != Point.Empty)
System\Windows\Forms\Design\DocumentDesigner.cs (4)
145[DefaultValue(typeof(Point), "0, 0")] 146private Point Location 150return (Point)ShadowProperties[nameof(Location)]; 500Point loc = BehaviorService.ControlToAdornerWindow((Control)Component);
System\Windows\Forms\Design\FlowLayoutPanelDesigner .cs (18)
31private Point _lastMouseLocation; 48private Point _oldPoint1 = Point.Empty; 53private Point _oldPoint2 = Point.Empty; 193Point offset = Control.PointToScreen(Point.Empty); 430=> ReDrawIBar(Point.Empty, Point.Empty); 437private void ReDrawIBar(Point point1, Point point2) 447if (point1 != Point.Empty) 449Point offset = BehaviorService.AdornerWindowToScreen(); 456if (point1 != _oldPoint1 && point2 != _oldPoint2 && _oldPoint1 != Point.Empty) 754_lastMouseLocation = Point.Empty; 790Point mouseLocation = new(de.X, de.Y); 803Point controlOffset = Control.PointToScreen(Point.Empty);
System\Windows\Forms\Design\GroupBoxDesigner.cs (1)
22protected override Point DefaultControlLocation
System\Windows\Forms\Design\ISelectionUIService.cs (1)
78bool GetAdornmentHitTest(object component, Point pt);
System\Windows\Forms\Design\ListViewDesigner.cs (2)
69protected override unsafe bool GetHitTest(Point point) 76Point listViewPoint = Control.PointToClient(point);
System\Windows\Forms\Design\OleDragDropHandler.cs (21)
31private Point _localDragOffset = Point.Empty; 34private Point _dragBase = Point.Empty; 318private Point DrawDragFrames( 320Point oldOffset, 322Point newOffset, 330return Point.Empty; 335return Point.Empty; 464_localDragOffset = Point.Empty; 570DrawDragFrames(_dragComps, _localDragOffset, _localDragEffect, Point.Empty, drawAtNewOffset: false); 573_localDragOffset = Point.Empty; 576_dragBase = Point.Empty; 652Point.Empty, 758Point dropPt = Destination.GetDesignerControl().PointToClient(new Point(de.X, de.Y)); 768Point pt = (Point)loc.GetValue(comp)!; 931Point.Empty, 936_dragBase = Point.Empty; 965Point convertedPoint = Destination.GetDesignerControl().PointToClient(new Point(de.X, de.Y)); 968Point newOffset = _forceDrawFrames ? convertedPoint : new Point(de.X - _dragBase.X, de.Y - _dragBase.Y);
System\Windows\Forms\Design\ParentControlDesigner.cs (31)
22private Point _mouseDragBase = InvalidPoint; // the base point of the drag 44private Point _adornerWindowToScreenOffset; // quick lookup for offsetting snaplines for new tools 111protected virtual Point DefaultControlLocation => new(0, 0); 308Point offset = GetOffsetToClientArea(); 423Point loc = newChild.Location; 434Point location = Point.Empty; 441location = (Point)defaultValues["Location"]; 576Point pt = new(bounds.X, bounds.Y); 580Point ptScroll = p.AutoScrollPosition; 800protected void CreateTool(ToolboxItem tool, Point location) 1041Point loc = BehaviorService.ControlToAdornerWindow((Control)Component); 1103Point minimumLocation = DefaultControlLocation; 1118internal Point GetSnappedPoint(Point pt) 1139Point halfGrid = new(gridSize.Width / 2, gridSize.Height / 2); 1238Rectangle bounds = new((Point)defaultValues["Location"], (Size)defaultValues["Size"]); 1771Point baseVar = _mouseDragBase; 1823Point location = new(baseVar.X, baseVar.Y); 1941Point offset = _dragManager.OnMouseMove(r, GenerateNewToolSnapLines(r)); 2014Point offset = new(_mouseDragOffset.X, _mouseDragOffset.Y); 2142Point parentLoc = Point.Empty; 2145parentLoc = (Point)locationProp.GetValue(newParent); 2154Point controlLoc = Point.Empty; 2167controlLoc = (Point)locProp.GetValue(control); 2182Point newLoc = Point.Empty; 2195Point oldParentLoc = (Point)locProp.GetValue(oldParent);
System\Windows\Forms\Design\ScrollableControlDesigner.cs (1)
22protected override bool GetHitTest(Point pt)
System\Windows\Forms\Design\SelectionUIHandler.cs (3)
186Point adjustedLoc = default; 597Point loc; 610loc = (Point)locProp.GetValue(control)!;
System\Windows\Forms\Design\SelectionUIService.ContainerSelectionUIItem.cs (2)
19public override Cursor? GetCursorAtPoint(Point point) 31public override int GetHitTest(Point point)
System\Windows\Forms\Design\SelectionUIService.cs (14)
25private static readonly Point s_invalidPoint = new(int.MinValue, int.MinValue); 39private Point _mouseDragAnchor = s_invalidPoint; // anchor point of the drag 41private Point _lastMoveScreenCoord = Point.Empty; 108private void BeginMouseDrag(Point anchor, int hitTest) 184private void EndMouseDrag(Point position) 206private HitTestInfo GetHitTest(Point value, int flags) 208Point pt = PointToClient(value); 519Point anchor = PointToScreen(new Point(me.X, me.Y)); 606Point screenCoord = PointToScreen(new Point(me.X, me.Y)); 718Point screenCoord = PointToScreen(new Point(me.X, me.Y)); 789private void SetSelectionCursor(Point pt) 791Point clientCoords = PointToClient(pt); 1214bool ISelectionUIService.GetAdornmentHitTest(object component, Point value) =>
System\Windows\Forms\Design\SelectionUIService.SelectionUIItem.cs (4)
189public virtual Cursor? GetCursorAtPoint(Point point) 223public virtual int GetHitTest(Point pt) 245private int GetHandleIndexOfPoint(Point pt) 382protected bool PointWithinSelection(Point pt)
System\Windows\Forms\Design\SplitContainerDesigner.cs (1)
189protected override bool GetHitTest(Point point) => !(InheritanceAttribute == InheritanceAttribute.InheritedReadOnly) && _splitContainerSelected;
System\Windows\Forms\Design\StatusCommandUI.cs (2)
38public void SetStatusInformation(Component? selectedComponent, Point location) 55if (location != Point.Empty)
System\Windows\Forms\Design\TabControlDesigner.cs (4)
165protected override bool GetHitTest(Point point) 175Point hitTest = Control.PointToClient(point); 568Point dropPoint = Control.PointToClient(new Point(de.X, de.Y)); 621                   Point p = Cursor.Position;
System\Windows\Forms\Design\TableLayoutPanelDesigner.cs (12)
21private Point _droppedCellPosition = InvalidPoint; // used to insert new children 460private void ControlAddedInternal(Control control, Point newControlPosition, bool localReposition, bool fullTable, DragEventArgs de) 573Point oldPosition = GetControlPosition(control); 962private Point GetCellPosition(Point pos) 969Point startingPoint = Table.PointToScreen(Table.DisplayRectangle.Location); 972Point position = new(-1, -1); 1048private Point GetControlPosition(Control control) 1075Point loc = BehaviorService.MapAdornerWindowPoint(Table.Handle, Table.DisplayRectangle.Location); 1078Point controlLoc = BehaviorService.ControlToAdornerWindow(Control); 1264Point dropPoint = GetCellPosition(Control.MousePosition); 1295Point cell = GetCellPosition(new Point(x, y));
System\Windows\Forms\Design\ToolStripAdornerWindowService.cs (6)
93public Point AdornerWindowPointToScreen(Point p) => _toolStripAdornerWindow.PointToScreen(p); 98public Point AdornerWindowToScreen() => AdornerWindowPointToScreen(new Point(0, 0)); 103public Point ControlToAdornerWindow(Control c) 107return Point.Empty; 110Point pt = new(c.Left, c.Top);
System\Windows\Forms\Design\ToolStripDesigner.cs (5)
23internal static Point s_lastCursorPosition = Point.Empty; // remembers last cursorPosition; 1375Point loc = BehaviorService.ControlToAdornerWindow((Control)Component); 1395protected override bool GetHitTest(Point point) 1848Point offset = new(de.X, de.Y);
System\Windows\Forms\Design\ToolStripDropDownDesigner.cs (1)
696Point loc = behaviorService.ControlToAdornerWindow(_designMenu);
System\Windows\Forms\Design\ToolStripItemBehavior.cs (9)
61if (ToolStripDesigner.s_lastCursorPosition != Point.Empty && ToolStripDesigner.s_lastCursorPosition == Cursor.Position) 207public override bool OnMouseDoubleClick(Glyph g, MouseButtons button, Point mouseLoc) 227SetParentDesignerValuesForDragDrop(glyphItem, false, Point.Empty); 277public override bool OnMouseDown(Glyph g, MouseButtons button, Point mouseLoc) 524public override bool OnMouseMove(Glyph g, MouseButtons button, Point mouseLoc) 624SetParentDesignerValuesForDragDrop(glyphItem, false, Point.Empty); 891if (ToolStripDesigner.s_lastCursorPosition != Point.Empty && ToolStripDesigner.s_lastCursorPosition == Cursor.Position) 945SetParentDesignerValuesForDragDrop(item, false, Point.Empty); 954private void SetParentDesignerValuesForDragDrop(ToolStripItem glyphItem, bool setValues, Point mouseLoc)
System\Windows\Forms\Design\ToolStripItemDesigner.cs (5)
516Point loc = b.ControlToAdornerWindow((Control)ImmediateParent); 922Point location = behaviorService.ControlToAdornerWindow((Control)ImmediateParent); 1223Point location = behaviorService.ControlToAdornerWindow(parent); 1314Point newPoint = Point.Empty;
System\Windows\Forms\Design\ToolStripItemGlyph.cs (1)
29public override Cursor? GetHitTest(Point p)
System\Windows\Forms\Design\ToolStripKeyboardHandlingService.cs (1)
491Point p = Cursor.Position;
System\Windows\Forms\Design\ToolStripMenuItemDesigner.cs (2)
1385private static int GetItemInsertionIndex(ToolStripDropDown wb, Point ownerClientAreaRelativeDropPoint) 2608public override Cursor GetHitTest(Point p)
System\Windows\Forms\Design\ToolStripPanelDesigner.cs (1)
276_behavior?.OnMouseDown(_containerSelectorGlyph, MouseButtons.Left, Point.Empty);
System\Windows\Forms\Design\ToolStripTemplateNode.cs (7)
450Point loc = BehaviorService.ControlToAdornerWindow(_miniToolStrip); 1120Point loc = BehaviorService.ControlToAdornerWindow(_miniToolStrip); 1245internal void ShowContextMenu(Point pt) 1266Point loc = BehaviorService.ControlToAdornerWindow(_miniToolStrip); 1832Rectangle bounds = new(Point.Empty, e.ToolStrip.Size); 1847Rectangle bounds = new(Point.Empty, item.Size); 1943Rectangle bounds = new(Point.Empty, splitButton.Size);
System\Windows\Forms\Design\TreeNodeCollectionEditor.cs (2)
528Point position = new Point(0, 0) 571Point position = new Point(0, 0)
System\Windows\Forms\Design\TreeViewDesigner.cs (1)
50protected override bool GetHitTest(Point point)
System.Windows.Forms.Design.Tests (21)
System\ComponentModel\Design\ByteViewerTests.cs (3)
8using Point = System.Drawing.Point; 28Assert.Equal(Point.Empty, control.AutoScrollPosition); 98Assert.Equal(Point.Empty, control.Location);
System\Windows\Forms\Design\DesignerUtilsTests.cs (1)
167Point cursorPoint = DesignerUtils.LastCursorPoint;
System\Windows\Forms\Design\FlowLayoutPanelDesignerTests.cs (2)
158Point lastMouseLocation = _designer.TestAccessor().Dynamic._lastMouseLocation; 159lastMouseLocation.Should().Be(Point.Empty);
System\Windows\Forms\Design\ListViewDesignerTests.cs (2)
63Point point = new(10, 5); 75Point outsidePoint = new(-10, -10);
System\Windows\Forms\Design\StatusCommandUITests.cs (5)
82Point location = new(50, 60); 90Point location = new(50, 60); 98Point location = new(50, 60); 107Point location = Point.Empty;
System\Windows\Forms\Design\ToolStripAdornerWindowServiceTests.cs (7)
97Point point = new(10, 20); 98Point screenPoint = _service.AdornerWindowPointToScreen(point); 99Point expectedScreenPoint = new(18, 51); 107Point screenPoint = _service.AdornerWindowToScreen(); 108Point expectedScreenPoint = new(8, 31); 118Point adornerWindowPoint = _service.ControlToAdornerWindow(control); 119Point expectedPoint = new(40, 60);
TestControlDesigner.cs (1)
76internal bool GetHitTestMethod(Point point)
System.Windows.Forms.Primitives (32)
Interop\Mshtml\Interop.IDocHostUIHandler.cs (1)
22Point* pt,
System\Windows\Forms\Automation\UiaTextProvider.cs (4)
61public abstract Point GetPositionFromChar(int charIndex); 63public abstract Point GetPositionFromCharForUpperRightCorner(int startCharIndex, string text); 69public abstract Point PointToScreen(Point pt);
System\Windows\Forms\Automation\UiaTextRange.cs (9)
362PInvoke.GetCaretPos(out Point endlinePoint); 382Point mapClientToScreen = new((int)ownerBounds[0], (int)ownerBounds[1]); 396Point startPoint = _provider.GetPositionFromChar(Start); 397Point endPoint = _provider.GetPositionFromCharForUpperRightCorner(End - 1, text); 755Point lineStartPoint = _provider.GetPositionFromChar(lineStartIndex); 768Point lineEndPoint = _provider.GetPositionFromCharForUpperRightCorner(lineEndIndex, text); 837Point pt = _provider.GetPositionFromChar(i); 860void AddLineRectangle(Point startPoint, Point endPoint)
System\Windows\Forms\DeviceContextExtensions.cs (5)
53internal static void DrawLine(this DeviceContextHdcScope hdc, HPEN hpen, Point p1, Point p2) => 56internal static void DrawLine(this HDC hdc, HPEN hpen, Point p1, Point p2) => 88Point oldPoint = default;
Windows\Win32\Foundation\Interop.PARAM.cs (4)
63/// Packs a <see cref="Point"/> into a PARAM. 65public static nint FromPoint(Point point) 69/// Unpacks a <see cref="Point"/> from a PARAM. 71public static Point ToPoint(nint param)
Windows\Win32\PInvoke.ChildWindowFromPointEx.cs (2)
10/// <inheritdoc cref="ChildWindowFromPointEx(HWND, Point, CWP_FLAGS)"/> 11public static HWND ChildWindowFromPointEx<T>(T hwndParent, Point pt, CWP_FLAGS uFlags)
Windows\Win32\PInvoke.ClientToScreen.cs (2)
10/// <inheritdoc cref="ClientToScreen(HWND, ref Point)"/> 11public static BOOL ClientToScreen<T>(T hWnd, ref Point lpPoint)
Windows\Win32\PInvoke.ScreenToClient.cs (2)
10/// <inheritdoc cref="ScreenToClient(HWND, ref Point)"/> 11public static BOOL ScreenToClient<T>(T hWnd, ref Point lpPoint)
Windows\Win32\UI\Accessibility\UiaPoint.cs (2)
10public static implicit operator Point(UiaPoint value) => new((int)value.x, (int)value.y); 12public static implicit operator UiaPoint(Point value) => new() { x = value.X, y = value.Y };
Windows\Win32\UI\Controls\Dialogs\PAGESETUPDLGW.cs (1)
106public Point ptPaperSize;
System.Windows.Forms.Primitives.Tests (18)
System\SpanReaderTests.cs (3)
102reader.TryRead(out Point value).Should().BeTrue(); 109value.Should().Be(default(Point)); 119reader.TryRead(2, out ReadOnlySpan<Point> value).Should().BeTrue();
System\SpanWriterTests.cs (3)
73Span<Point> span = new Point[5]; 74SpanWriter<Point> writer = new(span);
System\Windows\Forms\Automation\UiaTextRangeTests.cs (2)
617providerMock.Setup(p => p.PointToScreen(It.IsAny<Point>())).Returns(Point.Empty);
System\Windows\Forms\DeviceContextHdcScopeTests.cs (10)
29Point origin = default; 44Point origin = default; 59Point origin = default; 74Point origin = default; 96Point originalOrigin = default; 112Point origin = default; 131Point currentOrigin = default; 139Point origin = default; 162Point origin = default; 185Point origin = default;
System.Windows.Forms.Primitives.TestUtilities (32)
DeviceContextState.cs (7)
39Point point = default; 60public Point BrushOrigin { get => _currentState.BrushOrigin; set => _currentState.BrushOrigin = value; } 66public Point LastBeginPathBrushOrigin { get => _currentState.LastBeginPathBrushOrigin; set => _currentState.LastBeginPathBrushOrigin = value; } 77public Point BrushOrigin { get; set; } 83public Point LastBeginPathBrushOrigin { get; set; } 202public Point TransformPoint(Point point) => Transform.TransformPoint(point);
Extensions\GdiExtensions.cs (2)
14public static Point TransformPoint(in this Matrix3x2 transform, Point point)
Metafiles\DataHelpers.cs (6)
12public static unsafe Point[] PointArray(params int[] values) 19Point[] points = new Point[values.Length / 2]; 21fixed (Point* p = points) 29public static unsafe Point[] PointArray(Matrix3x2 transform, params int[] values) 31Point[] points = PointArray(values);
Metafiles\RecordTypes\EMRPOINTRECORD.cs (1)
28public Point point;
Metafiles\RecordTypes\EMRPOLY16.cs (1)
46Point[] transformedPoints = points.Transform(point => state.TransformPoint(point));
Metafiles\RecordTypes\EMRTEXT.cs (2)
14public Point ptlReference; 24fixed (Point* p = &ptlReference)
Metafiles\Validators\LineToValidator.cs (4)
12private readonly Point? _from; 13private readonly Point? _to; 19Point? from, 20Point? to,
Metafiles\Validators\Poly16Validator.cs (3)
13private readonly Point[]? _points; 20Point[]? points, 37Assert.Equal(_points, poly->points.Transform<POINTS, Point>(p => p));
Metafiles\Validators\Polygon16Validator.cs (1)
15Point[]? points,
Metafiles\Validators\Polyline16Validator.cs (1)
15Point[]? points,
Metafiles\Validators\Validate.cs (4)
17Point[]? points = default, 28Point[]? points = default, 71Point? from, 72Point? to,
System.Windows.Forms.Tests (461)
MaskedTextBoxTests.cs (2)
733Point position = _maskedTextBox.GetPositionFromCharIndex(4); 734position.Should().NotBe(Point.Empty);
System\Windows\Forms\AccessibleObjects\AccessibleObjectTests.cs (3)
2611Point ptScreen, 2628Point point = button.Location; 2659Point point = comboBox.Location;
System\Windows\Forms\AccessibleObjects\ComboBox.ComboBoxItemAccessibleObjectTests.cs (2)
375Point point = new(x, y + initialYPosition); 384public void ComboBoxItemAccessibleObject_Bounds_ReturnsCorrect_IfComboBoxIsScrollable(ComboBoxStyle comboBoxStyle, int itemIndex, Point expectedPosition)
System\Windows\Forms\AccessibleObjects\Form.FormAccessibleObjectTests.cs (1)
204Assert.Equal(createControl, actual.Location != Point.Empty);
System\Windows\Forms\AccessibleObjects\ListBoxAccessibleObjectTests.cs (1)
346Point testPoint = new Point(10, 10);
System\Windows\Forms\AccessibleObjects\ListVIew.ListViewAccessibleObjectTests.cs (4)
1160Point GetItemLocation(int itemIndex) => 1179Point point = new(15, 55); 1208Point GetSubItemLocation(int itemIndex, int subItemIndex) => 1380private AccessibleObject HitTest(ListView listView, Point point) =>
System\Windows\Forms\AccessibleObjects\TabControl.TabControlAccessibleObjectTests.cs (3)
296Point point = expectedAccessibleObject.Bounds.Location; 314Point point = expectedAccessibleObject.Bounds.Location; 332Point point = expectedAccessibleObject.Bounds.Location;
System\Windows\Forms\AccessibleObjects\TrackBar.TrackBarAccessibleObjectTests.cs (3)
526Point pointInThumb = new Point(accessibleObject.ThumbAccessibleObject.Bounds.X + 1, accessibleObject.ThumbAccessibleObject.Bounds.Y + 1); 531Point pointInFirstButton = new Point(accessibleObject.FirstButtonAccessibleObject.Bounds.X + 1, accessibleObject.FirstButtonAccessibleObject.Bounds.Y + 1); 537Point pointInLastButton = new Point(accessibleObject.LastButtonAccessibleObject.Bounds.X + 1, accessibleObject.LastButtonAccessibleObject.Bounds.Y + 1);
System\Windows\Forms\AccessibleObjects\TreeView.TreeViewAccessibleObjectTests.cs (3)
236Point point = accessibleObject.Bounds.Location; 251Point point = new(accessibleObject.Bounds.X, accessibleObject.Bounds.Bottom - 1); 265Point point = node.AccessibilityObject.Bounds.Location;
System\Windows\Forms\AxHostTests.cs (3)
16using Point = System.Drawing.Point; 90Assert.Equal(Point.Empty, control.Location); 184Assert.Equal(Point.Empty, control.Location);
System\Windows\Forms\ButtonBaseTests.cs (2)
12using Point = System.Drawing.Point; 88Assert.Equal(Point.Empty, control.Location);
System\Windows\Forms\ButtonTests.cs (2)
13using Point = System.Drawing.Point; 91Assert.Equal(Point.Empty, control.Location);
System\Windows\Forms\CheckBoxRendererTests.cs (4)
30Point point = new(control.Location.X, control.Location.Y); 66Point point = new(control.Location.X, control.Location.Y); 103Point point = new(control.Location.X, control.Location.Y); 137Point point = new(control.Location.X, control.Location.Y);
System\Windows\Forms\CheckBoxTests.cs (2)
11using Point = System.Drawing.Point; 92Assert.Equal(Point.Empty, control.Location);
System\Windows\Forms\ClipboardTests.cs (2)
824List<Point> generic1 = []; 832Clipboard.TryGetData(format, out List<Point>? points).Should().BeTrue();
System\Windows\Forms\ComboBox.ComboBoxUiaTextProviderTests.cs (12)
434public void ComboBoxUiaTextProvider_GetPositionFromChar_ReturnsCorrectValue(ComboBoxStyle dropdownStyle, Size size, string text, int charIndex, Point expectedPoint) 442Point actualPoint = provider.GetPositionFromChar(charIndex); 470Point actualPoint = provider.GetPositionFromChar(charIndex); 472Assert.Equal(Point.Empty, actualPoint); 500public void ComboBoxUiaTextProvider_GetPositionFromCharForUpperRightCorner_ReturnsCorrectValue(ComboBoxStyle dropDownStyle, Size size, string text, int charIndex, Point expectedPoint) 508Point actualPoint = provider.GetPositionFromCharForUpperRightCorner(charIndex, comboBox.Text); 547Point actualPoint = provider.GetPositionFromCharForUpperRightCorner(charIndex, comboBox.Text); 549Assert.Equal(Point.Empty, actualPoint); 904yield return new object[] { ComboBoxStyle.DropDown, Point.Empty }; 906yield return new object[] { ComboBoxStyle.Simple, Point.Empty }; 912public void ComboBoxUiaTextProvider_RangeFromPoint_DoesNotThrowAnException(ComboBoxStyle dropDownStyle, Point point) 928public void ComboBoxUiaTextProvider_RangeFromPoint_ReturnsNull_WithoutHandle(ComboBoxStyle dropDownStyle, Point point)
System\Windows\Forms\ComboBoxTests.cs (3)
13using Point = System.Drawing.Point; 100Assert.Equal(Point.Empty, control.Location); 2778public void OnMouseDown(Point p) => base.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, p.X, p.Y, 0));
System\Windows\Forms\ContainerControlTests.cs (3)
10using Point = System.Drawing.Point; 34Assert.Equal(Point.Empty, control.AutoScrollPosition); 96Assert.Equal(Point.Empty, control.Location);
System\Windows\Forms\ControlPaintTests.cs (4)
1709yield return new object[] { Point.Empty, Point.Empty, Color.Red }; 1725public void ControlPaint_DrawReversibleLine_Invoke_Success(Point start, Point end, Color backColor)
System\Windows\Forms\ControlTests.cs (4)
8using Point = System.Drawing.Point; 74Assert.Equal(Point.Empty, control.Location); 163Assert.Equal(Point.Empty, control.Location); 355Assert.Equal(Point.Empty, control.Location);
System\Windows\Forms\ControlTests.Methods.cs (20)
9785Assert.Equal(new Rectangle(Point.Empty, value), control.ClientRectangle); 9786Assert.Equal(new Rectangle(Point.Empty, value), control.DisplayRectangle); 9788Assert.Equal(new Rectangle(Point.Empty, value), control.Bounds); 9795Assert.Equal(new Rectangle(Point.Empty, value), control.ClientRectangle); 9796Assert.Equal(new Rectangle(Point.Empty, value), control.DisplayRectangle); 9798Assert.Equal(new Rectangle(Point.Empty, value), control.Bounds); 9819Assert.Equal(new Rectangle(Point.Empty, value), control.ClientRectangle); 9820Assert.Equal(new Rectangle(Point.Empty, value), control.DisplayRectangle); 9828Assert.Equal(new Rectangle(Point.Empty, expectedSize), control.Bounds); 9835Assert.Equal(new Rectangle(Point.Empty, value), control.ClientRectangle); 9836Assert.Equal(new Rectangle(Point.Empty, value), control.DisplayRectangle); 9844Assert.Equal(new Rectangle(Point.Empty, expectedSize), control.Bounds); 9867Assert.Equal(new Rectangle(Point.Empty, value), control.ClientRectangle); 9868Assert.Equal(new Rectangle(Point.Empty, value), control.DisplayRectangle); 9876Assert.Equal(new Rectangle(Point.Empty, expectedSize), control.Bounds); 9886Assert.Equal(new Rectangle(Point.Empty, value), control.ClientRectangle); 9887Assert.Equal(new Rectangle(Point.Empty, value), control.DisplayRectangle); 9895Assert.Equal(new Rectangle(Point.Empty, expectedSize), control.Bounds); 12515Point p = control.PointToScreen(new Point(5, 5)); 12589Point p = control.PointToScreen(new Point(5, 5));
System\Windows\Forms\ControlTests.Properties.cs (25)
904public void Control_AutoScrollOffset_Set_GetReturnsExpected(Point value) 3340Assert.Equal(new Rectangle(Point.Empty, value), control.ClientRectangle); 3341Assert.Equal(new Rectangle(Point.Empty, value), control.DisplayRectangle); 3343Assert.Equal(new Rectangle(Point.Empty, value), control.Bounds); 3350Assert.Equal(new Rectangle(Point.Empty, value), control.ClientRectangle); 3351Assert.Equal(new Rectangle(Point.Empty, value), control.DisplayRectangle); 3353Assert.Equal(new Rectangle(Point.Empty, value), control.Bounds); 3384Assert.Equal(new Rectangle(Point.Empty, value), control.ClientRectangle); 3385Assert.Equal(new Rectangle(Point.Empty, value), control.DisplayRectangle); 3393Assert.Equal(new Rectangle(Point.Empty, expectedSize), control.Bounds); 3400Assert.Equal(new Rectangle(Point.Empty, value), control.ClientRectangle); 3401Assert.Equal(new Rectangle(Point.Empty, value), control.DisplayRectangle); 3409Assert.Equal(new Rectangle(Point.Empty, expectedSize), control.Bounds); 3447Assert.Equal(new Rectangle(Point.Empty, value), control.ClientRectangle); 3448Assert.Equal(new Rectangle(Point.Empty, value), control.DisplayRectangle); 3456Assert.Equal(new Rectangle(Point.Empty, expectedSize), control.Bounds); 3466Assert.Equal(new Rectangle(Point.Empty, value), control.ClientRectangle); 3467Assert.Equal(new Rectangle(Point.Empty, value), control.DisplayRectangle); 3475Assert.Equal(new Rectangle(Point.Empty, expectedSize), control.Bounds); 7145public void Control_Location_Set_GetReturnsExpected(Point value, int expectedLocationChangedCallCount) 7219public void Control_Location_SetWithParent_GetReturnsExpected(Point value, int expectedLocationChangedCallCount) 7328public void Control_Location_SetWithHandle_GetReturnsExpected(bool resizeRedraw, Point value, int expectedLocationChangedCallCount) 7417public void Control_Location_SetWithParentWithHandle_GetReturnsExpected(bool resizeRedraw, Point value, int expectedLocationChangedCallCount) 7591Assert.Equal(Point.Empty, control.Location); 7615Assert.Equal(Point.Empty, control.Location);
System\Windows\Forms\CursorsTests.cs (1)
55Point hotSpot = cursor.HotSpot;
System\Windows\Forms\CursorTests.cs (10)
60yield return new object[] { Path.Join("bitmaps", "cursor.cur"), Point.Empty }; 66public void Cursor_Ctor_Stream(string fileName, Point expectedHotSpot) 118public void Cursor_Ctor_String(string fileName, Point expectedHotSpot) 233Point hotSpot = cursor.HotSpot; 265Point position = Cursor.Position; 277Point position = Cursor.Position; 400Assert.Throws<ArgumentNullException>("graphics", () => cursor.Draw(null, new Rectangle(Point.Empty, cursor.Size))); 410Assert.Throws<ArgumentException>(() => cursor.Draw(graphics, new Rectangle(Point.Empty, cursor.Size))); 437Assert.Throws<ArgumentNullException>("graphics", () => cursor.DrawStretched(null, new Rectangle(Point.Empty, cursor.Size))); 447Assert.Throws<ArgumentException>(() => cursor.DrawStretched(graphics, new Rectangle(Point.Empty, cursor.Size)));
System\Windows\Forms\DataGridViewTextBoxEditingControlTests.cs (2)
9using Point = System.Drawing.Point; 90Assert.Equal(Point.Empty, control.Location);
System\Windows\Forms\DataObjectTests.cs (5)
20using Point = System.Drawing.Point; 2608pDropFiles->pt.Should().Be(Point.Empty); 2649pDropFiles->pt.Should().Be(Point.Empty); 2824Point point = new() { X = 1, Y = 1 }; 2834typedOutData.TryGetData("point", out Point deserialized).Should().BeTrue();
System\Windows\Forms\DateTimePickerTests.cs (2)
9using Point = System.Drawing.Point; 91Assert.Equal(Point.Empty, control.Location);
System\Windows\Forms\Design\ComponentEditorFormTests.cs (3)
8using Point = System.Drawing.Point; 41Assert.Equal(Point.Empty, control.AutoScrollPosition); 116Assert.Equal(Point.Empty, control.Location);
System\Windows\Forms\Design\ComponentEditorPageTests.cs (3)
9using Point = System.Drawing.Point; 29Assert.Equal(Point.Empty, control.AutoScrollPosition); 97Assert.Equal(Point.Empty, control.Location);
System\Windows\Forms\DomainUpDownTests.cs (2)
43_sub.AutoScrollPosition.Should().Be(Point.Empty); 119_sub.Location.Should().Be(Point.Empty);
System\Windows\Forms\DragDropHelperTests.cs (3)
112public unsafe void SetDragImage_DataObject_Bitmap_Point_bool_ReturnsExpected(DataObject dataObject, Bitmap dragImage, Point cursorOffset, bool useDefaultDragImage) 125Point offset = pDragImage->ptOffset; 152Point offset = pDragImage->ptOffset;
System\Windows\Forms\FlowLayoutPanelTests.cs (3)
8using Point = System.Drawing.Point; 28Assert.Equal(Point.Empty, control.AutoScrollPosition); 90Assert.Equal(Point.Empty, control.Location);
System\Windows\Forms\FormTests.cs (2)
39Assert.Equal(Point.Empty, control.AutoScrollPosition); 118Assert.Equal(Point.Empty, control.Location);
System\Windows\Forms\GiveFeedbackEventArgsTests.cs (1)
25public void CursorOffset_Set_GetReturnsExpected(Point value)
System\Windows\Forms\GroupBoxTests.cs (2)
10using Point = System.Drawing.Point; 78Assert.Equal(Point.Empty, control.Location);
System\Windows\Forms\Help\HelpTests.cs (1)
15Help.ShowPopup(null, "Popup", Point.Empty);
System\Windows\Forms\HelpEventArgsTests.cs (2)
15yield return new object[] { Point.Empty }; 22public void Ctor_Point(Point mousePos)
System\Windows\Forms\HScrollBarTests.cs (2)
8using Point = System.Drawing.Point; 86Assert.Equal(Point.Empty, control.Location);
System\Windows\Forms\HtmlDocumentTests.cs (1)
1753Assert.Equal("BODY", document.GetElementFromPoint(Point.Empty).TagName);
System\Windows\Forms\ImageListTests.cs (8)
919yield return new object[] { Point.Empty }; 926public void ImageList_Draw_InvokeGraphicsPointIntWithoutHandle_Success(Point pt) 940public void ImageList_Draw_InvokeGraphicsPointIntWithHandle_Success(Point pt) 955public void ImageList_Draw_InvokeGraphicsIntIntIntWithoutHandle_Success(Point pt) 969public void ImageList_Draw_InvokeGraphicsIntIntIntWithHandle_Success(Point pt) 1026Assert.Throws<NullReferenceException>(() => list.Draw(null, Point.Empty, 0)); 1041Assert.Throws<ArgumentOutOfRangeException>("index", () => list.Draw(graphics, Point.Empty, index)); 1057Assert.Throws<ArgumentOutOfRangeException>("index", () => list.Draw(graphics, Point.Empty, index));
System\Windows\Forms\LabelTests.cs (2)
9using Point = System.Drawing.Point; 83Assert.Equal(Point.Empty, control.Location);
System\Windows\Forms\ListBoxTests.cs (1)
94Assert.Equal(Point.Empty, control.Location);
System\Windows\Forms\ListControlTests.cs (2)
11using Point = System.Drawing.Point; 84Assert.Equal(Point.Empty, control.Location);
System\Windows\Forms\ListViewInsertionMarkTests.cs (3)
8using Point = System.Drawing.Point; 615Point* pPt = (Point*)m.WParam;
System\Windows\Forms\ListViewItem.IKeyboardToolTipTests.cs (2)
699Point initialPosition = Cursor.Position; 712Point position = listView.AccessibilityObject.Bounds.Location;
System\Windows\Forms\ListViewTests.cs (3)
13using Point = System.Drawing.Point; 110Assert.Equal(Point.Empty, control.Location); 5449Point subItemLocation = listView.Items[0].SubItems[subItemIndex].Bounds.Location + new Size(1, 1);
System\Windows\Forms\MdiClientTests.cs (4)
10using Point = System.Drawing.Point; 62Assert.Equal(Point.Empty, control.Location); 454Assert.Equal(Point.Empty, control.Location); 478Assert.Equal(Point.Empty, control.Location);
System\Windows\Forms\MdiControlStripTests.cs (3)
9using Point = System.Drawing.Point; 32Assert.Equal(Point.Empty, mdiControlStrip.AutoScrollPosition); 110Assert.Equal(Point.Empty, mdiControlStrip.Location);
System\Windows\Forms\MenuStripTests.cs (3)
8using Point = System.Drawing.Point; 30Assert.Equal(Point.Empty, control.AutoScrollPosition); 108Assert.Equal(Point.Empty, control.Location);
System\Windows\Forms\MonthCalendar.HitTestInfoTests.cs (3)
7using Point = System.Drawing.Point; 19Point point = new(5, 5); 46Point point = new(5, 5);
System\Windows\Forms\MonthCalendarTests.cs (14)
11using Point = System.Drawing.Point; 95Assert.Equal(Point.Empty, control.Location); 2529Assert.Equal(new Rectangle(Point.Empty, size), control.ClientRectangle); 2530Assert.Equal(new Rectangle(Point.Empty, size), control.DisplayRectangle); 2532Assert.Equal(new Rectangle(Point.Empty, size), control.Bounds); 2538Assert.Equal(new Rectangle(Point.Empty, size), control.ClientRectangle); 2539Assert.Equal(new Rectangle(Point.Empty, size), control.DisplayRectangle); 2541Assert.Equal(new Rectangle(Point.Empty, size), control.Bounds); 2562Assert.Equal(new Rectangle(Point.Empty, size), control.ClientRectangle); 2563Assert.Equal(new Rectangle(Point.Empty, size), control.DisplayRectangle); 2565Assert.Equal(new Rectangle(Point.Empty, size), control.Bounds); 2574Assert.Equal(new Rectangle(Point.Empty, size), control.ClientRectangle); 2575Assert.Equal(new Rectangle(Point.Empty, size), control.DisplayRectangle); 2577Assert.Equal(new Rectangle(Point.Empty, size), control.Bounds);
System\Windows\Forms\NativeToWinFormsAdapterTests.cs (4)
472public SimpleTestData(string text, Point point) 478public Point Point { get; set; } 516public TestData(Point point) 522public Point Location;
System\Windows\Forms\PanelTests.cs (2)
29Assert.Equal(Point.Empty, control.AutoScrollPosition); 90Assert.Equal(Point.Empty, control.Location);
System\Windows\Forms\PictureBoxTests.cs (2)
10using Point = System.Drawing.Point; 85Assert.Equal(Point.Empty, control.Location);
System\Windows\Forms\ProgressBarTests.cs (2)
10using Point = System.Drawing.Point; 75Assert.Equal(Point.Empty, control.Location);
System\Windows\Forms\PropertyGridInternal\AccessibleObjects\PropertyGridView.GridViewTextBox.GridViewTextBoxAccessibleObjectTests.cs (1)
52SelectedObject = Point.Empty
System\Windows\Forms\PropertyGridInternal\PropertyGridViewTests.Rendering.cs (3)
17Point pt = default; 53Validate.TextOut(nameof(Point.X), new(25, 23, 6, 14), stateValidators: State.FontFace(Control.DefaultFont.Name))), 62Validate.TextOut(nameof(Point.Y), new(25, 42, 6, 14), stateValidators: State.FontFace(Control.DefaultFont.Name))),
System\Windows\Forms\PropertyGridTests.cs (4)
14using Point = System.Drawing.Point; 39Assert.Equal(Point.Empty, control.AutoScrollPosition); 73Assert.NotEqual(Point.Empty, control.ContextMenuDefaultLocation); 125Assert.Equal(Point.Empty, control.Location);
System\Windows\Forms\RadioButtonRendererTests.cs (7)
28Point point = new(control.Location.X, control.Location.Y); 59Point point = new(control.Location.X, control.Location.Y); 96Point point = new(control.Location.X, control.Location.Y); 123Point point = new(control.Location.X, control.Location.Y); 226Point glyphLocation = new(2, 2); 254Point glyphLocation = new(0, 0); 303Point glyphLocation = new(1, 1);
System\Windows\Forms\RadioButtonTests.cs (2)
11using Point = System.Drawing.Point; 91Assert.Equal(Point.Empty, control.Location);
System\Windows\Forms\RichTextBoxTests.cs (3)
17using Point = System.Drawing.Point; 97Assert.Equal(Point.Empty, control.Location); 10648Point pt = new(x, y);
System\Windows\Forms\ScreenTests.cs (3)
117public void Screen_FromPoint_Invoke_ReturnsExpected(Point point) 151public void Screen_GetBounds_InvokePoint_ReturnsExpected(Point point) 181public void Screen_GetWorkingArea_InvokePoint_ReturnsExpected(Point point)
System\Windows\Forms\ScrollableControlTests.cs (19)
10using Point = System.Drawing.Point; 30Assert.Equal(Point.Empty, control.AutoScrollPosition); 89Assert.Equal(Point.Empty, control.Location); 475public void ScrollableControl_AutoScrollPosition_Set_GetReturnsExpected(Point value) 481Assert.Equal(Point.Empty, control.AutoScrollPosition); 486Assert.Equal(Point.Empty, control.AutoScrollPosition); 492public void ScrollableControl_AutoScrollPosition_SetWithHandle_GetReturnsExpected(Point value) 504Assert.Equal(Point.Empty, control.AutoScrollPosition); 512Assert.Equal(Point.Empty, control.AutoScrollPosition); 521public void ScrollableControl_AutoScrollPosition_SetWithAutoScroll_GetReturnsExpected(Point value) 528Assert.Equal(Point.Empty, control.AutoScrollPosition); 533Assert.Equal(Point.Empty, control.AutoScrollPosition); 539public void ScrollableControl_AutoScrollPosition_SetWithVisibleBars_GetReturnsExpected(Point value) 546Assert.Equal(Point.Empty, control.AutoScrollPosition); 551Assert.Equal(Point.Empty, control.AutoScrollPosition); 2327public void ScrollableControl_SetDisplayRectLocation_Invoke_Success(bool autoScroll, int width, int height, int scrollX, int scrollY, Point expectedDisplayRectangleLocation, Size expectedDisplayRectangleSize) 2338Assert.Equal(Point.Empty, control.AutoScrollPosition); 2388public void ScrollableControl_SetDisplayRectLocation_InvokeWithHandle_Success(bool autoScroll, int width, int height, int scrollX, int scrollY, Point expectedDisplayRectangleLocation, Size expectedDisplayRectangleSize, int expectedInvalidatedCallCount) 2406Assert.Equal(Point.Empty, control.AutoScrollPosition);
System\Windows\Forms\ScrollBarTests.cs (2)
9using Point = System.Drawing.Point; 76Assert.Equal(Point.Empty, control.Location);
System\Windows\Forms\SearchForVirtualItemEventArgsTests.cs (2)
15yield return new object[] { true, false, true, null, Point.Empty, SearchDirectionHint.Down + 1, -2 }; 23public void Ctor_Bool_Bool_Bool_String_Point_SearchDirectionHint_Int(bool isTextSearch, bool isPrefixSearch, bool includeSubItemsInSearch, string text, Point startingPoint, SearchDirectionHint direction, int startIndex)
System\Windows\Forms\SplitterPanelTests.cs (4)
8using Point = System.Drawing.Point; 35Assert.Equal(Point.Empty, control.AutoScrollPosition); 80Assert.Equal(Point.Empty, control.Location); 513public void SplitterPanel_Location_Set_GetReturnsExpected(Point value, int expectedLocationChangedCallCount)
System\Windows\Forms\SplitterTests.cs (2)
9using Point = System.Drawing.Point; 76Assert.Equal(Point.Empty, control.Location);
System\Windows\Forms\StatusStripTests.cs (3)
8using Point = System.Drawing.Point; 30Assert.Equal(Point.Empty, control.AutoScrollPosition); 108Assert.Equal(Point.Empty, control.Location);
System\Windows\Forms\TabControlTests.cs (4)
10using Point = System.Drawing.Point; 81Assert.Equal(Point.Empty, control.Location); 1721public void TabControl_Padding_Set_GetReturnsExpected(Point value) 1738public void TabControl_Padding_SetWithHandle_GetReturnsExpected(Point value)
System\Windows\Forms\TableLayoutPanelTests.cs (3)
10using Point = System.Drawing.Point; 30Assert.Equal(Point.Empty, control.AutoScrollPosition); 98Assert.Equal(Point.Empty, control.Location);
System\Windows\Forms\TabPageTests.cs (13)
13using Point = System.Drawing.Point; 33Assert.Equal(Point.Empty, control.AutoScrollPosition); 95Assert.Equal(Point.Empty, control.Location); 142Assert.Equal(Point.Empty, control.AutoScrollPosition); 204Assert.Equal(Point.Empty, control.Location); 1871public void TabPage_Location_Set_GetReturnsExpected(Point value, int expectedLocationChangedCallCount) 1945public void TabPage_Location_SetWithParent_GetReturnsExpected(Point value, int expectedLocationChangedCallCount) 2054public void TabPage_Location_SetWithHandle_GetReturnsExpected(bool resizeRedraw, Point value, int expectedLocationChangedCallCount) 2154public void TabPage_Location_SetWithParentWithHandle_GetReturnsExpected(bool resizeRedraw, Point value) 2386control.Location = Point.Empty; 2387Assert.Equal(Point.Empty, control.Location); 2414control.Location = Point.Empty; 2415Assert.Equal(Point.Empty, control.Location);
System\Windows\Forms\TextBoxBase.TextBoxBaseUiaTextProviderTests.cs (13)
400public void TextBoxBaseUiaTextProvider_GetPositionFromChar_ReturnsCorrectValue(Size size, string text, bool multiline, int charIndex, Point expectedPoint) 406Point actualPoint = provider.GetPositionFromChar(charIndex); 416public void TextBoxBaseUiaTextProvider_GetPositionFromChar_ReturnsEmpty_WithoutHandle(Size size, string text, bool multiline, int charIndex, Point expectedPoint) 420Point actualPoint = provider.GetPositionFromChar(charIndex); 421Assert.Equal(Point.Empty, actualPoint); 446public void TextBoxBaseUiaTextProvider_GetPositionFromCharForUpperRightCorner_ReturnsCorrectValue(Size size, string text, bool multiline, int charIndex, Point expectedPoint) 451Point actualPoint = provider.GetPositionFromCharForUpperRightCorner(charIndex, textBoxBase.Text); 460public void TextBoxBaseUiaTextProvider_GetPositionFromCharForUpperRightCorner_ReturnsMinusOne_WithoutHandle(Size size, string text, bool multiline, int charIndex, Point expectedPoint) 464Point actualPoint = provider.GetPositionFromCharForUpperRightCorner(charIndex, textBoxBase.Text); 465Assert.Equal(Point.Empty, actualPoint); 783yield return new object[] { Point.Empty }; 789public void TextBoxBaseUiaTextProvider_RangeFromPoint_DoesntThrowAnException(Point point) 804public void TextBoxBaseUiaTextProvider_RangeFromPoint_ReturnsNull_WithoutHandle(Point point)
System\Windows\Forms\TextRendererTests.cs (43)
23yield return new object[] { hint, text, null, Point.Empty, Color.Red }; 35public void TextRenderer_DrawText_InvokeIDeviceContextStringFontPointColor_Success(TextRenderingHint textRenderingHint, string text, Font font, Point pt, Color foreColor) 52yield return new object[] { hint, text, null, Point.Empty, Color.Red, Color.Blue }; 58yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty, Color.Red, Color.Red }; 59yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty, Color.Red, Color.Black }; 60yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty, Color.Red, Color.White }; 61yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty, Color.Red, Color.Transparent }; 62yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty, Color.Red, Color.Empty }; 69public void TextRenderer_DrawText_InvokeIDeviceContextStringFontPointColorColor_Success(TextRenderingHint textRenderingHint, string text, Font font, Point pt, Color foreColor, Color backColor) 86yield return new object[] { hint, text, null, Point.Empty, Color.Red, TextFormatFlags.Default, }; 93yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty, Color.Red, TextFormatFlags.HorizontalCenter }; 94yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty, Color.Red, TextFormatFlags.VerticalCenter | TextFormatFlags.HorizontalCenter }; 95yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty, Color.Red, TextFormatFlags.Bottom | TextFormatFlags.Right }; 96yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty, Color.Red, TextFormatFlags.SingleLine }; 97yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty, Color.Red, (TextFormatFlags)1024 }; 98yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty, Color.Red, TextFormatFlags.RightToLeft }; 99yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty, Color.Red, (TextFormatFlags)int.MaxValue }; 106public void TextRenderer_DrawText_InvokeIDeviceContextStringFontPointColorTextFormatFlags_Success(TextRenderingHint textRenderingHint, string text, Font font, Point pt, Color foreColor, TextFormatFlags flags) 123yield return new object[] { hint, text, null, Point.Empty, Color.Red, Color.Blue, TextFormatFlags.Default, }; 129yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty, Color.Red, Color.Red, TextFormatFlags.Default, }; 130yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty, Color.Red, Color.Black, TextFormatFlags.Default, }; 131yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty, Color.Red, Color.White, TextFormatFlags.Default, }; 132yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty, Color.Red, Color.Transparent, TextFormatFlags.Default, }; 133yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty, Color.Red, Color.Empty, TextFormatFlags.Default, }; 135yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty, Color.Red, Color.Blue, TextFormatFlags.VerticalCenter | TextFormatFlags.HorizontalCenter }; 136yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty, Color.Red, Color.Blue, TextFormatFlags.Bottom | TextFormatFlags.Right }; 137yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty, Color.Red, Color.Blue, TextFormatFlags.SingleLine }; 138yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty, Color.Red, Color.Blue, (TextFormatFlags)1024 }; 139yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty, Color.Red, Color.Blue, TextFormatFlags.RightToLeft }; 140yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty, Color.Red, Color.Blue, (TextFormatFlags)int.MaxValue }; 147public void TextRenderer_DrawText_InvokeIDeviceContextStringFontPointColorColorTextFormatFlags_Success(TextRenderingHint textRenderingHint, string text, Font font, Point pt, Color foreColor, Color backColor, TextFormatFlags flags) 325TextRenderer.DrawText(mockDeviceContext.Object, "text", SystemFonts.MenuFont, Point.Empty, Color.Red); 329TextRenderer.DrawText(mockDeviceContext.Object, "text", SystemFonts.MenuFont, Point.Empty, Color.Red, Color.Blue); 333TextRenderer.DrawText(mockDeviceContext.Object, "text", SystemFonts.MenuFont, Point.Empty, Color.Red, TextFormatFlags.Default); 337TextRenderer.DrawText(mockDeviceContext.Object, "text", SystemFonts.MenuFont, Point.Empty, Color.Red, Color.Blue, TextFormatFlags.Default); 357TextRenderer.DrawText(mockDeviceContext.Object, "text".AsSpan(), SystemFonts.MenuFont, Point.Empty, Color.Red); 361TextRenderer.DrawText(mockDeviceContext.Object, "text".AsSpan(), SystemFonts.MenuFont, Point.Empty, Color.Red, Color.Blue); 365TextRenderer.DrawText(mockDeviceContext.Object, "text".AsSpan(), SystemFonts.MenuFont, Point.Empty, Color.Red, TextFormatFlags.Default); 369TextRenderer.DrawText(mockDeviceContext.Object, "text".AsSpan(), SystemFonts.MenuFont, Point.Empty, Color.Red, Color.Blue, TextFormatFlags.Default); 393Assert.Throws<ArgumentNullException>("dc", () => TextRenderer.DrawText(null, "text", SystemFonts.MenuFont, Point.Empty, Color.Red)); 621default(Point), 628default(Point), 679(Point)default,
System\Windows\Forms\ToolStripContentPanelTests.cs (4)
11using Point = System.Drawing.Point; 31Assert.Equal(Point.Empty, control.AutoScrollPosition); 92Assert.Equal(Point.Empty, control.Location); 912public void ToolStripContentPanel_Location_Set_GetReturnsExpected(Point value, int expectedLocationChangedCallCount)
System\Windows\Forms\ToolStripDropDownItemTests.cs (5)
8using Point = System.Drawing.Point; 50Assert.Equal(Point.Empty, item.DropDownLocation); 139Assert.Equal(Point.Empty, item.DropDownLocation); 238Assert.Equal(Point.Empty, item.DropDownLocation); 346Assert.Equal(Point.Empty, item.DropDownLocation);
System\Windows\Forms\ToolStripDropDownTests.cs (13)
10using Point = System.Drawing.Point; 34Assert.Equal(Point.Empty, control.AutoScrollPosition); 115Assert.Equal(Point.Empty, control.Location); 1929public void ToolStripDropDown_Location_Set_GetReturnsExpected(Point value, Point expected, int expectedLocationChangedCallCount) 1931if (value != Point.Empty) 1936if (expectedLocationChangedCallCount == 0 && SystemInformation.WorkingArea.Location != Point.Empty) 2334control.Show(sourceControl, Point.Empty); 2373control.Show(sourceControl, Point.Empty); 3097control.Show(sourceControl, Point.Empty); 3378control.Show(sourceControl, Point.Empty); 3437control.Show(sourceControl, Point.Empty); 5006Point expectedLocation = new(x, y);
System\Windows\Forms\ToolStripGripRenderEventArgsTests.cs (1)
52Assert.Equal(new Rectangle(Point.Empty, toolStrip.Size), e.AffectedBounds);
System\Windows\Forms\ToolStripMenuItemTests.cs (1)
47Assert.Equal(Point.Empty, item.DropDownLocation);
System\Windows\Forms\ToolStripPanelTests.cs (2)
31Assert.Equal(Point.Empty, control.AutoScrollPosition); 92Assert.Equal(Point.Empty, control.Location);
System\Windows\Forms\ToolStripSplitStackDragDropHandlerTests.cs (2)
115Point point = new(10, 10); 125Point point = new(10, 10);
System\Windows\Forms\ToolStripTests.cs (20)
12using Point = System.Drawing.Point; 34Assert.Equal(Point.Empty, control.AutoScrollPosition); 126Assert.Equal(Point.Empty, control.Location); 192Assert.Equal(Point.Empty, control.AutoScrollPosition); 281Assert.Equal(Point.Empty, control.Location); 868public void ToolStrip_AutoScrollPosition_Set_GetReturnsExpected(Point value) 874Assert.Equal(Point.Empty, control.AutoScrollPosition); 879Assert.Equal(Point.Empty, control.AutoScrollPosition); 6691public void ToolStrip_OnScroll_InvokeWithItems_Success(ScrollEventArgs eventArgs, Point expectedItem1Location, Point expectedItem2Location) 6736public void ToolStrip_OnScroll_InvokeWithItemsWithHandle_Success(ScrollEventArgs eventArgs, Point expectedItem1Location, Point expectedItem2Location, int expectedInvalidatedCallCount) 7000public void ToolStrip_SetItemLocation_Invoke_GetReturnsExpected(Point location, int expectedLocationChangedCallCount) 7042public void ToolStrip_SetItemLocation_InvokeWithHandle_GetReturnsExpected(Point location, int expectedLocationChangedCallCount) 7099Assert.Throws<ArgumentNullException>("item", () => control.SetItemLocation(null, Point.Empty)); 7107Assert.Throws<NotSupportedException>(() => control.SetItemLocation(item, Point.Empty)); 7119Assert.Throws<NotSupportedException>(() => control.SetItemLocation(item, Point.Empty)); 7130Assert.Throws<NotSupportedException>(() => control.SetItemLocation(item, Point.Empty)); 7142Assert.Throws<NotSupportedException>(() => control.SetItemLocation(item, Point.Empty)); 7666public new void SetItemLocation(ToolStripItem item, Point location) => base.SetItemLocation(item, location);
System\Windows\Forms\ToolStripTextBoxTests.cs (1)
791Point position = _toolStripTextBox.GetPositionFromCharIndex(_toolStripTextBox.SelectionStart);
System\Windows\Forms\TreeNode.IKeyboardToolTipTests.cs (2)
371Point initialPosition = Cursor.Position; 383Point position = treeView.AccessibilityObject.Bounds.Location;
System\Windows\Forms\TreeViewTests.cs (25)
89Assert.Equal(Point.Empty, control.Location); 4774public void TreeView_GetNodeAt_InvokePointEmpty_ReturnsNull(Point pt) 4793public void TreeView_GetNodeAt_InvokePointNotEmptyValid_Success(Point pt) 4819public void TreeView_GetNodeAt_InvokePointNotEmptyInvalid_Success(Point pt) 4834public void TreeView_GetNodeAt_InvokePointEmptyWithHandle_Success(Point pt) 4861public void TreeView_GetNodeAt_InvokePointNotEmptyValidWithHandle_Success(Point pt) 4890public void TreeView_GetNodeAt_InvokePointNotEmptyInvalidWithHandle_Success(Point pt) 4919public void TreeView_GetNodeAt_InvokeIntIntEmpty_ReturnsNull(Point pt) 4932public void TreeView_GetNodeAt_InvokeIntIntNotEmptyValid_Success(Point pt) 4947public void TreeView_GetNodeAt_InvokeIntIntNotEmptyInvalid_Success(Point pt) 4962public void TreeView_GetNodeAt_InvokeIntIntEmptyWithHandle_Success(Point pt) 4989public void TreeView_GetNodeAt_InvokeIntIntNotEmptyValidWithHandle_Success(Point pt) 5018public void TreeView_GetNodeAt_InvokeIntIntNotEmptyInvalidWithHandle_Success(Point pt) 5099public void TreeView_HitTest_InvokePointEmpty_Success(Point pt, TreeViewHitTestLocations expectedLocations) 5121public void TreeView_HitTest_InvokePointNotEmptyValid_Success(Point pt, TreeViewHitTestLocations expectedLocations) 5151public void TreeView_HitTest_InvokePointNotEmptyInvalid_Success(Point pt, TreeViewHitTestLocations expectedLocations) 5170public void TreeView_HitTest_InvokePointEmptyWithHandle_Success(Point pt, TreeViewHitTestLocations expectedLocations) 5201public void TreeView_HitTest_InvokePointNotEmptyValidWithHandle_Success(Point pt, TreeViewHitTestLocations expectedLocations) 5234public void TreeView_HitTest_InvokePointNotEmptyInvalidWithHandle_Success(Point pt, TreeViewHitTestLocations expectedLocations) 5267public void TreeView_HitTest_InvokeIntIntEmpty_Success(Point pt, TreeViewHitTestLocations expectedLocations) 5284public void TreeView_HitTest_InvokeIntIntNotEmptyValid_Success(Point pt, TreeViewHitTestLocations expectedLocations) 5303public void TreeView_HitTest_InvokeIntIntNotEmptyInvalid_Success(Point pt, TreeViewHitTestLocations expectedLocations) 5322public void TreeView_HitTest_InvokeIntIntEmptyWithHandle_Success(Point pt, TreeViewHitTestLocations expectedLocations) 5353public void TreeView_HitTest_InvokeIntIntNotEmptyValidWithHandle_Success(Point pt, TreeViewHitTestLocations expectedLocations) 5386public void TreeView_HitTest_InvokeIntIntNotEmptyInvalidWithHandle_Success(Point pt, TreeViewHitTestLocations expectedLocations)
System\Windows\Forms\UpDownBaseTests.cs (3)
9using Point = System.Drawing.Point; 29Assert.Equal(Point.Empty, control.AutoScrollPosition); 104Assert.Equal(Point.Empty, control.Location);
System\Windows\Forms\UserControlTests.cs (3)
11using Point = System.Drawing.Point; 35Assert.Equal(Point.Empty, control.AutoScrollPosition); 96Assert.Equal(Point.Empty, control.Location);
System\Windows\Forms\VScrollBarTests.cs (2)
7using Point = System.Drawing.Point; 85Assert.Equal(Point.Empty, control.Location);
System\Windows\Forms\WebBrowserTests.cs (4)
11using Point = System.Drawing.Point; 73Assert.Equal(Point.Empty, control.Location); 4526Point p = control.PointToScreen(new Point(5, 5)); 4600Point p = control.PointToScreen(new Point(5, 5));
TextBoxBaseTests.cs (27)
11using Point = System.Drawing.Point; 4248yield return new object[] { Point.Empty }; 4255public void TextBoxBase_GetCharFromPosition_InvokeEmpty_Success(Point pt) 4276yield return new object[] { Point.Empty, "T" }; 4284public void TextBoxBase_GetCharFromPosition_InvokeNotEmptyInvalid_Success(Point pt, char expected) 4296public void TextBoxBase_GetCharFromPosition_InvokeEmptyWithHandle_Success(Point pt) 4338public void TextBoxBase_GetCharFromPosition_InvokeNotEmptyInvalidWithHandle_Success(Point pt, char expected) 4361yield return new object[] { Point.Empty }; 4368public void TextBoxBase_GetCharIndexFromPosition_InvokeEmpty_Success(Point pt) 4390yield return new object[] { Point.Empty, 0 }; 4398public void TextBoxBase_GetCharIndexFromPosition_InvokeNotEmptyInvalid_Success(Point pt, int expected) 4410public void TextBoxBase_GetCharIndexFromPosition_InvokeEmptyWithHandle_Success(Point pt) 4453public void TextBoxBase_GetCharIndexFromPosition_InvokeNotEmptyInvalidWithHandle_Success(Point pt, int expected) 4842Assert.Equal(Point.Empty, control.GetPositionFromCharIndex(index)); 4857Point pt = control.GetPositionFromCharIndex(index); 4873Assert.Equal(Point.Empty, control.GetPositionFromCharIndex(index)); 4892Assert.Equal(Point.Empty, control.GetPositionFromCharIndex(index)); 4918Point pt = control.GetPositionFromCharIndex(index); 4945Assert.Equal(Point.Empty, control.GetPositionFromCharIndex(index)); 4954yield return new object[] { IntPtr.Zero, Point.Empty }; 4963public void TextBoxBase_GetPositionFromCharIndex_CustomPosFromChar_Success(IntPtr result, Point expected) 6975Point p = control.PointToScreen(new Point(5, 5)); 7056Point p = control.PointToScreen(new Point(5, 5)); 7818yield return new object[] { new Size(50, 50), true, 100, Point.Empty }; 7819yield return new object[] { new Size(50, 50), true, -1, Point.Empty }; 7824public void TextBoxBase_GetPositionFromCharIndex_ReturnsCorrectValue(Size size, bool multiline, int charIndex, Point expectedPoint) 7828Point actualPoint = textBoxBase.GetPositionFromCharIndex(charIndex);
TextBoxTests.cs (2)
8using Point = System.Drawing.Point; 84Assert.Equal(Point.Empty, control.Location);
TrackBarTests.cs (2)
9using Point = System.Drawing.Point; 78Assert.Equal(Point.Empty, control.Location);
System.Windows.Forms.UI.IntegrationTests (81)
ButtonTests.cs (13)
119Point mouseDragHandleOnForm = new(form.DisplayRectangle.Right, form.DisplayRectangle.Top + form.DisplayRectangle.Height / 2); 143Point mouseDragHandleOnForm = new(form.DisplayRectangle.Left + form.DisplayRectangle.Width / 2, form.DisplayRectangle.Bottom); 169Point mouseDragHandleOnForm = new(form.DisplayRectangle.Right, form.DisplayRectangle.Top + form.DisplayRectangle.Height / 2); 199Point mouseDragHandleOnForm = new(form.DisplayRectangle.Left + form.DisplayRectangle.Width / 2, form.DisplayRectangle.Bottom); 257Point centerOfRect = GetCenter(rect); 258Point centerOnScreen = control2.PointToScreen(centerOfRect); 262Point virtualPoint = new((int)Math.Round(65535.0 / horizontalResolution * centerOnScreen.X), 290Point centerOfRect = GetCenter(rect); 291Point centerOnScreen = control2.PointToScreen(centerOfRect); 293Point centerOfRect1 = GetCenter(rect1); 294Point centerOnScreen1 = control1.PointToScreen(centerOfRect1); 298Point virtualPoint = new((int)Math.Round(65535.0 / horizontalResolution * centerOnScreen.X), (int)Math.Round(65535.0 / verticalResolution * centerOnScreen.Y)); 299Point virtualPoint1 = new((int)Math.Round(65535.0 / horizontalResolution * centerOnScreen1.X), (int)Math.Round(65535.0 / verticalResolution * centerOnScreen1.Y));
DataGridViewTests.cs (4)
29Point cellCenter = GetCenter(cellRectangle); 30Point targetPoint = ToVirtualPoint(dataGridView.PointToScreen(cellCenter)); 108Point cellCenter = GetCenter(cellRectangle); 109Point targetPoint = ToVirtualPoint(dataGridView.PointToScreen(cellCenter));
DesignBehaviorsTests.cs (4)
100var dndStartCoordinates = treeView.PointToScreen(node.Bounds.Location); 120async Task InitiateDrangDropAsync(Form form, Point startCoordinates, Control rootView) 122var virtualPointStart = ToVirtualPoint(startCoordinates); 124var virtualPointEnd = ToVirtualPoint(startCoordinates);
DragDropTests.cs (33)
41var targetMousePosition = ToVirtualPoint(form.ListDragTarget.PointToScreen(new Point(20, 20))); 101var startCoordinates = form.PointToScreen(GetCenter(startRect)); 102Point endCoordinates = new(startCoordinates.X + 5, startCoordinates.Y + 5); 103var virtualPointStart = ToVirtualPoint(startCoordinates); 104var virtualPointEnd = ToVirtualPoint(endCoordinates); 186Assert.Equal(HRESULT.S_OK, uiAutomationElement.Value->GetClickablePoint(out Point clickable, out BOOL gotClickable)); 191Point startCoordinates = clickable; 193Point endCoordinates = dragDropForm.RichTextBoxDropTarget.PointToScreen(GetCenter(endRect)); 196Point virtualPointStart = new() 201Point virtualPointEnd = new() 252async void RunInputSimulator(Point virtualPointStart, Point virtualPointEnd) 316var startCoordinates = form.PointToScreen(GetCenter(startRect)); 317Point endCoordinates = new(startCoordinates.X + 5, startCoordinates.Y + 5); 318var virtualPointStart = ToVirtualPoint(startCoordinates); 319var virtualPointEnd = ToVirtualPoint(endCoordinates); 378var startCoordinates = form.ListDragSource.PointToScreen(GetCenter(startRect)); 380var endCoordinates = form.ListDragTarget.PointToScreen(GetCenter(endRect)); 381var virtualPointStart = ToVirtualPoint(startCoordinates); 382var virtualPointEnd = ToVirtualPoint(endCoordinates); 430Point startCoordinates = form.PictureBoxDragSource.PointToScreen(new Point(20, 20)); 431Point virtualPointStart = ToVirtualPoint(startCoordinates); 433Point virtualPointEnd = ToVirtualPoint(startCoordinates); 466Point toolStripItemCoordinates = form.ToolStrip.PointToScreen(new Point(5, 5)); 468Point virtualToolStripItemCoordinates = ToVirtualPoint(toolStripItemCoordinates); 474Point virtualPointStart = virtualToolStripItemCoordinates; 476Point virtualPointEnd = ToVirtualPoint(toolStripItemCoordinates); 526var startCoordinates = form.PointToScreen(GetCenter(startRect)); 527Point endCoordinates = new(startCoordinates.X + 5, startCoordinates.Y + 5); 528var virtualPointStart = ToVirtualPoint(startCoordinates); 529var virtualPointEnd = ToVirtualPoint(endCoordinates); 611private void WaitForExplorer(string directory, Point startPosition) 647private Point _screenOffset;
Infra\ControlTestBase.cs (10)
24private Point? _mousePosition; 167var centerOfRect = GetCenter(rect); 168var centerOnScreen = control.PointToScreen(centerOfRect); 172protected internal static Point ToVirtualPoint(Point point) 180protected async Task MoveMouseAsync(Form window, Point point, bool assertCorrectLocation = true) 184var virtualPoint = ToVirtualPoint(point); 190if (!PInvoke.GetCursorPos(out Point actualPoint)) 201if (!PInvoke.GetCursorPos(out Point _)) 386internal static Point GetCenter(Rectangle cell)
Input\MouseSimulator.cs (2)
135Assert.True(PInvoke.GetPhysicalCursorPos(out var point)); 136var virtualPoint = ControlTestBase.ToVirtualPoint(point + new Size(x, y));
ListBoxAccesibleObjectTests.cs (2)
39Point testPoint = listBox.PointToScreen(new Point(0, listBox.ClientRectangle.Height - 1)); 55Point testPoint = listBox.PointToScreen(new Point(itemBounds.Left + 1, itemBounds.Top + 1));
ListViewTests.cs (4)
32Point itemCenter = GetCenter(listView.RectangleToScreen(listView.Items[0].Bounds)); 324AccessibleObject HitTest(Point point) => 326Point GetSubItemLocation(int itemIndex, int subItemIndex) => 548Point listViewCenter = GetCenter(listView.RectangleToScreen(listView.Items[0].SubItems[1].Bounds));
MonthCalendarTests.cs (3)
142var centerOfRect = GetCenter(rect); 143var centerOnScreen = calendar.PointToScreen(centerOfRect); 173private Point GetCellPositionByDate(MonthCalendar calendar, DateTime dateTime)
PropertyGridTests.cs (2)
228Point oldLocation = _propertyGrid.ContextMenuDefaultLocation; 229Point newLocation = new(10, 20);
RichTextBoxTests.cs (3)
37Point pt = richTextBox.PointToScreen(richTextBox.GetPositionFromCharIndex(richTextBox.Text.IndexOf("Click link #2", StringComparison.Ordinal))); 97Point pt = richTextBox.PointToScreen(richTextBox.GetPositionFromCharIndex(richTextBox.Text.IndexOf("#link2#custom link", StringComparison.Ordinal))); 157Point pt = richTextBox.PointToScreen(richTextBox.GetPositionFromCharIndex(
TabControlTests.cs (1)
66private async Task<bool> IsHoveredWithMouseAsync(Form form, TabControl tabControl, Point point, bool assertCorrectLocation = true)
VisualBasicRuntimeTest (6)
Program.cs (6)
134var expectedValue = (Point)resources.GetObject("ProgressBarWork.Location"); 142Point actualValue = control.Location; 158var expectedValue = (Point)resources.GetObject("TextBox.Location"); 166Point actualValue = control.Location;
WindowsFormsIntegration (2)
System\Windows\Integration\ElementHost.cs (1)
416e.Graphics.DrawImage(bitmap, SD.Point.Empty);
System\Windows\Integration\WindowsFormsHost.cs (1)
332Child.Location = SD.Point.Empty;
WinFormsControlsTest (1)
ListViewTest.cs (1)
29Point pos = Cursor.Position;