4993 instantiations of Size
Accessibility_Core_App (378)
CommonControl1.Designer.cs (49)
109this.groupBox1.Size = new System.Drawing.Size(771, 380); 120this.button12.Size = new System.Drawing.Size(130, 58); 131this.button1.Size = new System.Drawing.Size(130, 58); 143this.button10.Size = new System.Drawing.Size(130, 58); 153this.button9.Size = new System.Drawing.Size(130, 58); 164this.button8.Size = new System.Drawing.Size(130, 58); 175this.button3.Size = new System.Drawing.Size(130, 58); 187this.button4.Size = new System.Drawing.Size(156, 58); 199this.button5.Size = new System.Drawing.Size(175, 63); 210this.button2.Size = new System.Drawing.Size(156, 58); 221this.button6.Size = new System.Drawing.Size(175, 58); 237this.groupBox2.Size = new System.Drawing.Size(771, 269); 252this.checkedListBox1.Size = new System.Drawing.Size(255, 148); 261this.label7.Size = new System.Drawing.Size(180, 32); 271this.checkBox3.Size = new System.Drawing.Size(160, 36); 283this.checkBox2.Size = new System.Drawing.Size(168, 36); 296this.checkBox1.Size = new System.Drawing.Size(138, 36); 311this.groupBox3.Size = new System.Drawing.Size(600, 380); 329this.comboBox2.Size = new System.Drawing.Size(257, 266); 338this.label11.Size = new System.Drawing.Size(138, 32); 354this.comboBox1.Size = new System.Drawing.Size(257, 40); 363this.label10.Size = new System.Drawing.Size(180, 32); 375this.groupBox4.Size = new System.Drawing.Size(598, 269); 390this.listView1.Size = new System.Drawing.Size(257, 151); 400this.label8.Size = new System.Drawing.Size(100, 32); 422this.groupBox5.Size = new System.Drawing.Size(769, 271); 434this.linkLabel6.Size = new System.Drawing.Size(44, 32); 446this.linkLabel5.Size = new System.Drawing.Size(93, 32); 458this.linkLabel4.Size = new System.Drawing.Size(70, 32); 470this.linkLabel3.Size = new System.Drawing.Size(54, 32); 482this.label6.Size = new System.Drawing.Size(93, 32); 493this.label5.Size = new System.Drawing.Size(54, 32); 504this.label4.Size = new System.Drawing.Size(70, 32); 515this.label3.Size = new System.Drawing.Size(44, 32); 524this.linkLabel2.Size = new System.Drawing.Size(217, 58); 535this.linkLabel1.Size = new System.Drawing.Size(154, 32); 545this.label2.Size = new System.Drawing.Size(217, 58); 555this.label1.Size = new System.Drawing.Size(154, 32); 567this.groupBox6.Size = new System.Drawing.Size(598, 271); 584this.listBox1.Size = new System.Drawing.Size(255, 164); 593this.label12.Size = new System.Drawing.Size(83, 32); 605this.groupBox7.Size = new System.Drawing.Size(735, 277); 615this.maskedTextBox1.Size = new System.Drawing.Size(212, 39); 624this.label9.Size = new System.Drawing.Size(171, 32); 637this.groupBox8.Size = new System.Drawing.Size(570, 277); 648this.dateTimePicker3.Size = new System.Drawing.Size(429, 39); 659this.dateTimePicker2.Size = new System.Drawing.Size(429, 39); 674this.dateTimePicker1.Size = new System.Drawing.Size(457, 39); 682this.ClientSize = new System.Drawing.Size(1482, 1291);
CommonControl2.Designer.cs (18)
72this.label3.Size = new System.Drawing.Size(64, 15); 82this.pictureBox1.Size = new System.Drawing.Size(231, 141); 93this.label4.Size = new System.Drawing.Size(81, 15); 103this.progressBar1.Size = new System.Drawing.Size(223, 27); 114this.radioButton1.Size = new System.Drawing.Size(94, 19); 126this.label5.Size = new System.Drawing.Size(71, 15); 136this.richTextBox1.Size = new System.Drawing.Size(130, 104); 146this.label6.Size = new System.Drawing.Size(48, 15); 160this.textBox1.Size = new System.Drawing.Size(116, 23); 169this.label7.Size = new System.Drawing.Size(53, 15); 197this.treeView1.Size = new System.Drawing.Size(220, 104); 206this.label8.Size = new System.Drawing.Size(73, 15); 214this.webBrowser1.MinimumSize = new System.Drawing.Size(23, 23); 217this.webBrowser1.Size = new System.Drawing.Size(512, 242); 227this.label1.Size = new System.Drawing.Size(90, 15); 244this.label2.Size = new System.Drawing.Size(102, 15); 253this.numericUpDown1.Size = new System.Drawing.Size(140, 23); 261this.ClientSize = new System.Drawing.Size(850, 501);
ContainerControls.Designer.cs (64)
131this.flowLayoutPanel2.Size = new System.Drawing.Size(186, 106); 139this.button2.Size = new System.Drawing.Size(88, 27); 149this.button5.Size = new System.Drawing.Size(88, 27); 159this.button6.Size = new System.Drawing.Size(88, 27); 170this.label2.Size = new System.Drawing.Size(203, 15); 180this.label3.Size = new System.Drawing.Size(97, 15); 190this.label4.Size = new System.Drawing.Size(60, 15); 201this.groupBox1.Size = new System.Drawing.Size(130, 69); 211this.button7.Size = new System.Drawing.Size(88, 27); 224this.groupBox2.Size = new System.Drawing.Size(130, 69); 234this.button8.Size = new System.Drawing.Size(88, 27); 247this.groupBox3.Size = new System.Drawing.Size(130, 69); 257this.button9.Size = new System.Drawing.Size(88, 27); 270this.groupBox4.Size = new System.Drawing.Size(130, 69); 280this.button10.Size = new System.Drawing.Size(88, 27); 291this.label6.Size = new System.Drawing.Size(186, 15); 301this.label7.Size = new System.Drawing.Size(172, 15); 310this.radioButton6.Size = new System.Drawing.Size(15, 17); 320this.radioButton5.Size = new System.Drawing.Size(14, 17); 330this.radioButton4.Size = new System.Drawing.Size(14, 17); 342this.checkBox2.Size = new System.Drawing.Size(80, 17); 353this.radioButton3.Size = new System.Drawing.Size(15, 17); 364this.radioButton2.Size = new System.Drawing.Size(14, 17); 373this.button18.Size = new System.Drawing.Size(75, 23); 382this.button17.Size = new System.Drawing.Size(75, 23); 392this.radioButton1.Size = new System.Drawing.Size(14, 17); 402this.checkBox1.Size = new System.Drawing.Size(80, 17); 413this.label10.Size = new System.Drawing.Size(70, 15); 425this.tabControl5.Size = new System.Drawing.Size(219, 138); 435this.tabPage9.Size = new System.Drawing.Size(211, 110); 445this.button19.Size = new System.Drawing.Size(88, 27); 457this.tabPage10.Size = new System.Drawing.Size(211, 110); 471this.tabControl6.Size = new System.Drawing.Size(203, 104); 481this.tabPage11.Size = new System.Drawing.Size(195, 76); 491this.button20.Size = new System.Drawing.Size(88, 27); 503this.tabPage12.Size = new System.Drawing.Size(195, 76); 513this.button21.Size = new System.Drawing.Size(88, 27); 529this.flowLayoutPanel1.Size = new System.Drawing.Size(203, 102); 537this.button4.Size = new System.Drawing.Size(88, 27); 547this.button1.Size = new System.Drawing.Size(88, 27); 557this.button3.Size = new System.Drawing.Size(88, 27); 568this.label1.Size = new System.Drawing.Size(217, 15); 579this.panel2.Size = new System.Drawing.Size(204, 144); 590this.tabControl2.Size = new System.Drawing.Size(172, 122); 599this.tabPage1.Size = new System.Drawing.Size(164, 94); 611this.tabPage2.Size = new System.Drawing.Size(164, 94); 621this.button12.Size = new System.Drawing.Size(88, 27); 632this.label5.Size = new System.Drawing.Size(36, 15); 644this.panel1.Size = new System.Drawing.Size(192, 128); 655this.tabControl1.Size = new System.Drawing.Size(156, 102); 665this.tabPage3.Size = new System.Drawing.Size(148, 74); 675this.button11.Size = new System.Drawing.Size(88, 27); 687this.tabPage4.Size = new System.Drawing.Size(148, 74); 697this.button13.Size = new System.Drawing.Size(88, 27); 712this.flowLayoutPanel3.Size = new System.Drawing.Size(180, 98); 720this.button14.Size = new System.Drawing.Size(88, 27); 730this.button22.Size = new System.Drawing.Size(88, 27); 740this.button23.Size = new System.Drawing.Size(88, 27); 751this.panel3.Size = new System.Drawing.Size(211, 136); 762this.tabControl3.Size = new System.Drawing.Size(187, 118); 771this.tabPage5.Size = new System.Drawing.Size(179, 90); 783this.tabPage6.Size = new System.Drawing.Size(179, 90); 793this.button24.Size = new System.Drawing.Size(88, 27); 803this.ClientSize = new System.Drawing.Size(795, 523);
ContainerControls2.Designer.cs (31)
78this.label8.Size = new System.Drawing.Size(295, 15); 100this.splitContainer1.Size = new System.Drawing.Size(273, 142); 110this.button15.Size = new System.Drawing.Size(74, 27); 120this.button16.Size = new System.Drawing.Size(88, 27); 131this.label9.Size = new System.Drawing.Size(199, 15); 153this.tableLayoutPanel1.Size = new System.Drawing.Size(259, 103); 161this.radioButton6.Size = new System.Drawing.Size(15, 17); 171this.radioButton5.Size = new System.Drawing.Size(14, 17); 181this.radioButton4.Size = new System.Drawing.Size(14, 17); 193this.checkBox2.Size = new System.Drawing.Size(80, 17); 204this.radioButton3.Size = new System.Drawing.Size(15, 17); 215this.radioButton2.Size = new System.Drawing.Size(14, 17); 224this.button18.Size = new System.Drawing.Size(75, 23); 233this.button17.Size = new System.Drawing.Size(75, 23); 243this.radioButton1.Size = new System.Drawing.Size(14, 17); 253this.checkBox1.Size = new System.Drawing.Size(80, 17); 264this.label13.Size = new System.Drawing.Size(218, 15); 274this.flowLayoutPanel4.Size = new System.Drawing.Size(153, 84); 283this.label14.Size = new System.Drawing.Size(210, 15); 295this.groupBox5.Size = new System.Drawing.Size(153, 88); 306this.label15.Size = new System.Drawing.Size(186, 15); 316this.panel4.Size = new System.Drawing.Size(164, 103); 325this.label16.Size = new System.Drawing.Size(337, 15); 342this.splitContainer2.Size = new System.Drawing.Size(262, 90); 353this.label17.Size = new System.Drawing.Size(350, 15); 365this.tabControl4.Size = new System.Drawing.Size(262, 88); 375this.tabPage7.Size = new System.Drawing.Size(254, 60); 386this.tabPage8.Size = new System.Drawing.Size(254, 60); 396this.label18.Size = new System.Drawing.Size(211, 15); 412this.tableLayoutPanel2.Size = new System.Drawing.Size(258, 103); 420this.ClientSize = new System.Drawing.Size(945, 464);
DataBindingExample.Designer.cs (20)
59this.comboBox1.Size = new System.Drawing.Size(121, 23); 70this.dataGridView1.Size = new System.Drawing.Size(240, 150); 82this.label1.Size = new System.Drawing.Size(109, 15); 92this.textBox1.Size = new System.Drawing.Size(142, 23); 102this.button1.Size = new System.Drawing.Size(75, 23); 124this.panel1.Size = new System.Drawing.Size(479, 198); 134this.radioButton1.Size = new System.Drawing.Size(84, 19); 146this.numericUpDown1.Size = new System.Drawing.Size(120, 23); 155this.domainUpDown1.Size = new System.Drawing.Size(120, 23); 165this.richTextBox1.Size = new System.Drawing.Size(151, 85); 177this.checkBox1.Size = new System.Drawing.Size(80, 19); 188this.maskedTextBox1.Size = new System.Drawing.Size(142, 23); 199this.linkLabel1.Size = new System.Drawing.Size(84, 15); 211this.label2.Size = new System.Drawing.Size(53, 15); 221this.treeView1.Size = new System.Drawing.Size(129, 101); 231this.label3.Size = new System.Drawing.Size(50, 15); 242this.listView1.Size = new System.Drawing.Size(203, 97); 254this.label4.Size = new System.Drawing.Size(45, 15); 266this.listBox1.Size = new System.Drawing.Size(120, 94); 273this.ClientSize = new System.Drawing.Size(785, 383);
DataControls.Designer.cs (24)
105this.bindingNavigator1.Size = new System.Drawing.Size(868, 28); 116this.bindingNavigatorAddNewItem.Size = new System.Drawing.Size(23, 25); 123this.bindingNavigatorCountItem.Size = new System.Drawing.Size(35, 25); 133this.bindingNavigatorDeleteItem.Size = new System.Drawing.Size(23, 25); 142this.bindingNavigatorMoveFirstItem.Size = new System.Drawing.Size(23, 25); 151this.bindingNavigatorMovePreviousItem.Size = new System.Drawing.Size(23, 25); 157this.bindingNavigatorSeparator.Size = new System.Drawing.Size(6, 28); 164this.bindingNavigatorPositionItem.Size = new System.Drawing.Size(58, 23); 171this.bindingNavigatorSeparator1.Size = new System.Drawing.Size(6, 28); 179this.bindingNavigatorMoveNextItem.Size = new System.Drawing.Size(23, 25); 188this.bindingNavigatorMoveLastItem.Size = new System.Drawing.Size(23, 25); 194this.bindingNavigatorSeparator2.Size = new System.Drawing.Size(6, 28); 201this.toolStripButton1.Size = new System.Drawing.Size(114, 25); 207this.toolStripLabel1.Size = new System.Drawing.Size(86, 25); 215this.toolStripSplitButton1.Size = new System.Drawing.Size(149, 25); 223this.toolStripDropDownButton1.Size = new System.Drawing.Size(180, 25); 229this.toolStripSeparator1.Size = new System.Drawing.Size(6, 28); 238this.toolStripComboBox1.Size = new System.Drawing.Size(140, 23); 244this.toolStripTextBox1.Size = new System.Drawing.Size(116, 23); 252this.toolStripProgressBar1.Size = new System.Drawing.Size(117, 25); 260this.toolStripLabel2.Size = new System.Drawing.Size(282, 15); 279this.dataGridView1.Size = new System.Drawing.Size(844, 115); 343this.dataGridView2.Size = new System.Drawing.Size(408, 258); 352this.ClientSize = new System.Drawing.Size(868, 450);
DialogControls.Designer.cs (5)
41this.ColorDialog.Size = new System.Drawing.Size(88, 27); 52this.FolderBrowserDialog.Size = new System.Drawing.Size(153, 27); 63this.OpenFileDialog.Size = new System.Drawing.Size(108, 27); 74this.SaveFileDialog.Size = new System.Drawing.Size(114, 27); 84this.ClientSize = new System.Drawing.Size(268, 233);
Main.Designer.cs (12)
50this.button1.Size = new System.Drawing.Size(531, 27); 61this.button2.Size = new System.Drawing.Size(531, 27); 72this.button3.Size = new System.Drawing.Size(531, 27); 83this.button4.Size = new System.Drawing.Size(531, 27); 94this.button5.Size = new System.Drawing.Size(531, 27); 105this.button6.Size = new System.Drawing.Size(531, 27); 116this.button7.Size = new System.Drawing.Size(531, 27); 127this.button8.Size = new System.Drawing.Size(531, 27); 138this.button9.Size = new System.Drawing.Size(531, 27); 148this.button10.Size = new System.Drawing.Size(530, 27); 158this.button12.Size = new System.Drawing.Size(530, 23); 168this.ClientSize = new System.Drawing.Size(571, 504);
Menu_Toolbars_controls.Designer.cs (69)
109menuStrip1.ImageScalingSize = new Size(20, 20); 115menuStrip1.Size = new Size(1287, 34); 122contextMenuStrip1.ImageScalingSize = new Size(20, 20); 125contextMenuStrip1.Size = new Size(147, 52); 132menuStripToolStripMenuItem.Size = new Size(146, 24); 138item1ToolStripMenuItem.Size = new Size(130, 26); 145shortCutsToolStripMenuItem.Size = new Size(146, 24); 151item2ToolStripMenuItem.Size = new Size(130, 26); 158fileToolStripMenuItem.Size = new Size(46, 28); 168newToolStripMenuItem.Size = new Size(181, 26); 177openToolStripMenuItem.Size = new Size(181, 26); 183toolStripSeparator.Size = new Size(178, 6); 191saveToolStripMenuItem.Size = new Size(181, 26); 197saveAsToolStripMenuItem.Size = new Size(181, 26); 203toolStripSeparator1.Size = new Size(178, 6); 211printToolStripMenuItem.Size = new Size(181, 26); 219printPreviewToolStripMenuItem.Size = new Size(181, 26); 225toolStripSeparator2.Size = new Size(178, 6); 230exitToolStripMenuItem.Size = new Size(181, 26); 237editToolStripMenuItem.Size = new Size(49, 28); 245undoToolStripMenuItem.Size = new Size(179, 26); 252redoToolStripMenuItem.Size = new Size(179, 26); 258toolStripSeparator3.Size = new Size(176, 6); 266cutToolStripMenuItem.Size = new Size(179, 26); 275copyToolStripMenuItem.Size = new Size(179, 26); 284pasteToolStripMenuItem.Size = new Size(179, 26); 290toolStripSeparator4.Size = new Size(176, 6); 295selectAllToolStripMenuItem.Size = new Size(179, 26); 302toolsToolStripMenuItem.Size = new Size(58, 28); 309customizeToolStripMenuItem.Size = new Size(161, 26); 315optionsToolStripMenuItem.Size = new Size(161, 26); 322helpToolStripMenuItem.Size = new Size(55, 28); 329contentsToolStripMenuItem.Size = new Size(150, 26); 335indexToolStripMenuItem.Size = new Size(150, 26); 341searchToolStripMenuItem.Size = new Size(150, 26); 347toolStripSeparator5.Size = new Size(147, 6); 352aboutToolStripMenuItem.Size = new Size(150, 26); 359toolStripMenuItem1.Size = new Size(156, 28); 367uncheckedCheckOnClickToolStripMenuItem.Size = new Size(298, 26); 376checkCheckOnClickToolStripMenuItem.Size = new Size(298, 26); 384checkedCheckOnClickFToolStripMenuItem.Size = new Size(298, 26); 393indeterminateToolStripMenuItem.Size = new Size(298, 26); 401indeterminateCheckOnClickFToolStripMenuItem.Size = new Size(298, 26); 408toolStripComboBox1.Size = new Size(159, 28); 415toolStripTextBox1.Size = new Size(132, 28); 420statusStrip1.ImageScalingSize = new Size(20, 20); 426statusStrip1.Size = new Size(1287, 29); 438toolStripDropDownButton1.Size = new Size(34, 27); 444toolStripSeparator9.Size = new Size(222, 6); 449toolStripTextBox3.Size = new Size(100, 27); 454toolStripMenuItem3.Size = new Size(225, 26); 464toolStripSplitButton1.Size = new Size(39, 27); 470toolStripTextBox2.Size = new Size(100, 27); 475toolStripSeparator8.Size = new Size(222, 6); 480toolStripComboBox2.Size = new Size(121, 28); 485toolStripMenuItem2.Size = new Size(225, 26); 491toolStripStatusLabel1.Size = new Size(151, 23); 499toolStripProgressBar1.Size = new Size(134, 21); 503toolStrip1.ImageScalingSize = new Size(20, 20); 507toolStrip1.Size = new Size(1287, 31); 517newToolStripButton.Size = new Size(63, 28); 523toolStripSeparator7.Size = new Size(6, 31); 531toolStripButton1.Size = new Size(197, 28); 541toolStripButton2.Size = new Size(198, 28); 553toolStripButton3.Size = new Size(182, 28); 564toolStripButton4.Size = new Size(181, 28); 576toolStripButton5.Size = new Size(219, 28); 587toolStripButton6.Size = new Size(218, 24); 594ClientSize = new Size(1287, 549);
MenuForm.Designer.cs (3)
40this.button1.Size = new System.Drawing.Size(88, 27); 51this.button2.Size = new System.Drawing.Size(122, 27); 61this.ClientSize = new System.Drawing.Size(467, 441);
PrintingControls.Designer.cs (12)
61this.printPreviewDialog1.AutoScrollMargin = new System.Drawing.Size(0, 0); 62this.printPreviewDialog1.AutoScrollMinSize = new System.Drawing.Size(0, 0); 63this.printPreviewDialog1.ClientSize = new System.Drawing.Size(400, 300); 76this.label1.Size = new System.Drawing.Size(165, 15); 85this.txtPrint.Size = new System.Drawing.Size(213, 23); 94this.btnSetting.Size = new System.Drawing.Size(88, 27); 105this.btnPreView.Size = new System.Drawing.Size(88, 27); 116this.btnPrint.Size = new System.Drawing.Size(88, 27); 127this.button1.Size = new System.Drawing.Size(104, 27); 139this.label2.Size = new System.Drawing.Size(91, 15); 152this.printPreviewControl1.Size = new System.Drawing.Size(387, 408); 161this.ClientSize = new System.Drawing.Size(426, 522);
RemainingControls.Designer.cs (9)
48this.hScrollBar1.Size = new System.Drawing.Size(593, 17); 57this.vScrollBar1.Size = new System.Drawing.Size(17, 406); 66this.propertyGrid1.Size = new System.Drawing.Size(266, 282); 74this.propertyGrid2.Size = new System.Drawing.Size(260, 282); 83this.label1.Size = new System.Drawing.Size(156, 15); 92this.domainUpDown1.Size = new System.Drawing.Size(140, 23); 102this.label2.Size = new System.Drawing.Size(37, 15); 111this.trackBar1.Size = new System.Drawing.Size(121, 45); 118this.ClientSize = new System.Drawing.Size(593, 423);
ToolStripContainer.Designer.cs (62)
105this.toolStripContainer2.ContentPanel.Size = new System.Drawing.Size(486, 239); 109this.toolStripContainer2.Size = new System.Drawing.Size(486, 263); 121this.toolStrip1.ImageScalingSize = new System.Drawing.Size(32, 32); 139this.toolStrip1.Size = new System.Drawing.Size(486, 39); 146this.contextMenuStrip1.ImageScalingSize = new System.Drawing.Size(32, 32); 148this.contextMenuStrip1.Size = new System.Drawing.Size(61, 4); 156this.toolStripButton1.Size = new System.Drawing.Size(36, 36); 167this.toolStripSplitButton1.Size = new System.Drawing.Size(48, 36); 173this.toolStripToolStripMenuItem.Size = new System.Drawing.Size(180, 22); 182this.newToolStripButton.Size = new System.Drawing.Size(36, 36); 191this.openToolStripButton.Size = new System.Drawing.Size(36, 36); 200this.saveToolStripButton.Size = new System.Drawing.Size(36, 36); 209this.printToolStripButton.Size = new System.Drawing.Size(36, 36); 215this.toolStripSeparator6.Size = new System.Drawing.Size(6, 39); 223this.cutToolStripButton.Size = new System.Drawing.Size(36, 36); 232this.copyToolStripButton.Size = new System.Drawing.Size(36, 36); 241this.pasteToolStripButton.Size = new System.Drawing.Size(36, 36); 247this.toolStripSeparator7.Size = new System.Drawing.Size(6, 39); 255this.helpToolStripButton.Size = new System.Drawing.Size(36, 36); 268this.toolStripComboBox1.Size = new System.Drawing.Size(106, 23); 273this.statusStrip1.ImageScalingSize = new System.Drawing.Size(32, 32); 283this.statusStrip1.Size = new System.Drawing.Size(486, 38); 296this.toolStripDropDownButton1.Size = new System.Drawing.Size(45, 36); 302this.statusStripToolStripMenuItem.Size = new System.Drawing.Size(130, 22); 311this.toolStripSplitButton2.Size = new System.Drawing.Size(48, 36); 317this.toolStripStatusLabel1.Size = new System.Drawing.Size(118, 33); 324this.toolStripStatusLabel2.Size = new System.Drawing.Size(118, 33); 331this.menuStrip1.ImageScalingSize = new System.Drawing.Size(32, 32); 341this.menuStrip1.Size = new System.Drawing.Size(486, 24); 351this.menuStripToolStripMenuItem.Size = new System.Drawing.Size(74, 20); 358this.menuStripItem1ToolStripMenuItem.Size = new System.Drawing.Size(159, 22); 376this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20); 385this.newToolStripMenuItem.Size = new System.Drawing.Size(143, 22); 393this.openToolStripMenuItem.Size = new System.Drawing.Size(143, 22); 399this.toolStripSeparator.Size = new System.Drawing.Size(140, 6); 406this.saveToolStripMenuItem.Size = new System.Drawing.Size(143, 22); 412this.saveAsToolStripMenuItem.Size = new System.Drawing.Size(143, 22); 418this.toolStripSeparator1.Size = new System.Drawing.Size(140, 6); 425this.printToolStripMenuItem.Size = new System.Drawing.Size(143, 22); 433this.printPreviewToolStripMenuItem.Size = new System.Drawing.Size(143, 22); 439this.toolStripSeparator2.Size = new System.Drawing.Size(140, 6); 444this.exitToolStripMenuItem.Size = new System.Drawing.Size(143, 22); 459this.editToolStripMenuItem.Size = new System.Drawing.Size(39, 20); 466this.undoToolStripMenuItem.Size = new System.Drawing.Size(122, 22); 472this.redoToolStripMenuItem.Size = new System.Drawing.Size(122, 22); 478this.toolStripSeparator3.Size = new System.Drawing.Size(119, 6); 485this.cutToolStripMenuItem.Size = new System.Drawing.Size(122, 22); 493this.copyToolStripMenuItem.Size = new System.Drawing.Size(122, 22); 501this.pasteToolStripMenuItem.Size = new System.Drawing.Size(122, 22); 507this.toolStripSeparator4.Size = new System.Drawing.Size(119, 6); 512this.selectAllToolStripMenuItem.Size = new System.Drawing.Size(122, 22); 521this.toolsToolStripMenuItem.Size = new System.Drawing.Size(46, 20); 528this.customizeToolStripMenuItem.Size = new System.Drawing.Size(130, 22); 534this.optionsToolStripMenuItem.Size = new System.Drawing.Size(130, 22); 546this.helpToolStripMenuItem.Size = new System.Drawing.Size(44, 20); 553this.contentsToolStripMenuItem.Size = new System.Drawing.Size(122, 22); 559this.indexToolStripMenuItem.Size = new System.Drawing.Size(122, 22); 565this.searchToolStripMenuItem.Size = new System.Drawing.Size(122, 22); 571this.toolStripSeparator5.Size = new System.Drawing.Size(119, 6); 576this.aboutToolStripMenuItem.Size = new System.Drawing.Size(122, 22); 584this.button1.Size = new System.Drawing.Size(88, 27); 593this.ClientSize = new System.Drawing.Size(700, 422);
BinaryFormatTests (3)
FormatTests\FormattedObject\BinaryFormatWriterTests.cs (3)
196new Size(6, 7), 197new Size(int.MaxValue, int.MinValue), 198new Size(0, 0),
DesignSurface (88)
MainForm.cs (59)
93surface.UseGrid(new System.Drawing.Size(16, 16)); 96surface.UseGridWithoutSnapping(new System.Drawing.Size(32, 32)); 123rootComponent = surface.CreateRootComponent<Form>(new Size(400, 400)); 128TextBox t1 = surface.CreateControl<TextBox>(new Size(200, 23), new Point(172, 12)); 129Button b1 = surface.CreateControl<Button>(new Size(200, 40), new Point(172, 63)); 130CustomButton b2 = surface.CreateControl<CustomButton>(new Size(200, 40), new Point(172, 200)); 136RadioButton rb1 = surface.CreateControl<RadioButton>(new Size(120, 22), new Point(12, 10)); 138RadioButton rb2 = surface.CreateControl<RadioButton>(new Size(120, 22), new Point(12, 35)); 142CheckBox checkbox1 = surface.CreateControl<CheckBox>(new Size(120, 22), new Point(12, 60)); 144CheckBox checkbox2 = surface.CreateControl<CheckBox>(new Size(120, 22), new Point(12, 85)); 148CheckBox checkbox3 = surface.CreateControl<CheckBox>(new Size(120, 22), new Point(12, 110)); 152Panel pnl = surface.CreateControl<Panel>(new Size(140, 140), new Point(12, 12)); 160Label l1 = surface.CreateControl<Label>(new Size(100, 25), new Point(12, 12)); 161Label l2 = surface.CreateControl<Label>(new Size(120, 25), new Point(12, 12)); 167SplitContainer sct = surface.CreateControl<SplitContainer>(new Size(400, 100), new Point(0, 0)); 173PictureBox pb1 = surface.CreateControl<PictureBox>(new Size(64, 64), new Point(12, 176)); 178surface.CreateControl<DateTimePicker>(new Size(200, 23), new Point(172, 150)); 184rootComponent = surface.CreateRootComponent<Form>(new Size(640, 480)); 189TextBox t1 = surface.CreateControl<TextBox>(new Size(200, 20), new Point(10, 10)); 190Button b1 = surface.CreateControl<Button>(new Size(200, 40), new Point(10, 40)); 191Label l1 = surface.CreateControl<Label>(new Size(200, 100), new Point(10, 100)); 198MaskedTextBox maskTextBox = surface.CreateControl<MaskedTextBox>(new Size(200, 20), new Point(260, 60)); 200ComboBox cb1 = surface.CreateControl<ComboBox>(new Size(200, 20), new Point(260, 16)); 204ListBox lb1 = surface.CreateControl<ListBox>(new Size(200, 130), new Point(260, 100)); 207TreeView tv1 = surface.CreateControl<TreeView>(new Size(200, 160), new Point(10, 220)); 213rootComponent = surface.CreateRootComponent<Form>(new Size(800, 600)); 218Button b1 = surface.CreateControl<Button>(new Size(200, 40), new Point(10, 10)); 219Button b2 = surface.CreateControl<Button>(new Size(200, 40), new Point(100, 100)); 220Button b3 = surface.CreateControl<Button>(new Size(200, 40), new Point(22, 22)); 224GroupBox gb = surface.CreateControl<GroupBox>(new Size(300, 180), new Point(100, 200)); 228ListView lb1 = surface.CreateControl<ListView>(new Size(290, 160), new Point(320, 30)); 235rootComponent = surface.CreateRootComponent<Form>(new Size(800, 600)); 240Button b1 = surface.CreateControl<Button>(new Size(200, 40), new Point(10, 10)); 241Button b2 = surface.CreateControl<Button>(new Size(200, 40), new Point(10, 60)); 251MonthCalendar monthCalendar1 = surface.CreateControl<MonthCalendar>(new Size(230, 170), new Point(10, 110)); 253Button subButton1OfLayoutPanel = surface.CreateControl<Button>(new Size(100, 40), new Point(10, 10)); 254Button subButton2OfLayoutPanel = surface.CreateControl<Button>(new Size(100, 40), new Point(10, 10)); 255FlowLayoutPanel layoutPanel = surface.CreateControl<FlowLayoutPanel>(new Size(430, 200), new Point(250, 10)); 259TrackBar trackBar = surface.CreateControl<TrackBar>(new Size(200, 50), new Point(250, 220)); 264ToolStripContainer toolStripContainer = surface.CreateControl<ToolStripContainer>(new Size(200, 180), new Point(250, 280)); 270rootComponent = surface.CreateRootComponent<Form>(new Size(800, 600)); 274surface.CreateControl<TabControl>(new Size(400, 100), new Point(12, 21)); 275surface.CreateControl<TableLayoutPanel>(new Size(290, 160), new Point(20, 150)); 276surface.CreateControl<PropertyGrid>(new Size(200, 150), new Point(430, 23)); 279ListBox listBox = surface.CreateControl<ListBox>(new Size(120, 94), new Point(337, 217)); 283DataGridView dataGridView = surface.CreateControl<DataGridView>(new Size(200, 150), new Point(470, 220)); 292rootComponent = surface.CreateRootComponent<Form>(new Size(800, 600)); 296ToolStripContainer toolStripContainer = surface.CreateControl<ToolStripContainer>(new Size(800, 200), new Point(0, 0)); 315ToolStripPanel topToolStripPanel = surface.CreateControl<ToolStripPanel>(new(50, 50), new(0, 0)); 318ToolStripPanel bottomToolStripPanel = surface.CreateControl<ToolStripPanel>(new(50, 50), new(0, 0)); 322SplitContainer splitContainer = surface.CreateControl<SplitContainer>(new(0, 0), new(0, 0)); 326RichTextBox richTextBox = surface.CreateControl<RichTextBox>(new Size(0, 0), new Point(0, 0)); 331MyUserControl userControl = surface.CreateControl<MyUserControl>(new Size(0, 0), new Point(0, 0)); 335MyScrollableControl scrollableControl = surface.CreateControl<MyScrollableControl>(new Size(0, 0), new Point(0, 0)); 348Splitter splitter = surface.CreateControl<Splitter>(new(5, 0), new(0, 0)); 352Panel panel = surface.CreateControl<Panel>(new(0, tabPage6.Height / 2), new(0, 0)); 354NumericUpDown numericUpDown = surface.CreateControl<NumericUpDown>(new(50, 10), new(10, 10)); 357BindingNavigator bindingNavigator = surface.CreateControl<BindingNavigator>(new(0, 0), new(0, 0)); 437Size = new Size(226, 502),
MainForm.Designer.cs (24)
80this.splitContainer.Size = new System.Drawing.Size(824, 502); 97this.tabControl1.Size = new System.Drawing.Size(593, 502); 105this.tabPage1.Size = new System.Drawing.Size(585, 473); 115this.tabPage2.Size = new System.Drawing.Size(585, 473); 125this.tabPage3.Size = new System.Drawing.Size(585, 473); 135this.tabPage4.Size = new System.Drawing.Size(585, 473); 145this.tabPage5.Size = new System.Drawing.Size(585, 473); 155this.tabPage6.Size = new System.Drawing.Size(585, 473); 170this.menuStrip1.Size = new System.Drawing.Size(824, 28); 187this.editToolStripMenuItem.Size = new System.Drawing.Size(47, 24); 194this.ToolStripMenuItemUnDo.Size = new System.Drawing.Size(165, 24); 202this.ToolStripMenuItemReDo.Size = new System.Drawing.Size(165, 24); 209this.toolStripSeparator3.Size = new System.Drawing.Size(162, 6); 217this.ToolStripMenuItemCut.Size = new System.Drawing.Size(165, 24); 227this.ToolStripMenuItemCopy.Size = new System.Drawing.Size(165, 24); 237this.ToolStripMenuItemPaste.Size = new System.Drawing.Size(165, 24); 245this.ToolStripMenuItemDelete.Size = new System.Drawing.Size(165, 24); 253this.ToolStripMenuItemKeyInvokeSmartTag.Size = new System.Drawing.Size(165, 24); 260this.toolStripSeparator4.Size = new System.Drawing.Size(162, 6); 267this.toolStripMenuItemTools.Size = new System.Drawing.Size(57, 24); 273this.toolStripMenuItemTabOrder.Size = new System.Drawing.Size(145, 24); 282this.helpToolStripMenuItem.Size = new System.Drawing.Size(53, 24); 288this.ToolStripMenuItemAbout.Size = new System.Drawing.Size(128, 24); 296this.ClientSize = new System.Drawing.Size(824, 530);
MainForm.MyScrollableControl.cs (1)
21AutoScrollMinSize = new Size(800, 800);
MainForm.MyUserControl.cs (4)
21AutoScrollMinSize = new(1, 1); 29Size = new(30, 30) 36Size = new(30, 30) 43Size = new(30, 30)
DesignSurfaceExt (1)
DesignerOptionServiceExt.cs (1)
87GridSize = new System.Drawing.Size(8, 8),
Microsoft.VisualBasic.Forms (2)
Microsoft\VisualBasic\MyServices\Internal\ProgressDialog.vb (2)
133LabelInfo.MaximumSize = New Size(300, 0) 206LabelInfo.MaximumSize = New Size(ClientSize.Width - BORDER_SIZE, 0)
NativeHost.ManagedControl (1)
ManagedControl.Designer.cs (1)
40this.button1.Size = new System.Drawing.Size(75, 23);
PresentationUI (164)
MS\Internal\Documents\Application\DocumentPropertiesDialog.Designer.cs (51)
133this.tableLayoutPanel3.Size = new System.Drawing.Size(362, 437); 143this._tabControl.Size = new System.Drawing.Size(436, 535); 155this._summaryTab.Size = new System.Drawing.Size(324, 355); 205this.tableLayoutPanel1.Size = new System.Drawing.Size(324, 297); 213this._language.Size = new System.Drawing.Size(335, 13); 223this._title.Size = new System.Drawing.Size(335, 13); 232this._titleLabel.Size = new System.Drawing.Size(27, 13); 240this._identifier.Size = new System.Drawing.Size(335, 13); 249this._versionLabel.Size = new System.Drawing.Size(42, 13); 257this._authorLabel.Size = new System.Drawing.Size(38, 13); 265this._statusLabel.Size = new System.Drawing.Size(37, 13); 273this._contentLabel.Size = new System.Drawing.Size(44, 13); 281this._languageLabel.Size = new System.Drawing.Size(55, 13); 289this._subjectLabel.Size = new System.Drawing.Size(43, 13); 297this._version.Size = new System.Drawing.Size(335, 13); 306this._categoryLabel.Size = new System.Drawing.Size(49, 13); 314this._category.Size = new System.Drawing.Size(335, 13); 323this._status.Size = new System.Drawing.Size(335, 13); 332this._content.Size = new System.Drawing.Size(335, 13); 341this._keywordsLabel.Size = new System.Drawing.Size(53, 13); 350this._author.Size = new System.Drawing.Size(335, 13); 359this._subject.Size = new System.Drawing.Size(335, 13); 369this._description.Size = new System.Drawing.Size(335, 101); 380this._keywords.Size = new System.Drawing.Size(335, 28); 391this._identifierLabel.Size = new System.Drawing.Size(47, 13); 400this._descriptionLabel.Size = new System.Drawing.Size(60, 13); 426this._infoTab.Size = new System.Drawing.Size(348, 379); 445this.tableLayoutPanel2.Size = new System.Drawing.Size(314, 355); 477this._size.Size = new System.Drawing.Size(270, 28); 485this._iconPictureBox.Size = new System.Drawing.Size(40, 40); 495this._filename.Size = new System.Drawing.Size(340, 13); 505this._documentType.Size = new System.Drawing.Size(340, 13); 515this._sizeLabel.Size = new System.Drawing.Size(40, 13); 526this._documentDetailBox.Size = new System.Drawing.Size(305, 127); 563this._documentPrintedDate.Size = new System.Drawing.Size(282, 13); 572this._documentModifiedDate.Size = new System.Drawing.Size(282, 13); 581this._documentCreatedDate.Size = new System.Drawing.Size(282, 13); 590this._revision.Size = new System.Drawing.Size(282, 13); 599this._documentPrintedLabel.Size = new System.Drawing.Size(43, 13); 607this._documentModifiedLabel.Size = new System.Drawing.Size(50, 13); 615this._documentCreatedLabel.Size = new System.Drawing.Size(47, 13); 623this._revisionLabel.Size = new System.Drawing.Size(51, 13); 631this._lastSavedLabel.Size = new System.Drawing.Size(79, 13); 639this._lastSaved.Size = new System.Drawing.Size(282, 13); 679this._fileModifiedDate.Size = new System.Drawing.Size(282, 13); 688this._fileAccessedDate.Size = new System.Drawing.Size(282, 13); 697this._fileCreatedLabel.Size = new System.Drawing.Size(47, 13); 705this._fileModifiedLabel.Size = new System.Drawing.Size(50, 13); 713this._fileCreatedDate.Size = new System.Drawing.Size(282, 13); 722this._fileAccessedLabel.Size = new System.Drawing.Size(57, 13); 730this.ClientSize = new System.Drawing.Size(466, 574);
MS\Internal\Documents\CredentialManagerDialog.Designer.cs (5)
69this._mainDialogTableLayoutPanel.Size = new System.Drawing.Size(398, 157); 144this._credListBox.Size = new System.Drawing.Size(299, 82); 152this._instructionLabel.MaximumSize = new System.Drawing.Size(400, 0); 154this._instructionLabel.Size = new System.Drawing.Size(0, 0); 165this.ClientSize = new System.Drawing.Size(409, 168);
MS\Internal\Documents\RequestedSignatureDialog.Designer.cs (14)
65_buttomControlLayoutpanel.Size = new System.Drawing.Size(56, 24); 73_addButton.Size = new System.Drawing.Size(65, 6); 83_cancelButton.Size = new System.Drawing.Size(65, 6); 118_userInputTableLayoutPanel.Size = new System.Drawing.Size(407, 197); 125_dateTimePicker.Size = new System.Drawing.Size(245, 20); 137_requestedLocationTextBox.Size = new System.Drawing.Size(401, 20); 147_signatureAppliedByDateLabel.Size = new System.Drawing.Size(17, 13); 156_requestSignerNameLabel.Size = new System.Drawing.Size(17, 13); 165_requestLocationLabel.Size = new System.Drawing.Size(17, 13); 173_requestedSignerNameTextBox.Size = new System.Drawing.Size(401, 20); 183_intentLabel.Size = new System.Drawing.Size(17, 13); 192_intentComboBox.Size = new System.Drawing.Size(401, 21); 211_mainDialogTableLayoutPanel.Size = new System.Drawing.Size(433, 273); 220ClientSize = new System.Drawing.Size(451, 282);
MS\Internal\Documents\RMEnrollmentPage1.Designer.cs (16)
69_panel1.Size = new System.Drawing.Size(398, 196); 80_flowLayoutPanel2.Size = new System.Drawing.Size(398, 153); 90_flowLayoutPanel3.Size = new System.Drawing.Size(353, 111); 104_flowLayoutPanel4.Size = new System.Drawing.Size(198, 89); 112_label1.MaximumSize = new System.Drawing.Size(400, 0); 114_label1.Size = new System.Drawing.Size(392, 13); 122_label2.MaximumSize = new System.Drawing.Size(400, 0); 124_label2.Size = new System.Drawing.Size(0, 0); 132_label3.MaximumSize = new System.Drawing.Size(400, 0); 134_label3.Size = new System.Drawing.Size(165, 13); 142_privacyLabel.MaximumSize = new System.Drawing.Size(400, 0); 144_privacyLabel.Size = new System.Drawing.Size(89, 13); 154_instructionlabel.Size = new System.Drawing.Size(140, 13); 162_panel2.Size = new System.Drawing.Size(13, 105); 170_pictureBox.Size = new System.Drawing.Size(78, 75); 208ClientSize = new System.Drawing.Size(398, 196);
MS\Internal\Documents\RMEnrollmentPage2.Designer.cs (14)
69this._flowLayoutPanel1.Size = new System.Drawing.Size(548, 43); 101this._flowLayoutPanel2.Size = new System.Drawing.Size(548, 326); 110this._label1.Size = new System.Drawing.Size(322, 13); 122this._flowLayoutPanel3.Size = new System.Drawing.Size(528, 38); 131this._pictureBox1.Size = new System.Drawing.Size(16, 16); 140this._label2.MaximumSize = new System.Drawing.Size(490, 0); 142this._label2.Size = new System.Drawing.Size(490, 26); 157this._tableLayoutPanel1.MinimumSize = new System.Drawing.Size(488, 0); 164this._tableLayoutPanel1.Size = new System.Drawing.Size(488, 234); 173this._networkRadioButton.Size = new System.Drawing.Size(126, 17); 184this._pictureBox2.Size = new System.Drawing.Size(100, 50); 193this._passportRadioButton.Size = new System.Drawing.Size(132, 17); 203this._pictureBox4.Size = new System.Drawing.Size(100, 50); 213this.ClientSize = new System.Drawing.Size(548, 369);
MS\Internal\Documents\RMEnrollmentPage3.Designer.cs (7)
60this.tableLayoutPanel1.Size = new System.Drawing.Size(419, 218); 70this.flowLayoutPanel2.Size = new System.Drawing.Size(413, 27); 79this.label2.Size = new System.Drawing.Size(245, 13); 95this.tableLayoutPanel2.Size = new System.Drawing.Size(413, 135); 105this.label3.Size = new System.Drawing.Size(115, 13); 114this.progressBar1.Size = new System.Drawing.Size(100, 14); 123this.ClientSize = new System.Drawing.Size(419, 218);
MS\Internal\Documents\RMPermissions.Designer.cs (1)
187this.ClientSize = new System.Drawing.Size(196, 155);
MS\Internal\Documents\RMPublishingDialog.cs (2)
510new System.Drawing.Size(totalPadding, totalPadding)); 923System.Drawing.Size imageButtonSize = new System.Drawing.Size(
MS\Internal\Documents\RMPublishingDialog.Designer.cs (14)
93this.radioButtonUnrestricted.Size = new System.Drawing.Size(85, 17); 102this.radioButtonPermissions.Size = new System.Drawing.Size(85, 17); 111this.radioButtonTemplate.Size = new System.Drawing.Size(85, 17); 124this.groupBoxMainContent.Size = new System.Drawing.Size(650, 270); 165this.textBoxUnrestrictedText.Size = new System.Drawing.Size(625, 230); 181this.comboBoxTemplates.Size = new System.Drawing.Size(350, 21); 205this.textBoxUserName.MinimumSize = new System.Drawing.Size(326, 20); 242this.rightsTable.Size = new System.Drawing.Size(635, 150); 268this.textBoxPermissionsContact.Size = new System.Drawing.Size(612, 20); 307this.flowLayoutPanelActions.Size = new System.Drawing.Size(541, 29); 316this.buttonCancel.Size = new System.Drawing.Size(75, 23); 323this.buttonSave.Size = new System.Drawing.Size(75, 23); 330this.buttonSaveAs.Size = new System.Drawing.Size(75, 23); 374this.ClientSize = new System.Drawing.Size(554, 431);
MS\Internal\Documents\SignatureSummaryDialog.cs (12)
237nameHeader.MinimumSize = new Size(IconWidth + SummaryNameTextWidth, 0); 238nameHeader.MaximumSize = new Size(IconWidth + SummaryNameTextWidth, 0); 246intentHeader.MinimumSize = new Size(IntentTextWidth, 0); 247intentHeader.MaximumSize = new Size(IntentTextWidth, 0); 255locationHeader.MinimumSize = new Size(LocaleTextWidth, 0); 256locationHeader.MaximumSize = new Size(LocaleTextWidth, 0); 264signByHeader.MinimumSize = new Size(SignByTextWidth, 0); 265signByHeader.MaximumSize = new Size(SignByTextWidth, 0); 281statusHeader.MaximumSize = new Size(IconWidth + SummaryNameTextWidth,0); 282statusHeader.MinimumSize = new Size(IconWidth + SummaryNameTextWidth, 0); 290intentHeader.MinimumSize = new Size(IntentTextWidth, 0); 291intentHeader.MaximumSize = new Size(IntentTextWidth, 0);
MS\Internal\Documents\SignatureSummaryDialog.Designer.cs (12)
59_buttonDone.Size = new System.Drawing.Size(75, 23); 82_flowpanelMiddleControls.Size = new System.Drawing.Size(335, 49); 95_flowpanelBottomControls.Size = new System.Drawing.Size(335, 49); 102_buttonSign.Size = new System.Drawing.Size(75, 23); 112_buttonViewCert.Size = new System.Drawing.Size(75, 23); 122_buttonRequestDelete.Size = new System.Drawing.Size(75, 23); 130_buttonRequestAdd.Size = new System.Drawing.Size(75, 23); 143_columnHeaderPanel.Size = new System.Drawing.Size(600, 25); 154_listBoxSummary.Size = new System.Drawing.Size(600, 217); 170_listboxMainPanel.Size = new System.Drawing.Size(602, 272); 179_listboxItemPanel.Size = new System.Drawing.Size(600, 217); 210MinimumSize = new System.Drawing.Size(629, 378);
MS\Internal\Documents\SigningDialog.Designer.cs (16)
66_userInputFlowPanel.Size = new System.Drawing.Size(475, 195); 95_signatureControlInputLayoutTable.Size = new System.Drawing.Size(466, 173); 103_addDigSigCheckBox.Size = new System.Drawing.Size(15, 14); 113_signerlabel.Size = new System.Drawing.Size(0, 0); 123_addDocPropCheckBox.Size = new System.Drawing.Size(15, 14); 132_reasonLabel.Size = new System.Drawing.Size(0, 0); 141_reasonComboBox.Size = new System.Drawing.Size(460, 21); 151_actionlabel.Size = new System.Drawing.Size(0, 0); 160_locationLabel.Size = new System.Drawing.Size(0, 0); 168_locationTextBox.Size = new System.Drawing.Size(460, 20); 190_buttonflowLayoutPanel.Size = new System.Drawing.Size(475, 17); 203_cancelButton.Size = new System.Drawing.Size(36, 6); 217_signButton.Size = new System.Drawing.Size(36, 6); 231_signSaveAsButton.Size = new System.Drawing.Size(36, 6); 249_mainLayoutTable.Size = new System.Drawing.Size(481, 292); 259ClientSize = new System.Drawing.Size(492, 303);
ScratchProject (1)
Form1.Designer.cs (1)
36this.ClientSize = new System.Drawing.Size(800, 450);
ScratchProjectWithInternals (1)
Form1.Designer.cs (1)
36this.ClientSize = new System.Drawing.Size(800, 450);
System.ComponentModel.TypeConverter (2)
System\Drawing\SizeConverter.cs (2)
53return new Size(values[0], values[1]); 105return new Size((int)width, (int)height);
System.Drawing.Common.Tests (84)
mono\System.Drawing\GraphicsTests.cs (4)
2088rect.Size = new Size(1, 20); 2105rect.Size = new Size(1, 20); 2876Rectangle arcrect = new(baserect.Location, new Size(d, d)); 2918Rectangle arcrect = new(baserect.Location, new Size(d, d));
System\Drawing\BitmapTests.cs (5)
224AssertExtensions.Throws<ArgumentException>(null, () => new Bitmap(new Bitmap(1, 1), new Size(width, 1))); 239AssertExtensions.Throws<ArgumentException>(null, () => new Bitmap(new Bitmap(1, 1), new Size(1, height))); 332using Bitmap bitmap = new(image, new Size(width, height)); 342AssertExtensions.Throws<ArgumentNullException>("original", "image", () => new Bitmap(null, new Size(1, 2))); 354AssertExtensions.Throws<ArgumentException>(null, () => new Bitmap(image, new Size(1, 1)));
System\Drawing\BufferedGraphicsContextTests.cs (7)
14Assert.Equal(new Size(225, 96), context.MaximumBuffer); 187context.MaximumBuffer = new Size(10, 10); 188Assert.Equal(new Size(10, 10), context.MaximumBuffer); 190context.MaximumBuffer = new Size(255, 255); 191Assert.Equal(new Size(255, 255), context.MaximumBuffer); 200AssertExtensions.Throws<ArgumentException>("value", null, () => context.MaximumBuffer = new Size(width, 1)); 209AssertExtensions.Throws<ArgumentException>("value", null, () => context.MaximumBuffer = new Size(1, height));
System\Drawing\Drawing2D\GraphicsPathTests.cs (1)
2355path.AddRoundedRectangle(new Rectangle(10, 10, 20, 20), new(5, 5));
System\Drawing\GraphicsTests.cs (12)
1525yield return new object[] { 0, 0, 0, 0, new Size(0, 0) }; 1526yield return new object[] { int.MinValue, int.MinValue, 0, 0, new Size(1, 1) }; 1527yield return new object[] { int.MaxValue, int.MaxValue, 0, 0, new Size(1, 1) }; 1528yield return new object[] { int.MaxValue, int.MaxValue, 0, 0, new Size(1, 1) }; 1529yield return new object[] { 0, 0, -1, -1, new Size(1, 1) }; 1530yield return new object[] { 0, 0, int.MaxValue, int.MaxValue, new Size(1, 1) }; 1531yield return new object[] { 0, 0, 0, 0, new Size(-1, -1) }; 1560graphics.CopyFromScreen(sourceX, sourceY, destinationX, destinationY, new Size(width, height)); 1611graphics.CopyFromScreen(0, 0, 0, 0, new Size(1, 1), copyPixelOperation); 1622graphics.CopyFromScreen(Point.Empty, Point.Empty, new Size(1, 1), copyPixelOperation); 2974graphics.DrawRoundedRectangle(Pens.Red, new(0, 0, 10, 10), new(2, 2)); 2992graphics.FillRoundedRectangle(Brushes.Green, new(0, 0, 10, 10), new(2, 2));
System\Drawing\IconTests.cs (34)
43Assert.Equal(new Size(32, 32), icon.Size); 49yield return new object[] { "48x48_multiple_entries_4bit.ico", new Size(16, 16), new Size(16, 16) }; 50yield return new object[] { "48x48_multiple_entries_4bit.ico", new Size(-32, -32), new Size(16, 16) }; 51yield return new object[] { "48x48_multiple_entries_4bit.ico", new Size(32, 16), new Size(32, 32) }; 52yield return new object[] { "256x256_seven_entries_multiple_bits.ico", new Size(48, 48), new Size(48, 48) }; 53yield return new object[] { "256x256_seven_entries_multiple_bits.ico", new Size(0, 0), new Size(32, 32) }; 54yield return new object[] { "256x256_seven_entries_multiple_bits.ico", new Size(1, 1), new Size(256, 256) }; 57yield return new object[] { "10x16_one_entry_32bit.ico", new Size(16, 16), new Size(10, 16) }; 58yield return new object[] { "10x16_one_entry_32bit.ico", new Size(32, 32), new Size(11, 22) }; 61yield return new object[] { "256x256_one_entry_32bit.ico", new Size(0, 0), new Size(256, 256) }; 63yield return new object[] { "256x256_one_entry_32bit.ico", new Size(int.MaxValue, int.MaxValue), new Size(256, 256) }; 90AssertExtensions.Throws<ArgumentNullException>("path", () => new Icon((string)null, new Size(32, 32))); 101Assert.Equal(new Size(32, 32), icon.Size); 111Assert.Equal(new Size(32, 32), icon.Size); 147AssertExtensions.Throws<ArgumentNullException, ArgumentException>("stream", null, () => new Icon((Stream)null, new Size(32, 32))); 246AssertExtensions.Throws<ArgumentNullException, ArgumentException>("original", null, () => new Icon((Icon)null, new Size(32, 32))); 287Assert.Equal(new Size(32, 32), clone.Size); 340Assert.Equal(new Size(size, size), icon.Size); 345Assert.Equal(new Size(size, size), bitmap.Size); 671Assert.Equal(new Size(16, 16), icon2.Size); 687Assert.Equal(new Size(16, 16), icon2.Size); 693Assert.Equal(new Size(16, 16), icon3.Size); 751using Icon icon = new(stream, new Size(32, 32)); 754Assert.Equal(new Size(32, 32), bitmap.Size);
System\Drawing\ImageConverterTests.cs (1)
43Assert.Equal(new Size(32, 32), IconBitmap.Size);
System\Drawing\Printing\PrinterUnitConvertTests.cs (2)
122var converted = PrinterUnitConvert.Convert(new Size(100, 1000), fromUnit, toUnit); 123Assert.Equal(new Size(expectedX, expectedY), converted);
System\Drawing\TextureBrushTests.cs (4)
13yield return new object[] { new Bitmap(10, 10), PixelFormat.Format32bppPArgb, new Size(10, 10) }; 14yield return new object[] { new Metafile(Helpers.GetTestBitmapPath("telescope_01.wmf")), PixelFormat.Format32bppArgb, new Size(490, 654) }; 43Ctor_Bitmap(image, PixelFormat.Format32bppPArgb, new Size(11, 22)); 307Assert.Equal(new Size(10, 10), brush.Image.Size);
System\Drawing\ToolboxBitmapAttributeTests.cs (14)
16private static Size s_defaultSize = new(16, 16); 25yield return new object[] { null, new Size(0, 0) }; 26yield return new object[] { Helpers.GetTestBitmapPath("bitmap_173x183_indexed_8bit.bmp"), new Size(173, 183) }; 27yield return new object[] { Helpers.GetTestBitmapPath("48x48_multiple_entries_4bit.ico"), new Size(16, 16) }; 28yield return new object[] { Helpers.GetTestBitmapPath("invalid.ico"), new Size(0, 0) }; 63Assert.Equal(new Size(width, height), image.Size); 90Assert.Equal(new Size(width, height), image.Size); 102Assert.Equal(new Size(32, 32), image.Size); 107Assert.Equal(new Size(width, height), image.Size); 125Assert.Equal(new Size(173, 183), smallImage.Size); 128Assert.Equal(new Size(32, 32), largeImage.Size); 138Assert.Equal(new Size(32, 32), image.Size); 143Assert.Equal(new Size(173, 183), image.Size); 159Assert.Equal(new Size(width, height), image.Size);
System.Drawing.Primitives (9)
System\Drawing\Point.cs (1)
84public static explicit operator Size(Point p) => new Size(p.X, p.Y);
System\Drawing\Rectangle.cs (1)
74readonly get => new Size(Width, Height);
System\Drawing\Size.cs (7)
81public static Size operator /(Size left, int right) => new Size(unchecked(left.width / right), unchecked(left.height / right)); 151new Size(unchecked(sz1.Width + sz2.Width), unchecked(sz1.Height + sz2.Height)); 157new Size(unchecked((int)Math.Ceiling(value.Width)), unchecked((int)Math.Ceiling(value.Height))); 163new Size(unchecked(sz1.Width - sz2.Width), unchecked(sz1.Height - sz2.Height)); 168public static Size Truncate(SizeF value) => new Size(unchecked((int)value.Width), unchecked((int)value.Height)); 174new Size(unchecked((int)Math.Round(value.Width)), unchecked((int)Math.Round(value.Height))); 201new Size(unchecked(size.width * multiplier), unchecked(size.height * multiplier));
System.Private.Windows.Core (1)
System\Private\Windows\Core\Nrbf\SerializationRecordExtensions.cs (1)
148value = new Size(classInfo.GetInt32("width"), classInfo.GetInt32("height"));
System.Private.Windows.Core.TestUtilities (4)
CommonTestHelper.cs (4)
103data.Add(new Size(new Point(1, 1))); 104data.Add(new Size(1, 2)); 109data.Add(new Size(-1, 1)); 110data.Add(new Size(1, -1));
System.Windows.Forms (312)
System\Windows\Forms\ActiveX\AxHost.cs (2)
324return new Size(75, 23); 1123Size size = new(width, height);
System\Windows\Forms\ActiveX\Control.ActiveXImpl.cs (2)
1692Size size = new(HiMetricToPixel(pSizel->Width, pSizel->Height)); 1703Size adjusted = new(size.Width, size.Height);
System\Windows\Forms\Control.cs (5)
413Size = new Size(width, height); 1176get => new(_clientWidth, _clientHeight); 3013get => new(_width, _height); 5199Size = LayoutUtils.IntersectSizes(new Size(proposedWidth, proposedHeight), maximumSize) 10139Size = SizeFromClientSizeInternal(new(x, y));
System\Windows\Forms\Controls\Buttons\Button.cs (4)
31private Size _systemSize = new(InvalidDimensionValue, InvalidDimensionValue); 214_systemSize = new Size(InvalidDimensionValue, InvalidDimensionValue); 249_systemSize = new Size(InvalidDimensionValue, InvalidDimensionValue); 260_systemSize = new Size(InvalidDimensionValue, InvalidDimensionValue);
System\Windows\Forms\Controls\Buttons\ButtonBase.cs (1)
255protected override Size DefaultSize => new(75, 23);
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonBaseAdapter.LayoutOptions.cs (6)
121return new Size( 152return new Size( 196Size bordersAndPadding = new(linearBorderAndPadding, linearBorderAndPadding); 201Size checkSize = checkSizeLinear > 0 ? new(checkSizeLinear + 1, checkSizeLinear) : Size.Empty; 204Size textImageInsetSize = new(TextImageInset * 2, TextImageInset * 2); 499size = new Size(size.Width + 1, size.Height + 1);
System\Windows\Forms\Controls\Buttons\CheckBox.cs (1)
251protected override Size DefaultSize => new(104, 24);
System\Windows\Forms\Controls\Buttons\CheckBoxRenderer.cs (2)
236return new Size(13, 13); 252return new Size(13, 13);
System\Windows\Forms\Controls\Buttons\RadioButton.cs (1)
219protected override Size DefaultSize => new(104, 24);
System\Windows\Forms\Controls\Buttons\RadioButtonRenderer.cs (1)
265return new Size(13, 13);
System\Windows\Forms\Controls\ComboBox\ComboBox.cs (5)
381return new Size(121, PreferredHeight); 663set => base.MaximumSize = new Size(value.Width, 0); 669set => base.MinimumSize = new Size(value.Width, 0); 774Size textSize = TextRenderer.MeasureText(LayoutUtils.TestString, Font, new Size(short.MaxValue, (int)(FontHeight * 1.25)), TextFormatFlags.SingleLine); 785Size textSize = TextRenderer.MeasureText(LayoutUtils.TestString, Font, new Size(short.MaxValue, (int)(FontHeight * 1.25)), TextFormatFlags.SingleLine);
System\Windows\Forms\Controls\ComboBox\ComboBox.FlatComboAdapter.cs (1)
35_outerBorder = new Rectangle(_clientRect.Location, new Size(_clientRect.Width - 1, _clientRect.Height - 1));
System\Windows\Forms\Controls\DataGridView\DataGridView.cs (1)
2110protected override Size DefaultSize => new(240, 150);
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (5)
9022return new Size(preferredWidth, preferredHeight); 18821Invalidate(new Rectangle(new Point(-pt.X, ColumnHeadersHeight), new Size(-step, ClientSize.Height))); 18832new Size(step, ClientSize.Height))); 18839new Size(-step, ClientSize.Width))); 18846new Size(ClientSize.Width, ClientSize.Height - (pt.Y - rect.Bottom) - step)));
System\Windows\Forms\Controls\DataGridView\DataGridViewButtonCell.cs (5)
287return new Size(-1, -1); 326preferredSize = new Size( 337preferredSize = new Size( 350preferredSize = new Size( 361preferredSize = new Size(
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (14)
1287ScaleHelper.GetIconResourceAsBitmap(typeof(DataGridViewCell), bitmapName, new Size(s_iconsWidth, s_iconsHeight)); 2290return GetPreferredSize(screen, dataGridViewCellStyle, rowIndex, new Size(width, 0)).Height; 2297return new Size(-1, -1); 2309Size constraintSize) => new(-1, -1); 2345return GetPreferredSize(screen, dataGridViewCellStyle, rowIndex, new Size(0, height)).Width; 2352return new Size(-1, -1); 2362return new Size(OwningColumn.Thickness, OwningRow.GetHeight(rowIndex)); 2552Size requiredSize = TextRenderer.MeasureText(text, font, new Size(maxWidth, int.MaxValue), flags); 2576return new Size(0, 0); 2591textSize = TextRenderer.MeasureText(text, font, new Size((int)maxWidth, int.MaxValue), flags); 2620return TextRenderer.MeasureText(text, font, new Size(int.MaxValue, int.MaxValue), flags); 2647textSize = TextRenderer.MeasureText(text, font, new Size((int)maxWidth, maxHeight), flags); 3772DataGridView.EditingControl.Size = new Size(editingControlBounds.Width, editingControlBounds.Height); 3858DataGridView.EditingPanel.Size = new Size(wEditingPanel, hEditingPanel);
System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxCell.cs (8)
643return new Size(-1, -1); 676preferredSize = new Size(checkBoxSize.Width + borderAndPaddingWidths + 2 * DATAGRIDVIEWCHECKBOXCELL_margin, 0); 682preferredSize = new Size(0, checkBoxSize.Height + borderAndPaddingHeights + 2 * DATAGRIDVIEWCHECKBOXCELL_margin); 688preferredSize = new Size(checkBoxSize.Width + borderAndPaddingWidths + 2 * DATAGRIDVIEWCHECKBOXCELL_margin, 708preferredSize = new Size(checkBoxSize + borderAndPaddingWidths, 0); 714preferredSize = new Size(0, checkBoxSize + borderAndPaddingHeights); 720preferredSize = new Size(checkBoxSize + borderAndPaddingWidths, checkBoxSize + borderAndPaddingHeights); 1194checkBoxSize = new Size(SystemInformation.Border3DSize.Width * 2 + 9, SystemInformation.Border3DSize.Width * 2 + 9);
System\Windows\Forms\Controls\DataGridView\DataGridViewColumnHeaderCell.cs (10)
486return new Size(-1, -1); 511preferredSize = new Size(0, 0); 516preferredSize = new Size( 527preferredSize = new Size( 557preferredSize = new Size(0, 0); 563glyphSize = new Size(s_sortGlyphWidth + 2 * s_sortGlyphHorizontalMargin, 583preferredSize = new Size( 598preferredSize = new Size( 612preferredSize = new Size( 651preferredSize = new Size(0, 0);
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.cs (2)
537Size adjustedSize = new(size.Width - borderAndPaddingWidths.X - borderAndPaddingWidths.Width, 1170return new Size(-1, -1);
System\Windows\Forms\Controls\DataGridView\DataGridViewHeaderCell.cs (4)
349return new Size(-1, -1); 357return new Size(OwningColumn.Thickness, DataGridView.ColumnHeadersHeight); 370return new Size(DataGridView.RowHeadersWidth, OwningRow.GetHeight(rowIndex)); 377return new Size(DataGridView.RowHeadersWidth, DataGridView.ColumnHeadersHeight);
System\Windows\Forms\Controls\DataGridView\DataGridViewImageCell.cs (10)
403return new Size(-1, -1); 435preferredSize = new Size(0, Math.Min(img.Height, decimal.ToInt32((decimal)img.Height * imgWidthAllowed / img.Width))); 447preferredSize = new Size(0, Math.Min(ico.Height, decimal.ToInt32((decimal)ico.Height * icoWidthAllowed / ico.Width))); 453preferredSize = new Size(0, 1); 470preferredSize = new Size(Math.Min(img.Width, decimal.ToInt32((decimal)img.Width * imgHeightAllowed / img.Height)), 0); 482preferredSize = new Size(Math.Min(ico.Width, decimal.ToInt32((decimal)ico.Width * icoHeightAllowed / ico.Height)), 0); 488preferredSize = new Size(1, 0); 495preferredSize = new Size(img.Width, img.Height); 499preferredSize = new Size(ico.Width, ico.Height); 503preferredSize = new Size(1, 1);
System\Windows\Forms\Controls\DataGridView\DataGridViewLinkCell.cs (5)
544return new Size(-1, -1); 574preferredSize = new Size( 587preferredSize = new Size( 616preferredSize = new Size( 624preferredSize = new Size(
System\Windows\Forms\Controls\DataGridView\DataGridViewRowHeaderCell.cs (3)
84ScaleHelper.GetIconResourceAsBitmap(typeof(DataGridViewHeaderCell), iconName, new Size(s_iconsWidth, s_iconsHeight)); 514return new Size(-1, -1); 851Size maxBounds = new(valBounds.Width - s_iconsWidth - 2 * RowHeaderIconMarginWidth, valBounds.Height);
System\Windows\Forms\Controls\DataGridView\DataGridViewTextBoxCell.cs (6)
396return new Size(-1, -1); 420preferredSize = new Size( 433preferredSize = new Size( 462preferredSize = new Size( 470preferredSize = new Size( 799DataGridView.EditingControl.Size = new Size(editingControlBounds.Width, editingControlBounds.Height);
System\Windows\Forms\Controls\DataGridView\DataGridViewTopLeftHeaderCell.cs (1)
140return new Size(-1, -1);
System\Windows\Forms\Controls\DataGridView\DataGridViewUtilities.cs (5)
202return new Size(preferredWidth, 0); 255return new Size(0, Math.Max(minHeightIcon, minHeightContent) + borderAndPaddingHeights); 278preferredSize = new Size(0, 1); 322Size sizeRequired = TextRenderer.MeasureText(text, font, new Size(int.MaxValue, int.MaxValue), flags); 329Size sizeCell = new(cellBounds.Width, cellBounds.Height);
System\Windows\Forms\Controls\DateTimePicker\DateTimePicker.cs (2)
452protected override Size DefaultSize => new(200, PreferredHeight); 1024return new Size(width, height);
System\Windows\Forms\Controls\GroupBox\GroupBox.cs (3)
137protected override Size DefaultSize => new(200, 100); 515textSize = hdc.HDC.MeasureText(Text, hfont, new Size(textRectangle.Width, int.MaxValue), (TextFormatFlags)flags); 603Size totalPadding = borderSize + new Size(0, _fontHeight) + Padding.Size;
System\Windows\Forms\Controls\GroupBox\GroupBoxRenderer.cs (2)
185new Size(textBounds.Width, textBounds.Height), 288new Size(textBounds.Width, textBounds.Height),
System\Windows\Forms\Controls\ImageList\ImageList.cs (3)
27private static readonly Size s_defaultImageSize = new(16, 16); 169_imageSize = new Size(value.Width, value.Height); 217_imageSize = new Size(x, y);
System\Windows\Forms\Controls\Labels\Label.cs (4)
318protected override Size DefaultSize => new(100, AutoSize ? PreferredHeight : 23); 839Size preferredSize = (AutoSize) ? PreferredSize : new Size(saveWidth, saveHeight); 1024bordersAndPadding += new Size(2, 2); 1272Size preferredSize = GetPreferredSize(new Size(clientRect.Width, clientRect.Height));
System\Windows\Forms\Controls\Labels\LinkLabel.cs (2)
557Size clientSize = new(clientRectWithPadding.Width, clientRectWithPadding.Height); 987Size preferredSize = GetPreferredSize(new Size(clientRect.Width, clientRect.Height));
System\Windows\Forms\Controls\ListBoxes\ListBox.cs (4)
380return new Size(120, 96); 604Size = new Size(oldSize.Width + 1, oldSize.Height); 768width = SizeFromClientSize(new Size(MaxItemWidth, height)).Width; 776return new Size(width, height) + Padding.Size;
System\Windows\Forms\Controls\ListView\ListView.cs (1)
750return new Size(121, 97);
System\Windows\Forms\Controls\ListView\ListViewItem.IKeyboardToolTip.cs (3)
103_ => new Rectangle(point, new Size(itemBounds.Width, itemBounds.Height)), 114new Size(Math.Min(TextRenderer.MeasureText(item.Text, item.Font).Width, itemBounds.Width), 131return new Rectangle(point, new Size(Math.Min(textWidth, itemBounds.Width), itemBounds.Height));
System\Windows\Forms\Controls\Menus\MenuStrip.cs (2)
68ScaleHelper.ScaleToDpi(new Size(200, 24), DeviceDpi) : 69new Size(200, 24);
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.cs (5)
84private static readonly Size s_defaultSingleMonthSize = new(176, 153); 98private Size _dimensions = new(1, 1); 808return new Size(rect.right, rect.bottom); 1606private void ResetCalendarDimensions() => CalendarDimensions = new Size(1, 1); 1904=> !_dimensions.Equals(new Size(1, 1));
System\Windows\Forms\Controls\PictureBox\PictureBox.cs (1)
223protected override Size DefaultSize => new(100, 50);
System\Windows\Forms\Controls\ProgressBar\ProgressBar.cs (1)
181protected override Size DefaultSize => new(100, 23);
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.cs (3)
98private static readonly Size s_defaultLargeButtonSize = new(32, 32); 99private static readonly Size s_defaultNormalButtonSize = new(16, 16); 546protected override Size DefaultSize => new(130, 130);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridErrorDialog.cs (11)
130Size = new(208, 43), 138Size = new(64, 64), 151Size = new(100, 23), 163Size = new(75, 23), 176Size = new(75, 23), 190Size = new(290, 29), 213Size = new(284, 73), 230Size = new(290, 108), 231MinimumSize = new(279, 50), 255Size = new(273, 100), 269ClientSize = new(299, 113);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\HelpPane.cs (2)
54Size = new(LogicalToDeviceUnits(LogicalDefaultWidth), LogicalToDeviceUnits(LogicalDefaultHeight)); 70Size = new(Width, 1 + value * _lineHeight);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (8)
255? new Size(SystemInformation.VerticalScrollBarArrowHeightForDpi(_deviceDpi), RowHeight) 256: new Size(SystemInformation.VerticalScrollBarArrowHeight, RowHeight); 938Size size = new(width, height); 1968Size sizeWindow = new(rect.Width, rect.Height); 4322? new Size(SystemInformation.VerticalScrollBarArrowHeightForDpi(_deviceDpi), RowHeight) 4323: new Size(SystemInformation.VerticalScrollBarArrowHeight, RowHeight); 5138_dropDownButton.Size = new(SystemInformation.VerticalScrollBarArrowHeightForDpi(_deviceDpi), RowHeight); 5142_dropDownButton.Size = new(SystemInformation.VerticalScrollBarArrowHeight, RowHeight);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.DropDownHolder.cs (3)
41new(SystemInformation.VerticalScrollBarWidth * 4, SystemInformation.HorizontalScrollBarHeight * 4); 297Size newSize = new(2 * DropDownHolderBorder + _currentControl.Width, 2 * DropDownHolderBorder + _currentControl.Height); 600Size size = new(2 * DropDownHolderBorder + control.Width, 2 * DropDownHolderBorder + control.Height);
System\Windows\Forms\Controls\RichTextBox\RichTextBox.cs (1)
350protected override Size DefaultSize => new(100, 96);
System\Windows\Forms\Controls\Splitter\Splitter.cs (1)
97return new Size(DefaultWidth, DefaultWidth);
System\Windows\Forms\Controls\TabControl\TabControl.cs (2)
232return new Size(200, 100); 1521Size = new Size(size.Width + 1, size.Height);
System\Windows\Forms\Controls\TextBox\TextBoxBase.cs (2)
486return new Size(100, PreferredHeight); 825bordersAndPadding += new Size(0, 3);
System\Windows\Forms\Controls\ToolStrips\StatusStrip.cs (1)
66return new Size(200, 22);
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (7)
27private static Size s_onePixel = new(1, 1); 124_imageScalingSize = new Size(s_iconSize, s_iconSize); 541? ScaleHelper.ScaleToDpi(new Size(100, 25), DeviceDpi) 542: new Size(100, 25); 3769_imageScalingSize = new Size(s_iconSize, s_iconSize); 4026CommonProperties.SetMinimumSize(this, new Size(-1, -1)); 4462Size invalidDefaultSize = new(-1, -1);
System\Windows\Forms\Controls\ToolStrips\ToolStripComboBox.cs (1)
105protected override Size DefaultSize => new(100, 22);
System\Windows\Forms\Controls\ToolStrips\ToolStripContainer.cs (1)
234return new Size(150, 175);
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownButton.ToolStripDropDownButtonInternalLayout.cs (1)
13private static readonly Size s_logicalDropDownArrowSize = new(5, 3);
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownMenu.cs (2)
339maxArrowSize = new Size(_arrowSize, _maxItemSize.Height); 591_defaultImageSize = new(defaultImageSize, defaultImageSize);
System\Windows\Forms\Controls\ToolStrips\ToolStripGrip.cs (2)
82preferredSize = new Size(ParentInternal.Width, GripThickness); 86preferredSize = new Size(GripThickness, ParentInternal.Height);
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (2)
681ScaleHelper.ScaleToDpi(new Size(23, 23), DeviceDpi) : 682new Size(23, 23);
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.ToolStripItemInternalLayout.cs (1)
20private static readonly Size s_invalidSize = new(int.MinValue, int.MinValue);
System\Windows\Forms\Controls\ToolStrips\ToolStripMenuItem.cs (3)
53private static readonly Size s_checkMarkBitmapSize = new(16, 16); 215? ScaleHelper.ScaleToDpi(new Size(32, 19), DeviceDpi) 216: new Size(32, 19);
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelRow.cs (1)
343return new Size(_minAllowedWidth, _minAllowedWidth);
System\Windows\Forms\Controls\ToolStrips\ToolstripProfessionalRenderer.cs (2)
21private static readonly Size s_onePix = new(1, 1); 861Rectangle bottomLeftParentHorizontalPixels = new(bottomLeft, new Size(2, 1));
System\Windows\Forms\Controls\ToolStrips\ToolStripProgressBar.cs (2)
75return new Size(100, 15); 240Size = new Size(100, 15)
System\Windows\Forms\Controls\ToolStrips\ToolStripScrollButton.cs (1)
15private static readonly Size s_defaultBitmapSize = new(16, 16);
System\Windows\Forms\Controls\ToolStrips\ToolStripSeparator.cs (5)
54protected override Size DefaultSize => new(SeparatorThickness, SeparatorThickness); 263return new Size(SeparatorThickness, SeparatorThickness); 268return new Size(parent.Width - (parent.Padding.Horizontal - dropDownMenu.ImageMargin.Width), SeparatorThickness); 282return new Size(SeparatorThickness, constrainingSize.Height); 285return new Size(constrainingSize.Width, SeparatorThickness);
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitButton.cs (2)
301Rectangle dropDownButtonBounds = new(Point.Empty, new Size(Math.Min(Width, DropDownButtonWidth), Height)); 307Rectangle splitButtonButtonBounds = new(Point.Empty, new Size(splitButtonButtonWidth, splitButtonButtonHeight));
System\Windows\Forms\Controls\ToolStrips\ToolStripStatusLabel.cs (1)
181return base.GetPreferredSize(constrainingSize) + new Size(4, 4);
System\Windows\Forms\Controls\ToolStrips\ToolStripTextBox.cs (2)
77protected override Size DefaultSize => new Size(100, 22); 93return new Size(bounds.Width, TextBox.PreferredHeight);
System\Windows\Forms\Controls\TrackBar\TrackBar.cs (1)
202protected override Size DefaultSize => new(104, PreferredDimension);
System\Windows\Forms\Controls\TreeView\TreeView.cs (3)
90s_stateImageSize = new(imageSize, imageSize); 415protected override Size DefaultSize => new(121, 97); 2830bounds = new Rectangle(textLoc, new Size(textSize.Width, bounds.Height));
System\Windows\Forms\Controls\UpDown\DomainUpDown.cs (2)
519width = SizeFromClientSizeInternal(new(width, height)).Width + _upDownButtons.Width; 520return new Size(width, height) + Padding.Size;
System\Windows\Forms\Controls\UpDown\NumericUpDown.cs (2)
829int width = SizeFromClientSizeInternal(new(textWidth, height)).Width + _upDownButtons.Width; 830return new Size(width, height) + Padding.Size;
System\Windows\Forms\Controls\UpDown\UpDownBase.cs (5)
62_upDownButtons.Size = new Size(_defaultButtonsWidth, PreferredHeight); 246protected override Size DefaultSize => new(DefaultControlWidth, PreferredHeight); 286set => base.MaximumSize = new Size(value.Width, 0); 292set => base.MinimumSize = new Size(value.Width, 0); 850upDownEditBounds.Size = new Size(clientArea.Width - _defaultButtonsWidth, clientArea.Height);
System\Windows\Forms\Controls\WebBrowser\HtmlWindow.cs (1)
197return new(offsetWidth, offsetHeight);
System\Windows\Forms\Controls\WebBrowser\WebBrowser.cs (1)
1126protected override Size DefaultSize => new(250, 250);
System\Windows\Forms\Controls\WebBrowser\WebBrowserBase.cs (2)
1084Size sz = new(width, height); 1191protected override Size DefaultSize => new(75, 23);
System\Windows\Forms\Design\ComponentEditorForm.cs (4)
184ImageSize = new Size(16, 16) 253Size size = new(bounds.Width + 3 * (BUTTON_PAD + xFrame) + selectorWidth, 306AutoScaleBaseSize = new Size(5, 14); 341_maxSize = new Size(3 * (BUTTON_WIDTH + BUTTON_PAD), 24 * _pageTypes.Length);
System\Windows\Forms\Dialogs\ThreadExceptionDialog.cs (3)
208Size textSize = new(_scaledMaxWidth - _scaledPaddingWidth, int.MaxValue); 253ClientSize = new Size(width, buttonTop + _scaledButtonTopPadding); 257_pictureBox.Size = new Size(_scaledPictureWidth * 3 / 4, _scaledPictureHeight * 3 / 4);
System\Windows\Forms\Form.cs (6)
449return new Size((int)Math.Round(real.Width), (int)Math.Round(real.Height)); 886protected override Size DefaultSize => new Size(300, 300); 1243Size = new Size(Math.Min(size.Width, value.Width), Math.Min(size.Height, value.Height)); 1360Size = new Size(Math.Max(size.Width, value.Width), Math.Max(size.Height, value.Height)); 2984Size newVar = new((int)Math.Round(newVarF.Width), (int)Math.Round(newVarF.Height)); 4480_dpiFormSizes.Add(e.DeviceDpiNew, new Size(e.SuggestedRectangle.Width, e.SuggestedRectangle.Height));
System\Windows\Forms\Internal\WinFormsUtils.cs (1)
82bounds.Size = new Size(Math.Min(constrainingBounds.Width - 2, bounds.Width),
System\Windows\Forms\Layout\CommonProperties.cs (6)
32internal static Size DefaultMinimumSize { get; } = new(0, 0); 33internal static Size DefaultMaximumSize { get; } = new(0, 0); 200Debug.Assert(value != GetMaximumSize(element, new Size(-7109, -7107)), 214Debug.Assert(GetMaximumSize(element, new Size(-7109, -7107)) == value, "Error detected setting MaximumSize."); 222Debug.Assert(value != GetMinimumSize(element, new Size(-7109, -7107)), 236Debug.Assert(GetMinimumSize(element, new Size(-7109, -7107)) == value, "Error detected setting MinimumSize.");
System\Windows\Forms\Layout\Containers\SplitContainer.cs (15)
328return new Size(150, 100); 1601Panel1.Size = new Size(0, Panel1.Height); 1602Panel2.Size = new Size(0, Panel2.Height); 1607Panel1.Size = new Size(Panel1.Width, 0); 1608Panel2.Size = new Size(Panel2.Width, 0); 1619Panel1.Size = new Size(_panelSize, Height); 1620Panel2.Size = new Size(Math.Max(Width - _panelSize - SplitterWidthInternal, Panel2MinSize), Height); 1625Panel2.Size = new Size(_panelSize, Height); 1640Panel2.Size = new Size(Math.Max(Width - _splitterDistance - SplitterWidthInternal, Panel2MinSize), Height); 1677Panel1.Size = new Size(Width, _panelSize); 1679Panel2.Size = new Size(Width, Math.Max(Height - panel2Start, Panel2MinSize)); 1685Panel2.Size = new Size(Width, _panelSize); 1704Panel2.Size = new Size(Width, Math.Max(Height - panel2Start, Panel2MinSize)); 2178Panel2.Size = new Size(Width - _splitterDistance - SplitterWidthInternal, Height); 2228Panel2.Size = new Size(Width, Height - panel2Start);
System\Windows\Forms\Layout\DefaultLayout.cs (4)
488Size neededSize = new( 539Size newSize = xGetDockedSize(element, /* constraints = */ new Size(remainingSize.Width, 1)); 556Size newSize = xGetDockedSize(element, /* constraints = */ new Size(1, remainingSize.Height)); 602preferredSize = new Size(-7103, -7105);
System\Windows\Forms\Layout\FlowLayout.cs (3)
187Size elementConstraints = new(int.MaxValue, rowBounds.Height - elementProxy.Margin.Size.Height); 197elementConstraints = LayoutUtils.UnionSizes(new Size(1, 1), elementConstraints); 226Rectangle cellBounds = new(location, new Size(requiredSize.Width, rowBounds.Height));
System\Windows\Forms\Layout\LayoutUtils.cs (6)
13public static readonly Size s_maxSize = new(int.MaxValue, int.MaxValue); 14public static readonly Size s_invalidSize = new(int.MinValue, int.MinValue); 50Size textSize = TextRenderer.MeasureText(obj.ToString(), font, new Size(short.MaxValue, short.MaxValue), TextFormatFlags.SingleLine); 207return new Size( 214return new Size( 356Size stretchedSize = new(
System\Windows\Forms\Layout\TableLayout.cs (7)
105Size containerSize = container.DisplayRectangle.Size - new Size(cellBorderWidth, cellBorderWidth); 119CommonProperties.SetLayoutBounds(containerInfo.Container, new Size(SumStrips(containerInfo.Columns, 0, containerInfo.Columns.Length), 162Size containerSize = container.DisplayRectangle.Size - new Size(cellBorderWidth * 2, cellBorderWidth * 2); 176Size cellBorderSize = new(cellBorderWidth, cellBorderWidth); 726minWidth = GetElementSize(element, new Size(0, constrainingHeight)).Width; 731minWidth = GetElementSize(element, new Size(1, 0)).Width; 856int minHeight = GetElementSize(element, new Size(currentWidth - margin.Horizontal, 0)).Height + margin.Vertical;
System\Windows\Forms\Panels\Panel.cs (1)
149protected override Size DefaultSize => new(200, 100);
System\Windows\Forms\Printing\PrintControllerWithStatusDialog.StatusDialog.cs (4)
40Size = new Size(240, 64), 47Size = ScaleHelper.ScaleToDpi(new Size(75, 23), ScaleHelper.InitialSystemDpi), 72AutoScaleDimensions = new Size(6, 13); 77ClientSize = ScaleHelper.ScaleToDpi(new Size(256, 122), ScaleHelper.InitialSystemDpi);
System\Windows\Forms\Printing\PrintPreviewControl.cs (7)
34private Size _virtualSize = new(1, 1); 60Size = new Size(100, 100); 491_imageSize = new Size((int)(_zoom * pageSize.Width), (int)(_zoom * pageSize.Height)); 494SetVirtualSizeNoInvalidate(PhysicalToPixels(new Size(virtualX, virtualY), _screenDPI)); 661_imageSize = new Size((int)(_zoom * pageSize.Width), (int)(_zoom * pageSize.Height)); 752new(PixelsToPhysical(pixels.Width, dpi.X), PixelsToPhysical(pixels.Height, dpi.Y)); 758new(PhysicalToPixels(physical.Width, dpi.X), PhysicalToPixels(physical.Height, dpi.Y));
System\Windows\Forms\Printing\PrintPreviewDialog.cs (4)
53base.AutoScaleBaseSize = new Size(5, 13); 381protected override Size DefaultMinimumSize => new(375, 250); 910_previewControl.Size = new Size(792, 610); 970ClientSize = new Size(400, 300);
System\Windows\Forms\Rendering\TextRenderer.cs (1)
23internal static Size MaxSize { get; } = new(int.MaxValue, int.MaxValue);
System\Windows\Forms\Scrolling\HScrollBar.cs (1)
24=> new(80, SystemInformation.HorizontalScrollBarHeight);
System\Windows\Forms\Scrolling\ScrollableControl.cs (1)
965_requestedScrollMargin = new Size(x, y);
System\Windows\Forms\Scrolling\VScrollBar.cs (2)
33return new Size(SystemInformation.GetVerticalScrollBarWidthForDpi(_deviceDpi), LogicalToDeviceUnits(DefaultHeight)); 36return new Size(SystemInformation.VerticalScrollBarWidth, DefaultHeight);
System\Windows\Forms\SystemInformation.cs (4)
595=> new(PInvokeCore.SystemParametersInfoInt(SPI_GETMOUSEHOVERWIDTH), 770? new Size(data.iSmCaptionWidth, data.iSmCaptionHeight) 785? new Size(data.iMenuWidth, data.iMenuHeight) 815=> new(PInvokeCore.GetSystemMetrics(x), PInvokeCore.GetSystemMetrics(y));
System\Windows\Forms\ToolTip\ToolTip.cs (1)
1542bubbleSize = new Size(result.LOWORD, result.HIWORD);
System\Windows\Forms\UserControl.cs (1)
184return new Size(150, 150);
System.Windows.Forms.Design (111)
System\ComponentModel\Design\BinaryEditor.BinaryUI.cs (2)
185_buttonOK.MinimumSize = new Size(75, 23); 195_buttonSave.MinimumSize = new Size(75, 23);
System\ComponentModel\Design\ByteViewer.cs (2)
442Size = new Size( 562Size = new Size(
System\ComponentModel\Design\CollectionEditor.SplitButton.cs (1)
64return preferredSize + new Size(PushButtonWidth, 0);
System\ComponentModel\Design\DesignerActionPanel.CheckBoxPropertyLine.cs (2)
36Size checkBoxPreferredSize = _checkBox.GetPreferredSize(new Size(int.MaxValue, int.MaxValue)); 43return checkBoxPreferredSize + new Size(LineLeftMargin + LineRightMargin, LineVerticalPadding);
System\ComponentModel\Design\DesignerActionPanel.cs (2)
117MinimumSize = new Size(150, 0); 391return new Size(panelWidth, yPos + BottomPadding);
System\ComponentModel\Design\DesignerActionPanel.EditorPropertyLine.cs (1)
178_button.Size = new Size(buttonHeight, buttonHeight);
System\ComponentModel\Design\DesignerActionPanel.MethodLine.cs (2)
45Size linkLabelSize = _linkLabel.GetPreferredSize(new Size(int.MaxValue, int.MaxValue)); 52return linkLabelSize + new Size(LineLeftMargin + LineRightMargin, LineVerticalPadding);
System\ComponentModel\Design\DesignerActionPanel.PanelHeaderLine.cs (3)
56Size titleSize = _titleLabel.GetPreferredSize(new Size(int.MaxValue, int.MaxValue)); 60subtitleSize = _subtitleLabel.GetPreferredSize(new Size(int.MaxValue, int.MaxValue)); 74return new Size(newWidth + 2, newHeight + 1);
System\ComponentModel\Design\DesignerActionPanel.SeparatorLine.cs (1)
24public override Size LayoutControls(int top, int width, bool measureOnly) => new(MinimumWidth, 1);
System\ComponentModel\Design\DesignerActionPanel.TextBoxPropertyLine.cs (6)
83return LineLeftMargin + _label.GetPreferredSize(new Size(int.MaxValue, int.MaxValue)).Width + TextBoxLineCenterMargin; 94int textBoxPreferredHeight = _textBox.GetPreferredSize(new Size(int.MaxValue, int.MaxValue)).Height; 107_editRegionSize = new Size(EditInputWidth + textBoxWidthBonus, textBoxPreferredHeight + TextBoxLineInnerPadding * 2); 110int labelPreferredWidth = _label.GetPreferredSize(new Size(int.MaxValue, int.MaxValue)).Width; 111_label.Size = new Size(labelPreferredWidth, height); 119return new Size(width, height);
System\ComponentModel\Design\DesignerActionPanel.TextLine.cs (2)
40Size labelSize = _label.GetPreferredSize(new Size(int.MaxValue, int.MaxValue)); 47return labelSize + new Size(LineLeftMargin + LineRightMargin, LineVerticalPadding);
System\ComponentModel\Design\DesignerActionUI.cs (1)
616if ((new Rectangle(glyphCoord, new Size(currentGlyph.Bounds.Width, currentGlyph.Bounds.Height))).Contains(point))
System\ComponentModel\Design\DesignerActionUI.DesignerActionToolStripDropDown.cs (1)
35Size panelSize = CurrentPanel.GetPreferredSize(new Size(150, int.MaxValue));
System\ComponentModel\Design\MultilineStringEditor.MultilineStringEditorUI.cs (3)
173ClientSize = new Size(ClientSize.Width + requestedDelta, MinimumSize.Height); 240_minimumSize = new Size( 366_watermarkSize = new Size((int)Math.Ceiling(size.Width), (int)Math.Ceiling(size.Height));
System\Drawing\Design\ColorEditor.ColorPalette.cs (1)
72Size = new Size(
System\Drawing\Design\ColorEditor.ColorUI.cs (1)
89Size = new Size(size.Width + 2 * CMARGIN, size.Height + 2 * CMARGIN + rectItemSize.Height);
System\Drawing\Design\ContentAlignmentEditor.ContentUI.cs (10)
221Size = new Size(pixel_125, pixel_89); 223_topLeft.Size = new Size(pixel_24, pixel_25); 226_topCenter.Size = new Size(pixel_59, pixel_25); 229_topRight.Size = new Size(pixel_24, pixel_25); 232_middleLeft.Size = new Size(pixel_24, pixel_25); 235_middleCenter.Size = new Size(pixel_59, pixel_25); 238_middleRight.Size = new Size(pixel_24, pixel_25); 241_bottomLeft.Size = new Size(pixel_24, pixel_25); 244_bottomCenter.Size = new Size(pixel_59, pixel_25); 247_bottomRight.Size = new Size(pixel_24, pixel_25);
System\Drawing\Design\ToolboxItem.cs (1)
607itemBitmap = new Bitmap(itemBitmap, new Size(s_iconWidth, s_iconHeight));
System\Windows\Forms\Design\AnchorEditor.AnchorUI.cs (6)
80_container.Size = new Size(90, 90); 84_control.Size = new Size(30, 30); 88_right.Size = new Size(30 - XBORDER, 10); 95_left.Size = new Size(30 - XBORDER, 10); 102_top.Size = new Size(10, 30 - YBORDER); 109_bottom.Size = new Size(10, 30 - YBORDER);
System\Windows\Forms\Design\Behavior\ContainerSelectorBehavior.cs (1)
177Size delta = new(Math.Abs(mouseLoc.X - InitialDragPoint.X), Math.Abs(mouseLoc.Y - InitialDragPoint.Y));
System\Windows\Forms\Design\Behavior\DesignerActionGlyph.cs (2)
102ScaleHelper.ScaleToDpi(new Size(IconSize, IconSize), ScaleHelper.InitialSystemDpi)); 107ScaleHelper.ScaleToDpi(new Size(IconSize, IconSize), ScaleHelper.InitialSystemDpi));
System\Windows\Forms\Design\ComponentTray.cs (1)
1721return new Size(8, 8);
System\Windows\Forms\Design\ControlCommandSet.cs (2)
644primaryControlsize += new Size(snappedOffset.X, snappedOffset.Y); 789size += new Size(moveOffsetX, offsetY);
System\Windows\Forms\Design\DataGridViewCellStyleBuilder.cs (2)
47_sampleDataGridViewSelected.Size = new Drawing.Size(100, Font.Height + 9); 48_sampleDataGridView.Size = new Drawing.Size(100, Font.Height + 9);
System\Windows\Forms\Design\DesignBindingPicker.cs (1)
455Size = new Size(
System\Windows\Forms\Design\DesignerOptions.cs (1)
16private Size _gridSize = new(8, 8);
System\Windows\Forms\Design\DesignerToolStripControlHost.cs (1)
32get => new(92, 22);
System\Windows\Forms\Design\DesignerUtils.cs (3)
343AdornmentType.GrabHandle => new Size(s_handleSize, s_handleSize), 344AdornmentType.ContainerSelector or AdornmentType.Maximum => new Size(s_containerGrabHandleSize, s_containerGrabHandleSize), 345_ => new Size(0, 0),
System\Windows\Forms\Design\DockEditor.DockUI.cs (3)
191_none.Size = ScaleHelper.ScaleToDpi(new Size(LogicalNoneWidth, LogicalNoneHeight), dpi); 195_container.Size = ScaleHelper.ScaleToDpi(new Size(LogicalContainerSize, LogicalContainerSize), dpi); 197Size scaledButtonSize = ScaleHelper.ScaleToDpi(new Size(LogicalButtonSize, LogicalButtonSize), dpi);
System\Windows\Forms\Design\FormatControl.cs (5)
351thirdRowLabel.MaximumSize = new Drawing.Size(tableLayoutPanel1.Width, 0); 360tableLayoutPanel1.MinimumSize = new Drawing.Size(tableLayoutPanel1.Width, tableLayoutPanel1.Height); 384nullValueLabel.MinimumSize = new Drawing.Size(minWidth, minHeight); 385secondRowLabel.MinimumSize = new Drawing.Size(minWidth, minHeight); 409explanationLabel.Size = new Drawing.Size(formatGroupBox.Width - 10, 30);
System\Windows\Forms\Design\FormatControl.Designer.cs (4)
93sampleGroupBox.MinimumSize = new System.Drawing.Size(250, 38); 117secondRowLabel.MinimumSize = new System.Drawing.Size(81, 14); 123nullValueLabel.MinimumSize = new System.Drawing.Size(81, 14); 176MinimumSize = new System.Drawing.Size(390, 237);
System\Windows\Forms\Design\FormatStringDialog.cs (4)
177_formatControl1.Size = new Drawing.Size(376, 268); 184_cancelButton.Size = new Drawing.Size(87, 23); 194_okButton.Size = new Drawing.Size(87, 23); 204ClientSize = new Drawing.Size(396, 295);
System\Windows\Forms\Design\FormDocumentDesigner.cs (6)
66return new Size((int)Math.Round(real.Width), (int)Math.Round(real.Height)); 102return new Size(-1, -1); 106Size size = new(-1, -1); 269Size newVar = new((int)Math.Round(newVarF.Width), (int)Math.Round(newVarF.Height)); 443ClientSize = new Size(clientWidth, clientHeight); 483properties["ClientSize"] = TypeDescriptor.CreateProperty(typeof(FormDocumentDesigner), prop, new DefaultValueAttribute(new Size(-1, -1)));
System\Windows\Forms\Design\MaskDesignerDialog.cs (2)
190_btnOK.MinimumSize = new Drawing.Size(75, 23); 199_btnCancel.MinimumSize = new Drawing.Size(75, 23);
System\Windows\Forms\Design\MaskedTextBoxTextEditorDropDown.cs (1)
54Size = new Drawing.Size(100, 52);
System\Windows\Forms\Design\OleDragDropHandler.CfCodeToolboxItem.cs (1)
113defaultValues["Offset"] = new Size(childControl.Bounds.X - bounds.X, childControl.Bounds.Y - bounds.Y);
System\Windows\Forms\Design\OleDragDropHandler.cs (1)
193defaultValues["Size"] = new Size(width, height);
System\Windows\Forms\Design\ParentControlDesigner.cs (6)
218_gridSize = new Size(8, 8); 436Size offset = new(0, 0); 567prop?.SetValue(newChild, new Size(bounds.Width, bounds.Height)); 984return (new Size(75, 23)); 1301defaultValue = new Size(8, 8); 1861Size minControlSize = new(DesignerUtils.MinDragSize.Width * 2, DesignerUtils.MinDragSize.Height * 2);
System\Windows\Forms\Design\SelectionUIHandler.cs (2)
317minSize = new Size(1, 1); 484Size size = new(Math.Max(MinControlWidth, newBounds.Width), Math.Max(MinControlHeight, newBounds.Height));
System\Windows\Forms\Design\SelectionUIService.cs (3)
1205AdornmentType.GrabHandle => new Size(SelectionUIItem.GRABHANDLE_WIDTH, SelectionUIItem.GRABHANDLE_HEIGHT), 1206AdornmentType.ContainerSelector or AdornmentType.Maximum => new Size(ContainerSelectionUIItem.CONTAINER_WIDTH, ContainerSelectionUIItem.CONTAINER_HEIGHT), 1207_ => new Size(0, 0),
System\Windows\Forms\Design\ShortcutKeysEditor.ShortcutKeysUI.cs (1)
232Size = new Size(Size.Width + _resetButton.Size.Width - resetButtonSize.Width, Size.Height);
System\Windows\Forms\Design\StyleEditorForm.cs (5)
212_addButton.MinimumSize = new Size(75, 23); 220_removeButton.MinimumSize = new Size(75, 23); 228_insertButton.MinimumSize = new Size(75, 23); 247_okButton.MinimumSize = new Size(75, 23); 256_cancelButton.MinimumSize = new Size(75, 23);
System\Windows\Forms\Design\ToolStripEditorManager.cs (1)
142private void UpdateSize() => Size = new Size(_wrappedEditor.Size.Width, _wrappedEditor.Size.Height);
System\Windows\Forms\Design\ToolStripItemBehavior.cs (1)
972Size dragSize = new(1, 1);
System\Windows\Forms\Design\ToolStripTemplateNode.cs (2)
1683return new Size(Width, s_toolStripTempateHeight); 1687return new Size(Width, s_templateHeight);
System\Windows\Forms\Design\VsPropertyGrid.cs (1)
10private static readonly Size s_defaultIconSize = new(16, 16);
System.Windows.Forms.Design.Tests (35)
System\ComponentModel\Design\ByteViewerTests.cs (4)
44Assert.Equal(new Size(control.Width, control.Height), control.ClientSize); 63Assert.Equal(new Size(200, 100), control.DefaultSize); 102Assert.Equal(new Size(4, 4), control.PreferredSize); 116Assert.Equal(new Size(control.Width, control.Height), control.Size);
System\Drawing\Design\BitmapEditorTests.cs (2)
77Assert.Equal(new Size(10, 10), result.Size); 90Assert.Equal(new Size(490, 654), result.Size);
System\Drawing\Design\ImageEditorTests.cs (1)
134Assert.Equal(new Size(10, 10), result.Size);
System\Drawing\Design\MetafileEditorTests.cs (1)
69Assert.Equal(new Size(3096, 4127), result.Size);
System\Drawing\Design\ToolboxItemTests.cs (6)
1327yield return new object[] { typeof(ClassWithValidAttributes), new Size(16, 16) }; 1328yield return new object[] { typeof(ClassWithStretchedWidthImage), new Size(24, 16) }; 1329yield return new object[] { typeof(ClassWithStretchedHeightImage), new Size(16, 24) }; 1330yield return new object[] { typeof(ClassWithInvalidImage), new Size(16, 16) }; 1353if (expectedOriginalBitmapSize == new Size(10, 10)) 1360Assert.Equal(new Size(16, 16), item.Bitmap.Size);
System\Windows\Forms\Design\DesignerOptionsTests.cs (15)
15Assert.Equal(new Size(8, 8), options.GridSize); 45yield return new object[] { new Size(0, 0), new Size(2, 2) }; 46yield return new object[] { new Size(0, 2), new Size(2, 2) }; 47yield return new object[] { new Size(2, 0), new Size(2, 2) }; 48yield return new object[] { new Size(2, 2), new Size(2, 2) }; 49yield return new object[] { new Size(200, 200), new Size(200, 200) }; 50yield return new object[] { new Size(201, 200), new Size(200, 200) }; 51yield return new object[] { new Size(200, 201), new Size(200, 200) };
System\Windows\Forms\Design\ImageListActionListTests.cs (2)
54Size size = new(16, 16); 61Size size = new(32, 32);
System\Windows\Forms\Design\ImageListImageEditorTests.cs (2)
24Assert.Equal(new Size(10, 10), result.Size); 25Assert.Equal(new Size(10, 10), resultImage.Size);
System\Windows\Forms\Design\InheritedPropertyDescriptorTests.cs (1)
20control.Size = new Size(0, 120);
System\Windows\Forms\Design\WindowsFormsDesignerOptionServiceTests.cs (1)
18Assert.Equal(new Size(8, 8), options.GridSize);
System.Windows.Forms.Primitives (3)
System\Windows\Forms\Internals\ScaleHelper.cs (2)
303: new(ScaleToDpi(logicalSize.Width, dpi), ScaleToDpi(logicalSize.Height, dpi)); 305internal static Size SystemIconSize => new(
System\Windows\Forms\Padding.cs (1)
128public readonly Size Size => new(Horizontal, Vertical);
System.Windows.Forms.Tests (3332)
DpiHelperTests.cs (1)
24Size expected = new(
SerializableTypesTests.cs (1)
77ImageSize = new Size(16, 16),
System\Windows\Forms\AccessibleObjects\CheckedListBoxAccessibleObjectTests.cs (1)
16checkedListBox.Size = new Size(120, 100);
System\Windows\Forms\AccessibleObjects\ComboBox.ComboBoxItemAccessibleObjectTests.cs (7)
253comboBox.Size = new Size(100, 132); 305comboBox.Size = new Size(100, 132); 392comboBox.Size = new Size(100, 132); 396comboBox.Size = new Size(100, comboBox.Size.Height); 454comboBox.Size = new Size(100, 400); 458comboBox.Size = new Size(100, comboBox.Size.Height); 687comboBox.Size = new Size(100, 50);
System\Windows\Forms\AccessibleObjects\Control.ControlAccessibleObjectTests.cs (3)
1493using ToolStrip toolStrip = new() { Size = new Drawing.Size(1000, 25) }; 1527using ToolStrip toolStrip = new() { Size = new Drawing.Size(1000, 25) }; 1565using ToolStrip toolStrip = new() { Size = new Drawing.Size(1000, 25) };
System\Windows\Forms\AccessibleObjects\DataGridViewAccessibleObjectTests.cs (3)
147dataGridView.Size = new Size(500, 300); 170dataGridView.Size = new Size(500, 300); 324dataGridView.Size = new Size(200, 100);
System\Windows\Forms\AccessibleObjects\HScrollBar.HScrollBarAccessibleObjectTests.cs (1)
279Size = new Size(200, 50)
System\Windows\Forms\AccessibleObjects\HScrollBar.ScrollBarFirstLineButtonAccessibleObjectTests.cs (1)
343Size = new Size(500, 50)
System\Windows\Forms\AccessibleObjects\HScrollBar.ScrollBarFirstPageButtonAccessibleObjectTests.cs (1)
379Size = new Size(200, 50),
System\Windows\Forms\AccessibleObjects\HScrollBar.ScrollBarLastLineButtonAccessibleObjectTests.cs (1)
351Size = new Size(500, 50),
System\Windows\Forms\AccessibleObjects\HScrollBar.ScrollBarLastPageButtonAccessibleObjectTests.cs (1)
366Size = new Size(200, 50),
System\Windows\Forms\AccessibleObjects\HScrollBar.ScrollBarThumbAccessibleObjectTests.cs (1)
271Size = new Size(200, 50),
System\Windows\Forms\AccessibleObjects\ListVIew.ListViewAccessibleObjectTests.cs (3)
1189listView.Size = new Size(200, 200); 1215listView.Size = new Size(200, 200); 1749Size = new Size(expectedWidth, 150)
System\Windows\Forms\AccessibleObjects\ListViewGroup.ListViewGroupAccessibleObjectTests.cs (8)
138Size = new Size(200, 200) 208Size = new Size(200, 200) 371Size = new Size(200, 200) 466Size = new Size(200, 200) 502Size = new Size(200, 200) 584Size = new Size(200, 200) 1259Size = new Size(200, 200) 1426Size = new Size(200, 200)
System\Windows\Forms\AccessibleObjects\ListViewLabelEditAccessibleObjectTests.cs (1)
156Size = new Size(300, 200),
System\Windows\Forms\AccessibleObjects\MenuStrip.MenuStripAccessibleObjectTests.cs (33)
182Size horizontalSize = new(300, 30); 183Size verticalSize = new(30, 300); 198Size horizontalSize = new(300, 30); 199Size verticalSize = new(30, 300); 251Size horizontalSize = new(300, 30); 252Size verticalSize = new(30, 300); 291Size horizontalOverflowSize = new(10, 25); 292Size verticalOverflowSize = new(25, 10); 314Size horizontalOverflowSize = new(10, 25); 315Size verticalOverflowSize = new(25, 10); 336Size overflowSize = new(10, 10); 492Size horizontalSize = new(300, 30); 493Size verticalSize = new(30, 300); 509Size horizontalSize = new(300, 30); 510Size verticalSize = new(30, 300); 731Size horizontalOverflowSize = new(10, 25); 732Size verticalOverflowSize = new(25, 10); 757Size horizontalOverflowSize = new(60, 30); 758Size horizontalOverflowGripSize = new(70, 30); 759Size verticalOverflowSize = new(30, 30); 760Size verticalOverflowGripSize = new(30, 40); 761Size bothOverflowSize = new(25, 25); 796Size horizontalOverflowSize = new(60, 30); 797Size horizontalOverflowGripSize = new(70, 30); 798Size verticalOverflowSize = new(30, 55); 799Size verticalOverflowGripSize = new(30, 65); 800Size bothOverflowSize = new(28, 28); 839Size horizontalOverflowSize = new(60, 30); 840Size horizontalOverflowGripSize = new(70, 30); 841Size verticalOverflowSize = new(30, 70); 842Size verticalOverflowGripSize = new(30, 60); 873Size overflowSize = new(30, 40); 953Size = new Size(50, 25),
System\Windows\Forms\AccessibleObjects\MonthCalendar.CalendarAccessibleObjectTests.cs (5)
100control.Size = new Size(width, height); 138control.Size = new Size(450, 450); 285control.Size = new Size(450, 450); 348CalendarDimensions = new Size { Width = 2, Height = 2 } 390CalendarDimensions = new Size { Width = 2, Height = 2 }
System\Windows\Forms\AccessibleObjects\MonthCalendar.CalendarBodyAccessibleObjectTests.cs (1)
136control.Size = new Size(450, 450);
System\Windows\Forms\AccessibleObjects\Panel.PanelAccessibleObjectTests.cs (3)
266panel1.Size = new(200, 140); 269button1.Size = new(237, 153); 271form.ClientSize = new(300, 200);
System\Windows\Forms\AccessibleObjects\PropertyGridView.PropertyGridViewAccessibleObjectTests.cs (2)
127propertyGrid.Size = new Size(300, 500); 235propertyGrid.Size = new Size(300, 500);
System\Windows\Forms\AccessibleObjects\StatusStrip.StatusStripAccessibleObjectTests.cs (34)
162Size horizontalSize = new(300, 30); 163Size verticalSize = new(70, 300); 178Size horizontalSize = new(300, 30); 179Size verticalSize = new(70, 300); 231Size horizontalSize = new(300, 30); 232Size verticalSize = new(70, 300); 271Size horizontalOverflowSize = new(10, 25); 272Size verticalOverflowSize = new(25, 10); 294Size horizontalOverflowSize = new(10, 25); 295Size verticalOverflowSize = new(25, 10); 316Size overflowSize = new(70, 10); 472Size horizontalSize = new(300, 30); 473Size verticalSize = new(70, 300); 489Size horizontalSize = new(300, 30); 490Size verticalSize = new(140, 300); 711Size horizontalOverflowSize = new(10, 25); 712Size verticalOverflowSize = new(25, 10); 737Size horizontalOverflowSize = new(70, 30); 738Size horizontalOverflowGripSize = new(80, 30); 739Size verticalOverflowSize = new(80, 55); 740Size verticalOverflowGripSize = new(80, 65); 741Size bothOverflowSize = new(70, 25); 776Size horizontalOverflowSize = new(70, 30); 777Size horizontalOverflowGripSize = new(80, 30); 778Size verticalOverflowSize = new(30, 55); 779Size verticalOverflowGripSize = new(30, 65); 780Size bothOverflowSize = new(70, 30); 819Size horizontalOverflowSize = new(70, 30); 820Size horizontalOverflowGripSize = new(80, 30); 821Size verticalOverflowSize = new(60, 60); 822Size verticalOverflowGripSize = new(70, 70); 853Size horizontalOverflowSize = new(115, 60); 854Size verticalOverflowSize = new(70, 60); 934Size = new Size(50, 25)
System\Windows\Forms\AccessibleObjects\TabPage.TabPageAccessibleObjectTests.cs (4)
533tabControl.Size = new(151, 104); 536button.Size = new(198, 86); 541tabPage.Size = new(143, 76); 543form.ClientSize = new(520, 305);
System\Windows\Forms\AccessibleObjects\TextBoxBaseAccessibleObjectTests.cs (1)
105using TextBoxBase textBoxBase = new SubTextBoxBase { Size = new Size(width, height) };
System\Windows\Forms\AccessibleObjects\ToolStripAccessibleObjectTests.cs (33)
175Size horizontalSize = new(300, 30); 176Size verticalSize = new(30, 300); 191Size horizontalSize = new(300, 30); 192Size verticalSize = new(30, 300); 244Size horizontalSize = new(300, 30); 245Size verticalSize = new(30, 300); 284Size horizontalOverflowSize = new(10, 25); 285Size verticalOverflowSize = new(25, 10); 307Size horizontalOverflowSize = new(10, 25); 308Size verticalOverflowSize = new(25, 10); 329Size overflowSize = new(10, 10); 485Size horizontalSize = new(300, 30); 486Size verticalSize = new(30, 300); 502Size horizontalSize = new(300, 30); 503Size verticalSize = new(30, 300); 724Size horizontalOverflowSize = new(10, 25); 725Size verticalOverflowSize = new(25, 10); 750Size horizontalOverflowSize = new(30, 30); 751Size horizontalOverflowGripSize = new(40, 30); 752Size verticalOverflowSize = new(30, 30); 753Size verticalOverflowGripSize = new(30, 40); 754Size bothOverflowSize = new(25, 25); 789Size horizontalOverflowSize = new(40, 30); 790Size horizontalOverflowGripSize = new(50, 30); 791Size verticalOverflowSize = new(30, 55); 792Size verticalOverflowGripSize = new(30, 65); 793Size bothOverflowSize = new(28, 28); 832Size horizontalOverflowSize = new(60, 30); 833Size horizontalOverflowGripSize = new(70, 30); 834Size verticalOverflowSize = new(30, 70); 835Size verticalOverflowGripSize = new(30, 60); 866Size overflowSize = new(30, 40); 994Size = new Size(25, 25)
System\Windows\Forms\AccessibleObjects\ToolStripControlHost.ToolStripHostedControlAccessibleObjectTests.cs (1)
23item.Size = new Size(0, 0);
System\Windows\Forms\AccessibleObjects\ToolStripItemAccessibleObjectTests.cs (4)
117item.Size = new Size(0, 0); 242using ToolStrip toolStrip = new() { AutoSize = false, Size = new(300, 30) }; 283using ToolStrip toolStrip = new() { AutoSize = false, Size = new(300, 30) }; 310using ToolStrip toolStrip = new() { AutoSize = false, Size = new(300, 30) };
System\Windows\Forms\AccessibleObjects\ToolStripOverflow.ToolStripOverflowAccessibleObjectTests.cs (2)
201Size = new(20, 30), 217Size = new(25, 25),
System\Windows\Forms\AccessibleObjects\ToolStripOverflowButton.ToolStripOverflowButtonAccessibleObjectTests.cs (2)
82using ToolStrip toolStrip = new() { AutoSize = false, Size = new(30, 30) }; 107using ToolStrip toolStrip = new() { AutoSize = false, Size = new(60, 30) };
System\Windows\Forms\AccessibleObjects\ToolStripProgressBar.ToolStripProgressBarControl.ToolStripProgressBarControlAccessibleObjectTests.cs (1)
119using ToolStrip toolStrip = new() { Size = new Drawing.Size(500, 25) };
System\Windows\Forms\AccessibleObjects\TreeView.TreeViewAccessibleObjectTests.cs (3)
229using TreeView control = new() { Size = new Size(300, 100) }; 243using TreeView control = new() { Size = new Size(300, 100) }; 258using TreeView control = new() { Size = new Size(300, 100) };
System\Windows\Forms\AccessibleObjects\TreeViewLabelEditAccessibleObjectTests.cs (1)
155Size = new Size(300, 200),
System\Windows\Forms\AccessibleObjects\VScrollBar.ScrollBarFirstLineButtonAccessibleObjectTests.cs (1)
327Size = new Size(500, 50)
System\Windows\Forms\AccessibleObjects\VScrollBar.ScrollBarFirstPageButtonAccessibleObjectTests.cs (1)
363Size = new Size(200, 50),
System\Windows\Forms\AccessibleObjects\VScrollBar.ScrollBarLastLineButtonAccessibleObjectTests.cs (1)
335Size = new Size(500, 50),
System\Windows\Forms\AccessibleObjects\VScrollBar.ScrollBarLastPageButtonAccessibleObjectTests.cs (1)
350Size = new Size(200, 50),
System\Windows\Forms\AccessibleObjects\VScrollBar.ScrollBarThumbAccessibleObjectTests.cs (1)
271Size = new Size(200, 50),
System\Windows\Forms\AccessibleObjects\VScrollBar.VScrollBarAccessibleObjectTests.cs (1)
269Size = new Size(500, 50)
System\Windows\Forms\AxHostTests.cs (10)
49Assert.Equal(new Size(75, 23), control.ClientSize); 65Assert.Equal(new Size(75, 23), control.DefaultSize); 95Assert.Equal(new Size(75, 23), control.PreferredSize); 106Assert.Equal(new Size(75, 23), control.Size); 143Assert.Equal(new Size(75, 23), control.ClientSize); 159Assert.Equal(new Size(75, 23), control.DefaultSize); 189Assert.Equal(new Size(75, 23), control.PreferredSize); 200Assert.Equal(new Size(75, 23), control.Size); 1648Assert.Equal(new Size(759, 1073), result.Size); 1716Assert.Equal(new Size(759, 1073), result.Size);
System\Windows\Forms\BinaryFormatUtilitiesTests.cs (2)
126new Size(int.MaxValue, int.MinValue), 905public Size? Size = new(1, 2);
System\Windows\Forms\ButtonBaseTests.cs (14)
41Assert.Equal(new Size(75, 23), control.ClientSize); 56Assert.Equal(new Size(75, 23), control.DefaultSize); 107Assert.Equal(new Size(75, 23), control.Size); 2590imageList1.ImageSize = new Size(1, 2); 2597imageList1.ImageSize = new Size(2, 3); 2628imageList1.ImageSize = new Size(1, 2); 2638imageList1.ImageSize = new Size(2, 3); 4998yield return new object[] { flatStyle, new Size(-1, -2) }; 4999yield return new object[] { flatStyle, new Size(1, 2) }; 5000yield return new object[] { flatStyle, new Size(2, 1) }; 5001yield return new object[] { flatStyle, new Size(1, 1) }; 5002yield return new object[] { flatStyle, new Size(10, 20) }; 5003yield return new object[] { flatStyle, new Size(30, 40) }; 5004yield return new object[] { flatStyle, new Size(int.MaxValue, int.MaxValue) };
System\Windows\Forms\ButtonTests.cs (462)
43Assert.Equal(new Size(75, 23), control.ClientSize); 58Assert.Equal(new Size(75, 23), control.DefaultSize); 96Assert.Equal(new Size(75, 23), control.PreferredSize); 105Assert.Equal(new Size(75, 23), control.Size); 596Assert.Equal(new Size(75, 24), control.GetPreferredSize(Size.Empty)); 601Assert.Equal(new Size(75, 24), control.GetPreferredSize(Size.Empty)); 697Assert.Equal(oldSize + new Size(14, 9), control.GetPreferredSize(Size.Empty)); 702Assert.Equal(newSize + new Size(14, 9), control.GetPreferredSize(Size.Empty)); 952Assert.Equal(oldSize + new Size(14, 9), control.GetPreferredSize(Size.Empty)); 957Assert.Equal(newSize + new Size(14, 9), control.GetPreferredSize(Size.Empty)); 1167yield return new object[] { AutoSizeMode.GrowAndShrink, Size.Empty, new Size(14, 9) }; 1168yield return new object[] { AutoSizeMode.GrowAndShrink, new Size(-1, -2), new Size(14, 9) }; 1169yield return new object[] { AutoSizeMode.GrowAndShrink, new Size(-2, -1), new Size(14, 9) }; 1170yield return new object[] { AutoSizeMode.GrowAndShrink, new Size(-1, -1), new Size(14, 9) }; 1171yield return new object[] { AutoSizeMode.GrowAndShrink, new Size(1, 2), new Size(14, 9) }; 1172yield return new object[] { AutoSizeMode.GrowAndShrink, new Size(2, 1), new Size(14, 9) }; 1173yield return new object[] { AutoSizeMode.GrowAndShrink, new Size(1, 1), new Size(14, 9) }; 1174yield return new object[] { AutoSizeMode.GrowAndShrink, new Size(10, 20), new Size(14, 9) }; 1175yield return new object[] { AutoSizeMode.GrowAndShrink, new Size(30, 40), new Size(14, 9) }; 1176yield return new object[] { AutoSizeMode.GrowAndShrink, new Size(30, int.MaxValue), new Size(14, 9) }; 1177yield return new object[] { AutoSizeMode.GrowAndShrink, new Size(int.MaxValue, 40), new Size(14, 9) }; 1178yield return new object[] { AutoSizeMode.GrowAndShrink, new Size(int.MaxValue, int.MaxValue), new Size(14, 9) }; 1180yield return new object[] { AutoSizeMode.GrowOnly, Size.Empty, new Size(75, 23) }; 1181yield return new object[] { AutoSizeMode.GrowOnly, new Size(-1, -2), new Size(75, 23) }; 1182yield return new object[] { AutoSizeMode.GrowOnly, new Size(-2, -1), new Size(75, 23) }; 1183yield return new object[] { AutoSizeMode.GrowOnly, new Size(-1, -1), new Size(75, 23) }; 1184yield return new object[] { AutoSizeMode.GrowOnly, new Size(1, 2), new Size(75, 23) }; 1185yield return new object[] { AutoSizeMode.GrowOnly, new Size(2, 1), new Size(75, 23) }; 1186yield return new object[] { AutoSizeMode.GrowOnly, new Size(1, 1), new Size(75, 23) }; 1187yield return new object[] { AutoSizeMode.GrowOnly, new Size(10, 20), new Size(75, 23) }; 1188yield return new object[] { AutoSizeMode.GrowOnly, new Size(30, 40), new Size(75, 23) }; 1189yield return new object[] { AutoSizeMode.GrowOnly, new Size(30, int.MaxValue), new Size(75, 23) }; 1190yield return new object[] { AutoSizeMode.GrowOnly, new Size(int.MaxValue, 40), new Size(75, 23) }; 1191yield return new object[] { AutoSizeMode.GrowOnly, new Size(int.MaxValue, int.MaxValue), new Size(75, 23) }; 1216yield return new object[] { AutoSizeMode.GrowAndShrink, Size.Empty, new Size(18, 15) }; 1217yield return new object[] { AutoSizeMode.GrowAndShrink, new Size(-1, -2), new Size(18, 15) }; 1218yield return new object[] { AutoSizeMode.GrowAndShrink, new Size(-2, -1), new Size(18, 15) }; 1219yield return new object[] { AutoSizeMode.GrowAndShrink, new Size(-1, -1), new Size(18, 15) }; 1220yield return new object[] { AutoSizeMode.GrowAndShrink, new Size(1, 2), new Size(18, 15) }; 1221yield return new object[] { AutoSizeMode.GrowAndShrink, new Size(2, 1), new Size(18, 15) }; 1222yield return new object[] { AutoSizeMode.GrowAndShrink, new Size(1, 1), new Size(18, 15) }; 1223yield return new object[] { AutoSizeMode.GrowAndShrink, new Size(10, 20), new Size(18, 15) }; 1224yield return new object[] { AutoSizeMode.GrowAndShrink, new Size(30, 40), new Size(18, 15) }; 1225yield return new object[] { AutoSizeMode.GrowAndShrink, new Size(30, int.MaxValue), new Size(18, 15) }; 1226yield return new object[] { AutoSizeMode.GrowAndShrink, new Size(int.MaxValue, 40), new Size(18, 15) }; 1227yield return new object[] { AutoSizeMode.GrowAndShrink, new Size(int.MaxValue, int.MaxValue), new Size(18, 15) }; 1229yield return new object[] { AutoSizeMode.GrowOnly, Size.Empty, new Size(75, 23) }; 1230yield return new object[] { AutoSizeMode.GrowOnly, new Size(-1, -2), new Size(75, 23) }; 1231yield return new object[] { AutoSizeMode.GrowOnly, new Size(-2, -1), new Size(75, 23) }; 1232yield return new object[] { AutoSizeMode.GrowOnly, new Size(-1, -1), new Size(75, 23) }; 1233yield return new object[] { AutoSizeMode.GrowOnly, new Size(1, 2), new Size(75, 23) }; 1234yield return new object[] { AutoSizeMode.GrowOnly, new Size(2, 1), new Size(75, 23) }; 1235yield return new object[] { AutoSizeMode.GrowOnly, new Size(1, 1), new Size(75, 23) }; 1236yield return new object[] { AutoSizeMode.GrowOnly, new Size(10, 20), new Size(75, 23) }; 1237yield return new object[] { AutoSizeMode.GrowOnly, new Size(30, 40), new Size(75, 23) }; 1238yield return new object[] { AutoSizeMode.GrowOnly, new Size(30, int.MaxValue), new Size(75, 23) }; 1239yield return new object[] { AutoSizeMode.GrowOnly, new Size(int.MaxValue, 40), new Size(75, 23) }; 1240yield return new object[] { AutoSizeMode.GrowOnly, new Size(int.MaxValue, int.MaxValue), new Size(75, 23) }; 1266yield return new object[] { AutoSizeMode.GrowAndShrink, Size.Empty, new Size(18, 15) }; 1267yield return new object[] { AutoSizeMode.GrowAndShrink, new Size(-1, -2), new Size(18, 15) }; 1268yield return new object[] { AutoSizeMode.GrowAndShrink, new Size(-2, -1), new Size(18, 15) }; 1269yield return new object[] { AutoSizeMode.GrowAndShrink, new Size(-1, -1), new Size(18, 15) }; 1270yield return new object[] { AutoSizeMode.GrowAndShrink, new Size(1, 2), new Size(18, 15) }; 1271yield return new object[] { AutoSizeMode.GrowAndShrink, new Size(2, 1), new Size(18, 15) }; 1272yield return new object[] { AutoSizeMode.GrowAndShrink, new Size(1, 1), new Size(18, 15) }; 1273yield return new object[] { AutoSizeMode.GrowAndShrink, new Size(10, 20), new Size(18, 15) }; 1274yield return new object[] { AutoSizeMode.GrowAndShrink, new Size(30, 40), new Size(18, 15) }; 1275yield return new object[] { AutoSizeMode.GrowAndShrink, new Size(30, int.MaxValue), new Size(18, 15) }; 1276yield return new object[] { AutoSizeMode.GrowAndShrink, new Size(int.MaxValue, 40), new Size(18, 15) }; 1277yield return new object[] { AutoSizeMode.GrowAndShrink, new Size(int.MaxValue, int.MaxValue), new Size(18, 15) }; 1279yield return new object[] { AutoSizeMode.GrowOnly, Size.Empty, new Size(18, 15) }; 1280yield return new object[] { AutoSizeMode.GrowOnly, new Size(-1, -2), new Size(18, 15) }; 1281yield return new object[] { AutoSizeMode.GrowOnly, new Size(-2, -1), new Size(18, 15) }; 1282yield return new object[] { AutoSizeMode.GrowOnly, new Size(-1, -1), new Size(18, 15) }; 1283yield return new object[] { AutoSizeMode.GrowOnly, new Size(1, 2), new Size(18, 15) }; 1284yield return new object[] { AutoSizeMode.GrowOnly, new Size(2, 1), new Size(18, 15) }; 1285yield return new object[] { AutoSizeMode.GrowOnly, new Size(1, 1), new Size(18, 15) }; 1286yield return new object[] { AutoSizeMode.GrowOnly, new Size(10, 20), new Size(18, 15) }; 1287yield return new object[] { AutoSizeMode.GrowOnly, new Size(30, 40), new Size(18, 15) }; 1288yield return new object[] { AutoSizeMode.GrowOnly, new Size(30, int.MaxValue), new Size(18, 15) }; 1289yield return new object[] { AutoSizeMode.GrowOnly, new Size(int.MaxValue, 40), new Size(18, 15) }; 1290yield return new object[] { AutoSizeMode.GrowOnly, new Size(int.MaxValue, int.MaxValue), new Size(18, 15) }; 1302Size = new Size(14, 9), 1318yield return new object[] { new Size(-1, -2) }; 1319yield return new object[] { new Size(-2, -1) }; 1320yield return new object[] { new Size(-1, -1) }; 1321yield return new object[] { new Size(1, 2) }; 1322yield return new object[] { new Size(2, 1) }; 1323yield return new object[] { new Size(1, 1) }; 1341Assert.Equal(new Size(75, minSize.Height + 6 + 9), size); 1346Assert.Equal(new Size(75, minSize.Height + 6 + 9), size); 1365Assert.Equal(minSize + new Size(14, 9) + new Size(4, 6), size); 1370Assert.Equal(minSize + new Size(14, 9) + new Size(4, 6), size); 1376yield return new object[] { FlatStyle.Flat, AutoSizeMode.GrowAndShrink, Size.Empty, new Size(8, 8) }; 1377yield return new object[] { FlatStyle.Flat, AutoSizeMode.GrowAndShrink, new Size(-1, -2), new Size(8, 8) }; 1378yield return new object[] { FlatStyle.Flat, AutoSizeMode.GrowAndShrink, new Size(-2, -1), new Size(8, 8) }; 1379yield return new object[] { FlatStyle.Flat, AutoSizeMode.GrowAndShrink, new Size(-1, -1), new Size(8, 8) }; 1380yield return new object[] { FlatStyle.Flat, AutoSizeMode.GrowAndShrink, new Size(1, 2), new Size(8, 8) }; 1381yield return new object[] { FlatStyle.Flat, AutoSizeMode.GrowAndShrink, new Size(2, 1), new Size(8, 8) }; 1382yield return new object[] { FlatStyle.Flat, AutoSizeMode.GrowAndShrink, new Size(1, 1), new Size(8, 8) }; 1383yield return new object[] { FlatStyle.Flat, AutoSizeMode.GrowAndShrink, new Size(10, 20), new Size(8, 8) }; 1384yield return new object[] { FlatStyle.Flat, AutoSizeMode.GrowAndShrink, new Size(30, 40), new Size(8, 8) }; 1385yield return new object[] { FlatStyle.Flat, AutoSizeMode.GrowAndShrink, new Size(30, int.MaxValue), new Size(8, 8) }; 1386yield return new object[] { FlatStyle.Flat, AutoSizeMode.GrowAndShrink, new Size(int.MaxValue, 40), new Size(8, 8) }; 1387yield return new object[] { FlatStyle.Flat, AutoSizeMode.GrowAndShrink, new Size(int.MaxValue, int.MaxValue), new Size(8, 8) }; 1389yield return new object[] { FlatStyle.Popup, AutoSizeMode.GrowAndShrink, Size.Empty, new Size(6, 6) }; 1390yield return new object[] { FlatStyle.Popup, AutoSizeMode.GrowAndShrink, new Size(-1, -2), new Size(6, 6) }; 1391yield return new object[] { FlatStyle.Popup, AutoSizeMode.GrowAndShrink, new Size(-2, -1), new Size(6, 6) }; 1392yield return new object[] { FlatStyle.Popup, AutoSizeMode.GrowAndShrink, new Size(-1, -1), new Size(6, 6) }; 1393yield return new object[] { FlatStyle.Popup, AutoSizeMode.GrowAndShrink, new Size(1, 2), new Size(6, 6) }; 1394yield return new object[] { FlatStyle.Popup, AutoSizeMode.GrowAndShrink, new Size(2, 1), new Size(6, 6) }; 1395yield return new object[] { FlatStyle.Popup, AutoSizeMode.GrowAndShrink, new Size(1, 1), new Size(6, 6) }; 1396yield return new object[] { FlatStyle.Popup, AutoSizeMode.GrowAndShrink, new Size(10, 20), new Size(6, 6) }; 1397yield return new object[] { FlatStyle.Popup, AutoSizeMode.GrowAndShrink, new Size(30, 40), new Size(6, 6) }; 1398yield return new object[] { FlatStyle.Popup, AutoSizeMode.GrowAndShrink, new Size(30, int.MaxValue), new Size(6, 6) }; 1399yield return new object[] { FlatStyle.Popup, AutoSizeMode.GrowAndShrink, new Size(int.MaxValue, 40), new Size(6, 6) }; 1400yield return new object[] { FlatStyle.Popup, AutoSizeMode.GrowAndShrink, new Size(int.MaxValue, int.MaxValue), new Size(6, 6) }; 1402yield return new object[] { FlatStyle.Standard, AutoSizeMode.GrowAndShrink, Size.Empty, new Size(6, 6) }; 1403yield return new object[] { FlatStyle.Standard, AutoSizeMode.GrowAndShrink, new Size(-1, -2), new Size(6, 6) }; 1404yield return new object[] { FlatStyle.Standard, AutoSizeMode.GrowAndShrink, new Size(-2, -1), new Size(6, 6) }; 1405yield return new object[] { FlatStyle.Standard, AutoSizeMode.GrowAndShrink, new Size(-1, -1), new Size(6, 6) }; 1406yield return new object[] { FlatStyle.Standard, AutoSizeMode.GrowAndShrink, new Size(1, 2), new Size(6, 6) }; 1407yield return new object[] { FlatStyle.Standard, AutoSizeMode.GrowAndShrink, new Size(2, 1), new Size(6, 6) }; 1408yield return new object[] { FlatStyle.Standard, AutoSizeMode.GrowAndShrink, new Size(1, 1), new Size(6, 6) }; 1409yield return new object[] { FlatStyle.Standard, AutoSizeMode.GrowAndShrink, new Size(10, 20), new Size(6, 6) }; 1410yield return new object[] { FlatStyle.Standard, AutoSizeMode.GrowAndShrink, new Size(30, 40), new Size(6, 6) }; 1411yield return new object[] { FlatStyle.Standard, AutoSizeMode.GrowAndShrink, new Size(30, int.MaxValue), new Size(6, 6) }; 1412yield return new object[] { FlatStyle.Standard, AutoSizeMode.GrowAndShrink, new Size(int.MaxValue, 40), new Size(6, 6) }; 1413yield return new object[] { FlatStyle.Standard, AutoSizeMode.GrowAndShrink, new Size(int.MaxValue, int.MaxValue), new Size(6, 6) }; 1417yield return new object[] { flatStyle, AutoSizeMode.GrowOnly, Size.Empty, new Size(75, 23) }; 1418yield return new object[] { flatStyle, AutoSizeMode.GrowOnly, new Size(-1, -2), new Size(75, 23) }; 1419yield return new object[] { flatStyle, AutoSizeMode.GrowOnly, new Size(-2, -1), new Size(75, 23) }; 1420yield return new object[] { flatStyle, AutoSizeMode.GrowOnly, new Size(-1, -1), new Size(75, 23) }; 1421yield return new object[] { flatStyle, AutoSizeMode.GrowOnly, new Size(1, 2), new Size(75, 23) }; 1422yield return new object[] { flatStyle, AutoSizeMode.GrowOnly, new Size(2, 1), new Size(75, 23) }; 1423yield return new object[] { flatStyle, AutoSizeMode.GrowOnly, new Size(1, 1), new Size(75, 23) }; 1424yield return new object[] { flatStyle, AutoSizeMode.GrowOnly, new Size(10, 20), new Size(75, 23) }; 1425yield return new object[] { flatStyle, AutoSizeMode.GrowOnly, new Size(30, 40), new Size(75, 23) }; 1426yield return new object[] { flatStyle, AutoSizeMode.GrowOnly, new Size(30, int.MaxValue), new Size(75, 23) }; 1427yield return new object[] { flatStyle, AutoSizeMode.GrowOnly, new Size(int.MaxValue, 40), new Size(75, 23) }; 1428yield return new object[] { flatStyle, AutoSizeMode.GrowOnly, new Size(int.MaxValue, int.MaxValue), new Size(75, 23) }; 1454yield return new object[] { FlatStyle.Flat, AutoSizeMode.GrowAndShrink, Size.Empty, new Size(12, 14) }; 1455yield return new object[] { FlatStyle.Flat, AutoSizeMode.GrowAndShrink, new Size(-1, -2), new Size(12, 14) }; 1456yield return new object[] { FlatStyle.Flat, AutoSizeMode.GrowAndShrink, new Size(-2, -1), new Size(12, 14) }; 1457yield return new object[] { FlatStyle.Flat, AutoSizeMode.GrowAndShrink, new Size(-1, -1), new Size(12, 14) }; 1458yield return new object[] { FlatStyle.Flat, AutoSizeMode.GrowAndShrink, new Size(1, 2), new Size(12, 14) }; 1459yield return new object[] { FlatStyle.Flat, AutoSizeMode.GrowAndShrink, new Size(2, 1), new Size(12, 14) }; 1460yield return new object[] { FlatStyle.Flat, AutoSizeMode.GrowAndShrink, new Size(1, 1), new Size(12, 14) }; 1461yield return new object[] { FlatStyle.Flat, AutoSizeMode.GrowAndShrink, new Size(10, 20), new Size(12, 14) }; 1462yield return new object[] { FlatStyle.Flat, AutoSizeMode.GrowAndShrink, new Size(30, 40), new Size(12, 14) }; 1463yield return new object[] { FlatStyle.Flat, AutoSizeMode.GrowAndShrink, new Size(30, int.MaxValue), new Size(12, 14) }; 1464yield return new object[] { FlatStyle.Flat, AutoSizeMode.GrowAndShrink, new Size(int.MaxValue, 40), new Size(12, 14) }; 1465yield return new object[] { FlatStyle.Flat, AutoSizeMode.GrowAndShrink, new Size(int.MaxValue, int.MaxValue), new Size(12, 14) }; 1467yield return new object[] { FlatStyle.Popup, AutoSizeMode.GrowAndShrink, Size.Empty, new Size(10, 12) }; 1468yield return new object[] { FlatStyle.Popup, AutoSizeMode.GrowAndShrink, new Size(-1, -2), new Size(10, 12) }; 1469yield return new object[] { FlatStyle.Popup, AutoSizeMode.GrowAndShrink, new Size(-2, -1), new Size(10, 12) }; 1470yield return new object[] { FlatStyle.Popup, AutoSizeMode.GrowAndShrink, new Size(-1, -1), new Size(10, 12) }; 1471yield return new object[] { FlatStyle.Popup, AutoSizeMode.GrowAndShrink, new Size(1, 2), new Size(10, 12) }; 1472yield return new object[] { FlatStyle.Popup, AutoSizeMode.GrowAndShrink, new Size(2, 1), new Size(10, 12) }; 1473yield return new object[] { FlatStyle.Popup, AutoSizeMode.GrowAndShrink, new Size(1, 1), new Size(10, 12) }; 1474yield return new object[] { FlatStyle.Popup, AutoSizeMode.GrowAndShrink, new Size(10, 20), new Size(10, 12) }; 1475yield return new object[] { FlatStyle.Popup, AutoSizeMode.GrowAndShrink, new Size(30, 40), new Size(10, 12) }; 1476yield return new object[] { FlatStyle.Popup, AutoSizeMode.GrowAndShrink, new Size(30, int.MaxValue), new Size(10, 12) }; 1477yield return new object[] { FlatStyle.Popup, AutoSizeMode.GrowAndShrink, new Size(int.MaxValue, 40), new Size(10, 12) }; 1478yield return new object[] { FlatStyle.Popup, AutoSizeMode.GrowAndShrink, new Size(int.MaxValue, int.MaxValue), new Size(10, 12) }; 1480yield return new object[] { FlatStyle.Standard, AutoSizeMode.GrowAndShrink, Size.Empty, new Size(10, 12) }; 1481yield return new object[] { FlatStyle.Standard, AutoSizeMode.GrowAndShrink, new Size(-1, -2), new Size(10, 12) }; 1482yield return new object[] { FlatStyle.Standard, AutoSizeMode.GrowAndShrink, new Size(-2, -1), new Size(10, 12) }; 1483yield return new object[] { FlatStyle.Standard, AutoSizeMode.GrowAndShrink, new Size(-1, -1), new Size(10, 12) }; 1484yield return new object[] { FlatStyle.Standard, AutoSizeMode.GrowAndShrink, new Size(1, 2), new Size(10, 12) }; 1485yield return new object[] { FlatStyle.Standard, AutoSizeMode.GrowAndShrink, new Size(2, 1), new Size(10, 12) }; 1486yield return new object[] { FlatStyle.Standard, AutoSizeMode.GrowAndShrink, new Size(1, 1), new Size(10, 12) }; 1487yield return new object[] { FlatStyle.Standard, AutoSizeMode.GrowAndShrink, new Size(10, 20), new Size(10, 12) }; 1488yield return new object[] { FlatStyle.Standard, AutoSizeMode.GrowAndShrink, new Size(30, 40), new Size(10, 12) }; 1489yield return new object[] { FlatStyle.Standard, AutoSizeMode.GrowAndShrink, new Size(30, int.MaxValue), new Size(10, 12) }; 1490yield return new object[] { FlatStyle.Standard, AutoSizeMode.GrowAndShrink, new Size(int.MaxValue, 40), new Size(10, 12) }; 1491yield return new object[] { FlatStyle.Standard, AutoSizeMode.GrowAndShrink, new Size(int.MaxValue, int.MaxValue), new Size(10, 12) }; 1495yield return new object[] { flatStyle, AutoSizeMode.GrowOnly, Size.Empty, new Size(75, 23) }; 1496yield return new object[] { flatStyle, AutoSizeMode.GrowOnly, new Size(-1, -2), new Size(75, 23) }; 1497yield return new object[] { flatStyle, AutoSizeMode.GrowOnly, new Size(-2, -1), new Size(75, 23) }; 1498yield return new object[] { flatStyle, AutoSizeMode.GrowOnly, new Size(-1, -1), new Size(75, 23) }; 1499yield return new object[] { flatStyle, AutoSizeMode.GrowOnly, new Size(1, 2), new Size(75, 23) }; 1500yield return new object[] { flatStyle, AutoSizeMode.GrowOnly, new Size(2, 1), new Size(75, 23) }; 1501yield return new object[] { flatStyle, AutoSizeMode.GrowOnly, new Size(1, 1), new Size(75, 23) }; 1502yield return new object[] { flatStyle, AutoSizeMode.GrowOnly, new Size(10, 20), new Size(75, 23) }; 1503yield return new object[] { flatStyle, AutoSizeMode.GrowOnly, new Size(30, 40), new Size(75, 23) }; 1504yield return new object[] { flatStyle, AutoSizeMode.GrowOnly, new Size(30, int.MaxValue), new Size(75, 23) }; 1505yield return new object[] { flatStyle, AutoSizeMode.GrowOnly, new Size(int.MaxValue, 40), new Size(75, 23) }; 1506yield return new object[] { flatStyle, AutoSizeMode.GrowOnly, new Size(int.MaxValue, int.MaxValue), new Size(75, 23) }; 1533yield return new object[] { FlatStyle.Flat, AutoSizeMode.GrowAndShrink, Size.Empty, new Size(12, 14) }; 1534yield return new object[] { FlatStyle.Flat, AutoSizeMode.GrowAndShrink, new Size(-1, -2), new Size(12, 14) }; 1535yield return new object[] { FlatStyle.Flat, AutoSizeMode.GrowAndShrink, new Size(-2, -1), new Size(12, 14) }; 1536yield return new object[] { FlatStyle.Flat, AutoSizeMode.GrowAndShrink, new Size(-1, -1), new Size(12, 14) }; 1537yield return new object[] { FlatStyle.Flat, AutoSizeMode.GrowAndShrink, new Size(1, 2), new Size(12, 14) }; 1538yield return new object[] { FlatStyle.Flat, AutoSizeMode.GrowAndShrink, new Size(2, 1), new Size(12, 14) }; 1539yield return new object[] { FlatStyle.Flat, AutoSizeMode.GrowAndShrink, new Size(1, 1), new Size(12, 14) }; 1540yield return new object[] { FlatStyle.Flat, AutoSizeMode.GrowAndShrink, new Size(10, 20), new Size(12, 14) }; 1541yield return new object[] { FlatStyle.Flat, AutoSizeMode.GrowAndShrink, new Size(30, 40), new Size(12, 14) }; 1542yield return new object[] { FlatStyle.Flat, AutoSizeMode.GrowAndShrink, new Size(30, int.MaxValue), new Size(12, 14) }; 1543yield return new object[] { FlatStyle.Flat, AutoSizeMode.GrowAndShrink, new Size(int.MaxValue, 40), new Size(12, 14) }; 1544yield return new object[] { FlatStyle.Flat, AutoSizeMode.GrowAndShrink, new Size(int.MaxValue, int.MaxValue), new Size(12, 14) }; 1546yield return new object[] { FlatStyle.Flat, AutoSizeMode.GrowOnly, Size.Empty, new Size(12, 14) }; 1547yield return new object[] { FlatStyle.Flat, AutoSizeMode.GrowOnly, new Size(-1, -2), new Size(12, 14) }; 1548yield return new object[] { FlatStyle.Flat, AutoSizeMode.GrowOnly, new Size(-2, -1), new Size(12, 14) }; 1549yield return new object[] { FlatStyle.Flat, AutoSizeMode.GrowOnly, new Size(-1, -1), new Size(12, 14) }; 1550yield return new object[] { FlatStyle.Flat, AutoSizeMode.GrowOnly, new Size(1, 2), new Size(12, 14) }; 1551yield return new object[] { FlatStyle.Flat, AutoSizeMode.GrowOnly, new Size(2, 1), new Size(12, 14) }; 1552yield return new object[] { FlatStyle.Flat, AutoSizeMode.GrowOnly, new Size(1, 1), new Size(12, 14) }; 1553yield return new object[] { FlatStyle.Flat, AutoSizeMode.GrowOnly, new Size(10, 20), new Size(12, 14) }; 1554yield return new object[] { FlatStyle.Flat, AutoSizeMode.GrowOnly, new Size(30, 40), new Size(12, 14) }; 1555yield return new object[] { FlatStyle.Flat, AutoSizeMode.GrowOnly, new Size(30, int.MaxValue), new Size(12, 14) }; 1556yield return new object[] { FlatStyle.Flat, AutoSizeMode.GrowOnly, new Size(int.MaxValue, 40), new Size(12, 14) }; 1557yield return new object[] { FlatStyle.Flat, AutoSizeMode.GrowOnly, new Size(int.MaxValue, int.MaxValue), new Size(12, 14) }; 1561yield return new object[] { flatStyle, AutoSizeMode.GrowAndShrink, Size.Empty, new Size(10, 12) }; 1562yield return new object[] { flatStyle, AutoSizeMode.GrowAndShrink, new Size(-1, -2), new Size(10, 12) }; 1563yield return new object[] { flatStyle, AutoSizeMode.GrowAndShrink, new Size(-2, -1), new Size(10, 12) }; 1564yield return new object[] { flatStyle, AutoSizeMode.GrowAndShrink, new Size(-1, -1), new Size(10, 12) }; 1565yield return new object[] { flatStyle, AutoSizeMode.GrowAndShrink, new Size(1, 2), new Size(10, 12) }; 1566yield return new object[] { flatStyle, AutoSizeMode.GrowAndShrink, new Size(2, 1), new Size(10, 12) }; 1567yield return new object[] { flatStyle, AutoSizeMode.GrowAndShrink, new Size(1, 1), new Size(10, 12) }; 1568yield return new object[] { flatStyle, AutoSizeMode.GrowAndShrink, new Size(10, 20), new Size(10, 12) }; 1569yield return new object[] { flatStyle, AutoSizeMode.GrowAndShrink, new Size(30, 40), new Size(10, 12) }; 1570yield return new object[] { flatStyle, AutoSizeMode.GrowAndShrink, new Size(30, int.MaxValue), new Size(10, 12) }; 1571yield return new object[] { flatStyle, AutoSizeMode.GrowAndShrink, new Size(int.MaxValue, 40), new Size(10, 12) }; 1572yield return new object[] { flatStyle, AutoSizeMode.GrowAndShrink, new Size(int.MaxValue, int.MaxValue), new Size(10, 12) }; 1574yield return new object[] { flatStyle, AutoSizeMode.GrowOnly, Size.Empty, new Size(10, 12) }; 1575yield return new object[] { flatStyle, AutoSizeMode.GrowOnly, new Size(-1, -2), new Size(10, 12) }; 1576yield return new object[] { flatStyle, AutoSizeMode.GrowOnly, new Size(-2, -1), new Size(10, 12) }; 1577yield return new object[] { flatStyle, AutoSizeMode.GrowOnly, new Size(-1, -1), new Size(10, 12) }; 1578yield return new object[] { flatStyle, AutoSizeMode.GrowOnly, new Size(1, 2), new Size(10, 12) }; 1579yield return new object[] { flatStyle, AutoSizeMode.GrowOnly, new Size(2, 1), new Size(10, 12) }; 1580yield return new object[] { flatStyle, AutoSizeMode.GrowOnly, new Size(1, 1), new Size(10, 12) }; 1581yield return new object[] { flatStyle, AutoSizeMode.GrowOnly, new Size(10, 20), new Size(10, 12) }; 1582yield return new object[] { flatStyle, AutoSizeMode.GrowOnly, new Size(30, 40), new Size(10, 12) }; 1583yield return new object[] { flatStyle, AutoSizeMode.GrowOnly, new Size(30, int.MaxValue), new Size(10, 12) }; 1584yield return new object[] { flatStyle, AutoSizeMode.GrowOnly, new Size(int.MaxValue, 40), new Size(10, 12) }; 1585yield return new object[] { flatStyle, AutoSizeMode.GrowOnly, new Size(int.MaxValue, int.MaxValue), new Size(10, 12) }; 1598Size = new Size(6, 6), 1614yield return new object[] { new Size(-1, -2) }; 1615yield return new object[] { new Size(-2, -1) }; 1616yield return new object[] { new Size(-1, -1) }; 1617yield return new object[] { new Size(1, 2) }; 1618yield return new object[] { new Size(2, 1) }; 1619yield return new object[] { new Size(1, 1) }; 1637Assert.Equal(new Size(75, minSize.Height + 13 + 8), size); 1642Assert.Equal(new Size(75, minSize.Height + 13 + 8), size); 1661Assert.Equal(minSize + new Size(11, 15) + new Size(4, 6), size); 1666Assert.Equal(minSize + new Size(11, 15) + new Size(4, 6), size); 1685Assert.Equal(new Size(75, minSize.Height + 13 + 6), size); 1690Assert.Equal(new Size(75, minSize.Height + 13 + 6), size); 1709Assert.Equal(minSize + new Size(9, 13) + new Size(4, 6), size); 1714Assert.Equal(minSize + new Size(9, 13) + new Size(4, 6), size); 1733Assert.Equal(new Size(75, minSize.Height + 13 + 6), size); 1738Assert.Equal(new Size(75, minSize.Height + 13 + 6), size); 1757Assert.Equal(minSize + new Size(9, 13) + new Size(4, 6), size); 1762Assert.Equal(minSize + new Size(9, 13) + new Size(4, 6), size);
System\Windows\Forms\CheckBoxRendererTests.cs (1)
152? Validate.PolyPolygon16(new(new(bounds.X, bounds.Y), new Size(-1, -1)))
System\Windows\Forms\CheckBoxTests.cs (3)
45Assert.Equal(new Size(104, 24), control.ClientSize); 60Assert.Equal(new Size(104, 24), control.DefaultSize); 107Assert.Equal(new Size(104, 24), control.Size);
System\Windows\Forms\ComboBox.ComboBoxChildListUiaProviderTests.cs (2)
107comboBox.Size = new Size(expectedWidth, 150); 111comboBox.Size = new Size(expectedWidth, comboBox.Size.Height);
System\Windows\Forms\ComboBox.ComboBoxUiaTextProviderTests.cs (54)
283using ComboBox comboBox = new() { DropDownStyle = dropDownStyle, Size = new(width, height) }; 307using ComboBox comboBox = new() { DropDownStyle = dropDownStyle, Size = new(width, height) }; 345using ComboBox comboBox = new() { DropDownStyle = dropDownStyle, Size = new(width, height) }; 368using ComboBox comboBox = new() { DropDownStyle = dropDownStyle, Size = new(width, height) }; 423yield return new object[] { ComboBoxStyle.DropDown, new Size(50, 20), "Some test text for testing", 0, new Point(1, 0) }; 424yield return new object[] { ComboBoxStyle.DropDown, new Size(50, 20), "Some test text for testing", 15, new Point(79, 0) }; 426yield return new object[] { ComboBoxStyle.Simple, new Size(50, 20), "Some test text for testing", 0, new Point(1, 0) }; 427yield return new object[] { ComboBoxStyle.Simple, new Size(50, 20), "Some test text for testing", 15, new Point(79, 0) }; 450yield return new object[] { ComboBoxStyle.DropDown, new Size(50, 20), "Some test text for testing", 0 }; 451yield return new object[] { ComboBoxStyle.DropDown, new Size(50, 20), "Some test text for testing", 15 }; 453yield return new object[] { ComboBoxStyle.Simple, new Size(50, 20), "Some test text for testing", 0 }; 454yield return new object[] { ComboBoxStyle.Simple, new Size(50, 20), "Some test text for testing", 15 }; 485yield return new object[] { comboBoxStyle, new Size(50, 20), "", 0, new Point(0, 0) }; 486yield return new object[] { comboBoxStyle, new Size(50, 20), "Some test text", 100, new Point(0, 0) }; 487yield return new object[] { comboBoxStyle, new Size(50, 20), "Some test text", -1, new Point(0, 0) }; 488yield return new object[] { comboBoxStyle, new Size(50, 20), "Some test text", 12, new Point(71, 0) }; 489yield return new object[] { comboBoxStyle, new Size(100, 60), "Some test \n text", 10, new Point(56, 0) }; 490yield return new object[] { comboBoxStyle, new Size(100, 60), "Some test \r\n text", 10, new Point(56, 0) }; 491yield return new object[] { comboBoxStyle, new Size(100, 60), "Some test \r\n text", 12, new Point(60, 0) }; 492yield return new object[] { comboBoxStyle, new Size(100, 60), "Some test \t text", 10, new Point(57, 0) }; 523yield return new object[] { comboBoxStyle, new Size(50, 20), "", 0 }; 524yield return new object[] { comboBoxStyle, new Size(50, 20), "Some test text", 100 }; 525yield return new object[] { comboBoxStyle, new Size(50, 20), "Some test text", -1 }; 526yield return new object[] { comboBoxStyle, new Size(50, 20), "Some test text", 12 }; 527yield return new object[] { comboBoxStyle, new Size(100, 60), "Some test \n text", 10 }; 528yield return new object[] { comboBoxStyle, new Size(100, 60), "Some test \r\n text", 10 }; 529yield return new object[] { comboBoxStyle, new Size(100, 60), "Some test \r\n text", 12 }; 530yield return new object[] { comboBoxStyle, new Size(100, 60), "Some test \t text", 10 }; 562yield return new object[] { comboBoxStyle, new Size(0, 0), new Rectangle(0, 0, 80, 16) }; 564yield return new object[] { comboBoxStyle, new Size(50, 50), new Rectangle(0, 0, width, 15) }; 566yield return new object[] { comboBoxStyle, new Size(250, 100), new Rectangle(0, 0, width, 15) }; 592using ComboBox comboBox = new ComboBox() { DropDownStyle = dropDownStyle, Size = new Size(250, 100) }; 765yield return new object[] { comboBoxStyle, new Size(0, 0), 0, 0 }; 766yield return new object[] { comboBoxStyle, new Size(0, 20), 0, 0 }; 768yield return new object[] { comboBoxStyle, new Size(30, 30), 0, expectedEnd }; 770yield return new object[] { comboBoxStyle, new Size(50, 20), 0, expectedEnd }; 771yield return new object[] { comboBoxStyle, new Size(150, 20), 0, 26 }; 807yield return new object[] { comboBoxStyle, new Size(0, 0) }; 808yield return new object[] { comboBoxStyle, new Size(0, 20) }; 809yield return new object[] { comboBoxStyle, new Size(30, 30) }; 810yield return new object[] { comboBoxStyle, new Size(50, 20) }; 811yield return new object[] { comboBoxStyle, new Size(150, 20) }; 837yield return new object[] { ComboBoxStyle.DropDown, new Size(0, 0) }; 838yield return new object[] { ComboBoxStyle.DropDown, new Size(100, 20) }; 839yield return new object[] { ComboBoxStyle.Simple, new Size(0, 0) }; 840yield return new object[] { ComboBoxStyle.Simple, new Size(100, 20) }; 1041using ComboBox comboBox = new() { DropDownStyle = dropDownStyle, Size = new(50, 100) }; 1062using ComboBox comboBox = new() { DropDownStyle = dropDownStyle, Size = new(50, 100) }; 1079using ComboBox comboBox = new() { DropDownStyle = dropDownStyle, Size = new(50, 100) }; 1098using ComboBox comboBox = new() { DropDownStyle = dropDownStyle, Size = new(50, 100) }; 1111using ComboBox comboBox = new() { DropDownStyle = dropDownStyle, Size = new(50, 100) }; 1125using ComboBox comboBox = new() { DropDownStyle = dropDownStyle, Size = new(50, 100) }; 1149using ComboBox comboBox = new() { DropDownStyle = dropDownStyle, Size = new(width, height) }; 1170using ComboBox comboBox = new() { DropDownStyle = dropDownStyle, Size = new(50, 100) };
System\Windows\Forms\ComboBoxTests.cs (5)
46Assert.Equal(new Size(117, control.PreferredHeight - 4), control.ClientSize); 63Assert.Equal(new Size(121, control.PreferredHeight), control.DefaultSize); 108Assert.Equal(new Size(121, control.PreferredHeight), control.PreferredSize); 120Assert.Equal(new Size(121, control.PreferredHeight), control.Size); 2155using ComboBox comboBox = new() { DropDownStyle = dropDownStyle, Size = new(100, 50) };
System\Windows\Forms\ContainerControlTests.cs (4)
435Assert.Equal(new Size(1, 1), control.AutoScaleFactor); 442Assert.Equal(new Size(1, 1), control.AutoScaleFactor); 710Assert.Equal(new Size(1, 1), control.AutoScaleFactor); 716Assert.Equal(new Size(1, 1), control.AutoScaleFactor);
System\Windows\Forms\ControlPaintTests.cs (13)
1263yield return new object[] { Rectangle.Empty, new Size(1, 1), Color.Red }; 1264yield return new object[] { new Rectangle(1, 2, -3, -4), new Size(1, 1), Color.Red }; 1265yield return new object[] { new Rectangle(0, 0, 3, 4), new Size(1, 1), Color.Red }; 1266yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), Color.Red }; 1267yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), Color.Black }; 1268yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), Color.White }; 1269yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), Color.Empty }; 1270yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), Color.Transparent }; 1271yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(10, 20), Color.Red }; 1272yield return new object[] { new Rectangle(1, 2, 4, 3), new Size(10, 20), Color.Red }; 1273yield return new object[] { new Rectangle(1, 2, 3, 3), new Size(10, 20), Color.Red }; 1291Assert.Throws<ArgumentNullException>("graphics", () => ControlPaint.DrawGrid(null, new Rectangle(1, 2, 3, 4), new Size(1, 1), Color.Red)); 1303Assert.Throws<ArgumentOutOfRangeException>("pixelsBetweenDots", () => ControlPaint.DrawGrid(graphics, new Rectangle(0, 0, width, height), new Size(width, height), Color.Red));
System\Windows\Forms\ControlTests.cs (10)
222Assert.Equal(new Size(width, height), control.ClientSize); 263Assert.Equal(new Size(width, height), control.PreferredSize); 273Assert.Equal(new Size(width, height), control.Size); 414Assert.Equal(new Size(width, height), control.ClientSize); 455Assert.Equal(new Size(width, height), control.PreferredSize); 465Assert.Equal(new Size(width, height), control.Size); 1045checkedListBox1.Size = new Size(103, 64); 1048button1.Size = new Size(213, 20); 1052listBox1.Size = new Size(101, 69); 1056listView1.Size = new Size(121, 64);
System\Windows\Forms\ControlTests.Handlers.cs (6)
2797ClientSize = new Size(10, 20) 2801ClientSize = new Size(10, 20) 2897ClientSize = new Size(10, 20) 2901ClientSize = new Size(10, 20) 2974ClientSize = new Size(10, 20) 2978ClientSize = new Size(10, 20)
System\Windows\Forms\ControlTests.Internals.cs (1)
187Size expectedSize = new(expected, expected);
System\Windows\Forms\ControlTests.Methods.cs (468)
2317yield return new object[] { new Size(-1, -2) }; 2318yield return new object[] { new Size(10, 20) }; 2319yield return new object[] { new Size(30, 40) }; 2320yield return new object[] { new Size(int.MaxValue, int.MaxValue) }; 2344Assert.Equal(new Size(30, 40), control.GetPreferredSize(proposedSize)); 2348Assert.Equal(new Size(30, 40), control.GetPreferredSize(proposedSize)); 2354yield return new object[] { Size.Empty, Size.Empty, new Size(30, 40), Size.Empty }; 2355yield return new object[] { new Size(10, 20), Size.Empty, new Size(30, 40), new Size(10, 20) }; 2356yield return new object[] { new Size(30, 40), Size.Empty, new Size(30, 40), new Size(30, 40) }; 2357yield return new object[] { new Size(31, 40), Size.Empty, new Size(30, 40), new Size(31, 40) }; 2358yield return new object[] { new Size(30, 41), Size.Empty, new Size(30, 40), new Size(30, 41) }; 2359yield return new object[] { new Size(40, 50), Size.Empty, new Size(30, 40), new Size(40, 50) }; 2360yield return new object[] { Size.Empty, new Size(20, 10), new Size(30, 40), Size.Empty }; 2361yield return new object[] { Size.Empty, new Size(30, 40), new Size(30, 40), Size.Empty }; 2362yield return new object[] { Size.Empty, new Size(31, 40), new Size(30, 40), Size.Empty }; 2363yield return new object[] { Size.Empty, new Size(30, 41), new Size(30, 40), Size.Empty }; 2364yield return new object[] { Size.Empty, new Size(40, 50), new Size(30, 40), Size.Empty }; 2365yield return new object[] { new Size(10, 20), new Size(40, 50), new Size(30, 40), new Size(10, 20) }; 2366yield return new object[] { new Size(10, 20), new Size(40, 50), new Size(int.MaxValue, int.MaxValue), new Size(10, 20) }; 2367yield return new object[] { new Size(10, 20), new Size(20, 30), new Size(30, 40), new Size(10, 20) }; 2368yield return new object[] { new Size(10, 20), new Size(20, 30), new Size(30, 40), new Size(10, 20) }; 2369yield return new object[] { new Size(30, 40), new Size(20, 30), new Size(30, 40), new Size(30, 40) }; 2370yield return new object[] { new Size(30, 40), new Size(40, 50), new Size(30, 40), new Size(30, 40) }; 2371yield return new object[] { new Size(40, 50), new Size(20, 30), new Size(30, 40), new Size(40, 50) }; 2372yield return new object[] { new Size(40, 50), new Size(40, 50), new Size(30, 40), new Size(40, 50) }; 2396yield return new object[] { Rectangle.Empty, new Size(0, 0), specified, Rectangle.Empty }; 2397yield return new object[] { Rectangle.Empty, new Size(1, 1), specified, Rectangle.Empty }; 2398yield return new object[] { Rectangle.Empty, new Size(2, 3), specified, Rectangle.Empty }; 2399yield return new object[] { Rectangle.Empty, new Size(-2, -3), specified, Rectangle.Empty }; 2402yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(0, 0), BoundsSpecified.All, Rectangle.Empty }; 2403yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(0, 0), BoundsSpecified.X, new Rectangle(0, 2, 3, 4) }; 2404yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(0, 0), BoundsSpecified.Y, new Rectangle(1, 0, 3, 4) }; 2405yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(0, 0), BoundsSpecified.Width, new Rectangle(1, 2, 0, 4) }; 2406yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(0, 0), BoundsSpecified.Height, new Rectangle(1, 2, 3, 0) }; 2408yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), BoundsSpecified.All, new Rectangle(1, 2, 3, 4) }; 2409yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), BoundsSpecified.X, new Rectangle(1, 2, 3, 4) }; 2410yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), BoundsSpecified.Y, new Rectangle(1, 2, 3, 4) }; 2411yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), BoundsSpecified.Width, new Rectangle(1, 2, 3, 4) }; 2412yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), BoundsSpecified.Height, new Rectangle(1, 2, 3, 4) }; 2414yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(2, 3), BoundsSpecified.All, new Rectangle(2, 6, 6, 12) }; 2415yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(2, 3), BoundsSpecified.X, new Rectangle(2, 2, 3, 4) }; 2416yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(2, 3), BoundsSpecified.Y, new Rectangle(1, 6, 3, 4) }; 2417yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(2, 3), BoundsSpecified.Width, new Rectangle(1, 2, 6, 4) }; 2418yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(2, 3), BoundsSpecified.Height, new Rectangle(1, 2, 3, 12) }; 2420yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(-2, -3), BoundsSpecified.All, new Rectangle(-2, -6, -6, -12) }; 2421yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(-2, -3), BoundsSpecified.X, new Rectangle(-2, 2, 3, 4) }; 2422yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(-2, -3), BoundsSpecified.Y, new Rectangle(1, -6, 3, 4) }; 2423yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(-2, -3), BoundsSpecified.Width, new Rectangle(1, 2, -6, 4) }; 2424yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(-2, -3), BoundsSpecified.Height, new Rectangle(1, 2, 3, -12) }; 2442yield return new object[] { Rectangle.Empty, new Size(0, 0), BoundsSpecified.All, new Rectangle(0, 0, 4, 4) }; 2443yield return new object[] { Rectangle.Empty, new Size(0, 0), BoundsSpecified.X, Rectangle.Empty }; 2444yield return new object[] { Rectangle.Empty, new Size(0, 0), BoundsSpecified.Y, Rectangle.Empty }; 2445yield return new object[] { Rectangle.Empty, new Size(0, 0), BoundsSpecified.Width, new Rectangle(0, 0, 4, 0) }; 2446yield return new object[] { Rectangle.Empty, new Size(0, 0), BoundsSpecified.Height, new Rectangle(0, 0, 0, 4) }; 2448yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(0, 0), BoundsSpecified.All, new Rectangle(0, 0, 4, 4) }; 2449yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(0, 0), BoundsSpecified.X, new Rectangle(0, 2, 3, 4) }; 2450yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(0, 0), BoundsSpecified.Y, new Rectangle(1, 0, 3, 4) }; 2451yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(0, 0), BoundsSpecified.Width, new Rectangle(1, 2, 4, 4) }; 2452yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(0, 0), BoundsSpecified.Height, new Rectangle(1, 2, 3, 4) }; 2454yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), BoundsSpecified.All, new Rectangle(1, 2, 3, 4) }; 2455yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), BoundsSpecified.X, new Rectangle(1, 2, 3, 4) }; 2456yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), BoundsSpecified.Y, new Rectangle(1, 2, 3, 4) }; 2457yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), BoundsSpecified.Width, new Rectangle(1, 2, 3, 4) }; 2458yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), BoundsSpecified.Height, new Rectangle(1, 2, 3, 4) }; 2460yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(2, 3), BoundsSpecified.All, new Rectangle(2, 6, 2, 4) }; 2461yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(2, 3), BoundsSpecified.X, new Rectangle(2, 2, 3, 4) }; 2462yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(2, 3), BoundsSpecified.Y, new Rectangle(1, 6, 3, 4) }; 2463yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(2, 3), BoundsSpecified.Width, new Rectangle(1, 2, 2, 4) }; 2464yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(2, 3), BoundsSpecified.Height, new Rectangle(1, 2, 3, 4) }; 2466yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(-2, -3), BoundsSpecified.All, new Rectangle(-2, -6, 6, 4) }; 2467yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(-2, -3), BoundsSpecified.X, new Rectangle(-2, 2, 3, 4) }; 2468yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(-2, -3), BoundsSpecified.Y, new Rectangle(1, -6, 3, 4) }; 2469yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(-2, -3), BoundsSpecified.Width, new Rectangle(1, 2, 6, 4) }; 2470yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(-2, -3), BoundsSpecified.Height, new Rectangle(1, 2, 3, 4) }; 2569yield return new object[] { Rectangle.Empty, new Size(0, 0), specified, Rectangle.Empty }; 2570yield return new object[] { Rectangle.Empty, new Size(1, 1), specified, Rectangle.Empty }; 2571yield return new object[] { Rectangle.Empty, new Size(2, 3), specified, Rectangle.Empty }; 2572yield return new object[] { Rectangle.Empty, new Size(-2, -3), specified, Rectangle.Empty }; 2575yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(0, 0), BoundsSpecified.All, new Rectangle(1, 2, 0, 0) }; 2576yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(0, 0), BoundsSpecified.X, new Rectangle(1, 2, 3, 4) }; 2577yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(0, 0), BoundsSpecified.Y, new Rectangle(1, 2, 3, 4) }; 2578yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(0, 0), BoundsSpecified.Width, new Rectangle(1, 2, 0, 4) }; 2579yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(0, 0), BoundsSpecified.Height, new Rectangle(1, 2, 3, 0) }; 2581yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), BoundsSpecified.All, new Rectangle(1, 2, 3, 4) }; 2582yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), BoundsSpecified.X, new Rectangle(1, 2, 3, 4) }; 2583yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), BoundsSpecified.Y, new Rectangle(1, 2, 3, 4) }; 2584yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), BoundsSpecified.Width, new Rectangle(1, 2, 3, 4) }; 2585yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), BoundsSpecified.Height, new Rectangle(1, 2, 3, 4) }; 2587yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(2, 3), BoundsSpecified.All, new Rectangle(1, 2, 6, 12) }; 2588yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(2, 3), BoundsSpecified.X, new Rectangle(1, 2, 3, 4) }; 2589yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(2, 3), BoundsSpecified.Y, new Rectangle(1, 2, 3, 4) }; 2590yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(2, 3), BoundsSpecified.Width, new Rectangle(1, 2, 6, 4) }; 2591yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(2, 3), BoundsSpecified.Height, new Rectangle(1, 2, 3, 12) }; 2593yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(-2, -3), BoundsSpecified.All, new Rectangle(1, 2, -6, -12) }; 2594yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(-2, -3), BoundsSpecified.X, new Rectangle(1, 2, 3, 4) }; 2595yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(-2, -3), BoundsSpecified.Y, new Rectangle(1, 2, 3, 4) }; 2596yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(-2, -3), BoundsSpecified.Width, new Rectangle(1, 2, -6, 4) }; 2597yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(-2, -3), BoundsSpecified.Height, new Rectangle(1, 2, 3, -12) }; 2658yield return new object[] { Rectangle.Empty, new Size(0, 0), specified, Rectangle.Empty }; 2659yield return new object[] { Rectangle.Empty, new Size(1, 1), specified, Rectangle.Empty }; 2660yield return new object[] { Rectangle.Empty, new Size(2, 3), specified, Rectangle.Empty }; 2661yield return new object[] { Rectangle.Empty, new Size(-2, -3), specified, Rectangle.Empty }; 2664yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(0, 0), BoundsSpecified.All, new Rectangle(0, 0, 3, 0) }; 2665yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(0, 0), BoundsSpecified.X, new Rectangle(0, 2, 3, 4) }; 2666yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(0, 0), BoundsSpecified.Y, new Rectangle(1, 0, 3, 4) }; 2667yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(0, 0), BoundsSpecified.Width, new Rectangle(1, 2, 3, 4) }; 2668yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(0, 0), BoundsSpecified.Height, new Rectangle(1, 2, 3, 0) }; 2670yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), BoundsSpecified.All, new Rectangle(1, 2, 3, 4) }; 2671yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), BoundsSpecified.X, new Rectangle(1, 2, 3, 4) }; 2672yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), BoundsSpecified.Y, new Rectangle(1, 2, 3, 4) }; 2673yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), BoundsSpecified.Width, new Rectangle(1, 2, 3, 4) }; 2674yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), BoundsSpecified.Height, new Rectangle(1, 2, 3, 4) }; 2676yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(2, 3), BoundsSpecified.All, new Rectangle(2, 6, 3, 12) }; 2677yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(2, 3), BoundsSpecified.X, new Rectangle(2, 2, 3, 4) }; 2678yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(2, 3), BoundsSpecified.Y, new Rectangle(1, 6, 3, 4) }; 2679yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(2, 3), BoundsSpecified.Width, new Rectangle(1, 2, 3, 4) }; 2680yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(2, 3), BoundsSpecified.Height, new Rectangle(1, 2, 3, 12) }; 2682yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(-2, -3), BoundsSpecified.All, new Rectangle(-2, -6, 3, -12) }; 2683yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(-2, -3), BoundsSpecified.X, new Rectangle(-2, 2, 3, 4) }; 2684yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(-2, -3), BoundsSpecified.Y, new Rectangle(1, -6, 3, 4) }; 2685yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(-2, -3), BoundsSpecified.Width, new Rectangle(1, 2, 3, 4) }; 2686yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(-2, -3), BoundsSpecified.Height, new Rectangle(1, 2, 3, -12) }; 2708yield return new object[] { Rectangle.Empty, new Size(0, 0), specified, Rectangle.Empty }; 2709yield return new object[] { Rectangle.Empty, new Size(1, 1), specified, Rectangle.Empty }; 2710yield return new object[] { Rectangle.Empty, new Size(2, 3), specified, Rectangle.Empty }; 2711yield return new object[] { Rectangle.Empty, new Size(-2, -3), specified, Rectangle.Empty }; 2714yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(0, 0), BoundsSpecified.All, new Rectangle(0, 0, 0, 4) }; 2715yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(0, 0), BoundsSpecified.X, new Rectangle(0, 2, 3, 4) }; 2716yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(0, 0), BoundsSpecified.Y, new Rectangle(1, 0, 3, 4) }; 2717yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(0, 0), BoundsSpecified.Width, new Rectangle(1, 2, 0, 4) }; 2718yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(0, 0), BoundsSpecified.Height, new Rectangle(1, 2, 3, 4) }; 2720yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), BoundsSpecified.All, new Rectangle(1, 2, 3, 4) }; 2721yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), BoundsSpecified.X, new Rectangle(1, 2, 3, 4) }; 2722yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), BoundsSpecified.Y, new Rectangle(1, 2, 3, 4) }; 2723yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), BoundsSpecified.Width, new Rectangle(1, 2, 3, 4) }; 2724yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), BoundsSpecified.Height, new Rectangle(1, 2, 3, 4) }; 2726yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(2, 3), BoundsSpecified.All, new Rectangle(2, 6, 6, 4) }; 2727yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(2, 3), BoundsSpecified.X, new Rectangle(2, 2, 3, 4) }; 2728yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(2, 3), BoundsSpecified.Y, new Rectangle(1, 6, 3, 4) }; 2729yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(2, 3), BoundsSpecified.Width, new Rectangle(1, 2, 6, 4) }; 2730yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(2, 3), BoundsSpecified.Height, new Rectangle(1, 2, 3, 4) }; 2732yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(-2, -3), BoundsSpecified.All, new Rectangle(-2, -6, -6, 4) }; 2733yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(-2, -3), BoundsSpecified.X, new Rectangle(-2, 2, 3, 4) }; 2734yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(-2, -3), BoundsSpecified.Y, new Rectangle(1, -6, 3, 4) }; 2735yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(-2, -3), BoundsSpecified.Width, new Rectangle(1, 2, -6, 4) }; 2736yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(-2, -3), BoundsSpecified.Height, new Rectangle(1, 2, 3, 4) }; 2758yield return new object[] { Rectangle.Empty, new Size(0, 0), specified, Rectangle.Empty }; 2759yield return new object[] { Rectangle.Empty, new Size(1, 1), specified, Rectangle.Empty }; 2760yield return new object[] { Rectangle.Empty, new Size(2, 3), specified, Rectangle.Empty }; 2761yield return new object[] { Rectangle.Empty, new Size(-2, -3), specified, Rectangle.Empty }; 2764yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(0, 0), BoundsSpecified.All, new Rectangle(0, 0, 3, 4) }; 2765yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(0, 0), BoundsSpecified.X, new Rectangle(0, 2, 3, 4) }; 2766yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(0, 0), BoundsSpecified.Y, new Rectangle(1, 0, 3, 4) }; 2767yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(0, 0), BoundsSpecified.Width, new Rectangle(1, 2, 3, 4) }; 2768yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(0, 0), BoundsSpecified.Height, new Rectangle(1, 2, 3, 4) }; 2770yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), BoundsSpecified.All, new Rectangle(1, 2, 3, 4) }; 2771yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), BoundsSpecified.X, new Rectangle(1, 2, 3, 4) }; 2772yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), BoundsSpecified.Y, new Rectangle(1, 2, 3, 4) }; 2773yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), BoundsSpecified.Width, new Rectangle(1, 2, 3, 4) }; 2774yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), BoundsSpecified.Height, new Rectangle(1, 2, 3, 4) }; 2776yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(2, 3), BoundsSpecified.All, new Rectangle(2, 6, 3, 4) }; 2777yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(2, 3), BoundsSpecified.X, new Rectangle(2, 2, 3, 4) }; 2778yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(2, 3), BoundsSpecified.Y, new Rectangle(1, 6, 3, 4) }; 2779yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(2, 3), BoundsSpecified.Width, new Rectangle(1, 2, 3, 4) }; 2780yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(2, 3), BoundsSpecified.Height, new Rectangle(1, 2, 3, 4) }; 2782yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(-2, -3), BoundsSpecified.All, new Rectangle(-2, -6, 3, 4) }; 2783yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(-2, -3), BoundsSpecified.X, new Rectangle(-2, 2, 3, 4) }; 2784yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(-2, -3), BoundsSpecified.Y, new Rectangle(1, -6, 3, 4) }; 2785yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(-2, -3), BoundsSpecified.Width, new Rectangle(1, 2, 3, 4) }; 2786yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(-2, -3), BoundsSpecified.Height, new Rectangle(1, 2, 3, 4) }; 2992Size = new Size(10, 20) 3028Size = new Size(10, 20) 3032Size = new Size(10, 20) 3107Size = new Size(10, 20) 3146Size = new Size(10, 20) 3150Size = new Size(10, 20) 3245Size = new Size(10, 20) 3281Size = new Size(10, 20) 3285Size = new Size(10, 20) 3386Size = new Size(10, 20) 3422Size = new Size(10, 20) 3426Size = new Size(10, 20) 3523Size = new Size(10, 20) 3559Size = new Size(10, 20) 3563Size = new Size(10, 20) 3666Size = new Size(10, 20) 3702Size = new Size(10, 20) 3706Size = new Size(10, 20) 4555ClientSize = new Size(10, 20) 4559ClientSize = new Size(10, 20) 4655ClientSize = new Size(10, 20) 4659ClientSize = new Size(10, 20) 7383Assert.Equal(new Size(width, height), control.ClientSize); 7386Assert.Equal(new Size(width, height), control.Size); 7402Assert.Equal(new Size(width, height), control.ClientSize); 7405Assert.Equal(new Size(width, height), control.Size); 7423yield return new object[] { new Size(10, 20), Size.Empty, 1, 2, 30, 40, 30, 40, 1 }; 7424yield return new object[] { new Size(30, 40), Size.Empty, 1, 2, 30, 40, 30, 40, 0 }; 7425yield return new object[] { new Size(31, 40), Size.Empty, 1, 2, 30, 40, 31, 40, 0 }; 7426yield return new object[] { new Size(30, 41), Size.Empty, 1, 2, 30, 40, 30, 41, 0 }; 7427yield return new object[] { new Size(40, 50), Size.Empty, 1, 2, 30, 40, 40, 50, 0 }; 7428yield return new object[] { Size.Empty, new Size(20, 10), 1, 2, 30, 40, 20, 10, 1 }; 7429yield return new object[] { Size.Empty, new Size(30, 40), 1, 2, 30, 40, 30, 40, 1 }; 7430yield return new object[] { Size.Empty, new Size(31, 40), 1, 2, 30, 40, 30, 40, 1 }; 7431yield return new object[] { Size.Empty, new Size(30, 41), 1, 2, 30, 40, 30, 40, 1 }; 7432yield return new object[] { Size.Empty, new Size(40, 50), 1, 2, 30, 40, 30, 40, 1 }; 7433yield return new object[] { new Size(10, 20), new Size(40, 50), 1, 2, 30, 40, 30, 40, 1 }; 7434yield return new object[] { new Size(10, 20), new Size(20, 30), 1, 2, 30, 40, 20, 30, 1 }; 7435yield return new object[] { new Size(10, 20), new Size(20, 30), 1, 2, 30, 40, 20, 30, 1 }; 7436yield return new object[] { new Size(30, 40), new Size(20, 30), 1, 2, 30, 40, 30, 40, 0 }; 7437yield return new object[] { new Size(30, 40), new Size(40, 50), 1, 2, 30, 40, 30, 40, 0 }; 7438yield return new object[] { new Size(40, 50), new Size(20, 30), 1, 2, 30, 40, 40, 50, 0 }; 7439yield return new object[] { new Size(40, 50), new Size(40, 50), 1, 2, 30, 40, 40, 50, 0 }; 7494Assert.Equal(new Size(expectedWidth, expectedHeight), control.ClientSize); 7497Assert.Equal(new Size(expectedWidth, expectedHeight), control.Size); 7513Assert.Equal(new Size(expectedWidth, expectedHeight), control.ClientSize); 7516Assert.Equal(new Size(expectedWidth, expectedHeight), control.Size); 7592Assert.Equal(new Size(expectedClientWidth, expectedClientHeight), control.ClientSize); 7595Assert.Equal(new Size(width, height), control.Size); 7611Assert.Equal(new Size(expectedClientWidth, expectedClientHeight), control.ClientSize); 7614Assert.Equal(new Size(width, height), control.Size); 7710Assert.Equal(new Size(width, height), control.ClientSize); 7713Assert.Equal(new Size(width, height), control.Size); 7730Assert.Equal(new Size(width, height), control.ClientSize); 7733Assert.Equal(new Size(width, height), control.Size); 7833Assert.Equal(new Size(expectedWidth, expectedHeight), control.ClientSize); 7836Assert.Equal(new Size(expectedWidth, expectedHeight), control.Size); 7855Assert.Equal(new Size(expectedWidth, expectedHeight), control.ClientSize); 7858Assert.Equal(new Size(expectedWidth, expectedHeight), control.Size); 7981Assert.Equal(new Size(expectedWidth, expectedHeight), control.ClientSize); 7984Assert.Equal(new Size(expectedWidth, expectedHeight), control.Size); 8008Assert.Equal(new Size(expectedWidth, expectedHeight), control.ClientSize); 8011Assert.Equal(new Size(expectedWidth, expectedHeight), control.Size); 8170Assert.Equal(new Size(expectedWidth, expectedHeight), control.ClientSize); 8173Assert.Equal(new Size(expectedWidth, expectedHeight), control.Size); 8189Assert.Equal(new Size(expectedWidth, expectedHeight), control.ClientSize); 8192Assert.Equal(new Size(expectedWidth, expectedHeight), control.Size); 8210yield return new object[] { new Size(10, 20), Size.Empty, 1, 2, 30, 40, BoundsSpecified.All, 1, 2, 30, 40, 1 }; 8211yield return new object[] { new Size(30, 40), Size.Empty, 1, 2, 30, 40, BoundsSpecified.All, 1, 2, 30, 40, 0 }; 8212yield return new object[] { new Size(31, 40), Size.Empty, 1, 2, 30, 40, BoundsSpecified.All, 1, 2, 31, 40, 0 }; 8213yield return new object[] { new Size(30, 41), Size.Empty, 1, 2, 30, 40, BoundsSpecified.All, 1, 2, 30, 41, 0 }; 8214yield return new object[] { new Size(40, 50), Size.Empty, 1, 2, 30, 40, BoundsSpecified.All, 1, 2, 40, 50, 0 }; 8215yield return new object[] { Size.Empty, new Size(20, 10), 1, 2, 30, 40, BoundsSpecified.All, 1, 2, 20, 10, 1 }; 8216yield return new object[] { Size.Empty, new Size(30, 40), 1, 2, 30, 40, BoundsSpecified.All, 1, 2, 30, 40, 1 }; 8217yield return new object[] { Size.Empty, new Size(31, 40), 1, 2, 30, 40, BoundsSpecified.All, 1, 2, 30, 40, 1 }; 8218yield return new object[] { Size.Empty, new Size(30, 41), 1, 2, 30, 40, BoundsSpecified.All, 1, 2, 30, 40, 1 }; 8219yield return new object[] { Size.Empty, new Size(40, 50), 1, 2, 30, 40, BoundsSpecified.All, 1, 2, 30, 40, 1 }; 8220yield return new object[] { new Size(10, 20), new Size(40, 50), 1, 2, 30, 40, BoundsSpecified.All, 1, 2, 30, 40, 1 }; 8221yield return new object[] { new Size(10, 20), new Size(20, 30), 1, 2, 30, 40, BoundsSpecified.All, 1, 2, 20, 30, 1 }; 8222yield return new object[] { new Size(10, 20), new Size(20, 30), 1, 2, 30, 40, BoundsSpecified.All, 1, 2, 20, 30, 1 }; 8223yield return new object[] { new Size(30, 40), new Size(20, 30), 1, 2, 30, 40, BoundsSpecified.All, 1, 2, 30, 40, 0 }; 8224yield return new object[] { new Size(30, 40), new Size(40, 50), 1, 2, 30, 40, BoundsSpecified.All, 1, 2, 30, 40, 0 }; 8225yield return new object[] { new Size(40, 50), new Size(20, 30), 1, 2, 30, 40, BoundsSpecified.All, 1, 2, 40, 50, 0 }; 8226yield return new object[] { new Size(40, 50), new Size(40, 50), 1, 2, 30, 40, BoundsSpecified.All, 1, 2, 40, 50, 0 }; 8281Assert.Equal(new Size(expectedWidth, expectedHeight), control.ClientSize); 8284Assert.Equal(new Size(expectedWidth, expectedHeight), control.Size); 8300Assert.Equal(new Size(expectedWidth, expectedHeight), control.ClientSize); 8303Assert.Equal(new Size(expectedWidth, expectedHeight), control.Size); 8379Assert.Equal(new Size(expectedClientWidth, expectedClientHeight), control.ClientSize); 8382Assert.Equal(new Size(expectedWidth, expectedHeight), control.Size); 8398Assert.Equal(new Size(expectedClientWidth, expectedClientHeight), control.ClientSize); 8401Assert.Equal(new Size(expectedWidth, expectedHeight), control.Size); 8567Assert.Equal(new Size(expectedWidth, expectedHeight), control.ClientSize); 8570Assert.Equal(new Size(expectedWidth, expectedHeight), control.Size); 8587Assert.Equal(new Size(expectedWidth, expectedHeight), control.ClientSize); 8590Assert.Equal(new Size(expectedWidth, expectedHeight), control.Size); 8690Assert.Equal(new Size(expectedWidth, expectedHeight), control.ClientSize); 8693Assert.Equal(new Size(expectedWidth, expectedHeight), control.Size); 8712Assert.Equal(new Size(expectedWidth, expectedHeight), control.ClientSize); 8715Assert.Equal(new Size(expectedWidth, expectedHeight), control.Size); 8838Assert.Equal(new Size(expectedWidth, expectedHeight), control.ClientSize); 8841Assert.Equal(new Size(expectedWidth, expectedHeight), control.Size); 8865Assert.Equal(new Size(expectedWidth, expectedHeight), control.ClientSize); 8868Assert.Equal(new Size(expectedWidth, expectedHeight), control.Size); 8984Assert.Equal(new Size(width, height), control.ClientSize); 8987Assert.Equal(new Size(width, height), control.Size); 9005Assert.Equal(new Size(width, height), control.ClientSize); 9008Assert.Equal(new Size(width, height), control.Size); 9030yield return new object[] { new Size(10, 20), Size.Empty, 1, 2, 30, 40, specified, 30, 40, 1, 1 }; 9031yield return new object[] { new Size(30, 40), Size.Empty, 1, 2, 30, 40, specified, 30, 40, 1, 0 }; 9032yield return new object[] { new Size(31, 40), Size.Empty, 1, 2, 30, 40, specified, 31, 40, 1, 0 }; 9033yield return new object[] { new Size(30, 41), Size.Empty, 1, 2, 30, 40, specified, 30, 41, 1, 0 }; 9034yield return new object[] { new Size(40, 50), Size.Empty, 1, 2, 30, 40, specified, 40, 50, 1, 0 }; 9035yield return new object[] { Size.Empty, new Size(20, 10), 1, 2, 30, 40, specified, 20, 10, 1, 1 }; 9036yield return new object[] { Size.Empty, new Size(30, 40), 1, 2, 30, 40, specified, 30, 40, 1, 1 }; 9037yield return new object[] { Size.Empty, new Size(31, 40), 1, 2, 30, 40, specified, 30, 40, 1, 1 }; 9038yield return new object[] { Size.Empty, new Size(30, 41), 1, 2, 30, 40, specified, 30, 40, 1, 1 }; 9039yield return new object[] { Size.Empty, new Size(40, 50), 1, 2, 30, 40, specified, 30, 40, 1, 1 }; 9040yield return new object[] { new Size(10, 20), new Size(40, 50), 1, 2, 30, 40, specified, 30, 40, 1, 1 }; 9041yield return new object[] { new Size(10, 20), new Size(20, 30), 1, 2, 30, 40, specified, 20, 30, 1, 1 }; 9042yield return new object[] { new Size(10, 20), new Size(20, 30), 1, 2, 30, 40, specified, 20, 30, 1, 1 }; 9043yield return new object[] { new Size(30, 40), new Size(20, 30), 1, 2, 30, 40, specified, 30, 40, 1, 0 }; 9044yield return new object[] { new Size(30, 40), new Size(40, 50), 1, 2, 30, 40, specified, 30, 40, 1, 0 }; 9045yield return new object[] { new Size(40, 50), new Size(20, 30), 1, 2, 30, 40, specified, 40, 50, 1, 0 }; 9046yield return new object[] { new Size(40, 50), new Size(40, 50), 1, 2, 30, 40, specified, 40, 50, 1, 0 }; 9126Assert.Equal(new Size(expectedWidth, expectedHeight), control.ClientSize); 9129Assert.Equal(new Size(expectedWidth, expectedHeight), control.Size); 9147Assert.Equal(new Size(expectedWidth, expectedHeight), control.ClientSize); 9150Assert.Equal(new Size(expectedWidth, expectedHeight), control.Size); 9255Assert.Equal(new Size(expectedClientWidth, expectedClientHeight), control.ClientSize); 9258Assert.Equal(new Size(width, height), control.Size); 9276Assert.Equal(new Size(expectedClientWidth, expectedClientHeight), control.ClientSize); 9279Assert.Equal(new Size(width, height), control.Size); 9392Assert.Equal(new Size(width, height), control.ClientSize); 9395Assert.Equal(new Size(width, height), control.Size); 9414Assert.Equal(new Size(width, height), control.ClientSize); 9417Assert.Equal(new Size(width, height), control.Size); 9547Assert.Equal(new Size(expectedWidth, expectedHeight), control.ClientSize); 9550Assert.Equal(new Size(expectedWidth, expectedHeight), control.Size); 9571Assert.Equal(new Size(expectedWidth, expectedHeight), control.ClientSize); 9574Assert.Equal(new Size(expectedWidth, expectedHeight), control.Size); 9705Assert.Equal(new Size(expectedWidth, expectedHeight), control.ClientSize); 9708Assert.Equal(new Size(expectedWidth, expectedHeight), control.Size); 9734Assert.Equal(new Size(expectedWidth, expectedHeight), control.ClientSize); 9737Assert.Equal(new Size(expectedWidth, expectedHeight), control.Size); 9923Assert.Equal(new Size(10, 10), control.ClientSize); 9929Assert.Equal(new Size(10, 10), control.ClientSize); 9935Assert.Equal(new Size(11, 11), control.ClientSize); 9943Assert.Equal(new Size(10, 10), control.ClientSize); 10097yield return new object[] { new Size(1, 2) }; 10098yield return new object[] { new Size(-1, -2) }; 10119Size expected = new(clientSize.Width + 4, clientSize.Height + 4); 10763Assert.Equal(new Size(3, 4), control.ClientSize); 10766Assert.Equal(new Size(3, 4), control.Size); 10785Assert.Equal(new Size(3, 4), control.ClientSize); 10788Assert.Equal(new Size(3, 4), control.Size); 10841Assert.Equal(new Size(3, 4), control.ClientSize); 10844Assert.Equal(new Size(3, 4), control.Size); 10867Assert.Equal(new Size(3, 4), control.ClientSize); 10870Assert.Equal(new Size(3, 4), control.Size); 10953Assert.Equal(new Size(width, height), control.ClientSize); 10956Assert.Equal(new Size(width, height), control.Size); 10972Assert.Equal(new Size(width, height), control.ClientSize); 10975Assert.Equal(new Size(width, height), control.Size); 10993yield return new object[] { new Size(10, 20), Size.Empty, 1, 2, 30, 40, 1 }; 10994yield return new object[] { new Size(30, 40), Size.Empty, 1, 2, 30, 40, 0 }; 10995yield return new object[] { new Size(31, 40), Size.Empty, 1, 2, 30, 40, 1 }; 10996yield return new object[] { new Size(30, 41), Size.Empty, 1, 2, 30, 40, 1 }; 10997yield return new object[] { new Size(40, 50), Size.Empty, 1, 2, 30, 40, 1 }; 10998yield return new object[] { Size.Empty, new Size(20, 10), 1, 2, 30, 40, 1 }; 10999yield return new object[] { Size.Empty, new Size(30, 40), 1, 2, 30, 40, 1 }; 11000yield return new object[] { Size.Empty, new Size(31, 40), 1, 2, 30, 40, 1 }; 11001yield return new object[] { Size.Empty, new Size(30, 41), 1, 2, 30, 40, 1 }; 11002yield return new object[] { Size.Empty, new Size(40, 50), 1, 2, 30, 40, 1 }; 11003yield return new object[] { new Size(10, 20), new Size(40, 50), 1, 2, 30, 40, 1 }; 11004yield return new object[] { new Size(10, 20), new Size(20, 30), 1, 2, 30, 40, 1 }; 11005yield return new object[] { new Size(10, 20), new Size(20, 30), 1, 2, 30, 40, 1 }; 11006yield return new object[] { new Size(30, 40), new Size(20, 30), 1, 2, 30, 40, 0 }; 11007yield return new object[] { new Size(30, 40), new Size(40, 50), 1, 2, 30, 40, 0 }; 11008yield return new object[] { new Size(40, 50), new Size(20, 30), 1, 2, 30, 40, 1 }; 11009yield return new object[] { new Size(40, 50), new Size(40, 50), 1, 2, 30, 40, 1 }; 11064Assert.Equal(new Size(width, height), control.ClientSize); 11067Assert.Equal(new Size(width, height), control.Size); 11083Assert.Equal(new Size(width, height), control.ClientSize); 11086Assert.Equal(new Size(width, height), control.Size); 11162Assert.Equal(new Size(expectedClientWidth, expectedClientHeight), control.ClientSize); 11165Assert.Equal(new Size(width, height), control.Size); 11181Assert.Equal(new Size(expectedClientWidth, expectedClientHeight), control.ClientSize); 11184Assert.Equal(new Size(width, height), control.Size); 11271Assert.Equal(new Size(width, height), control.ClientSize); 11274Assert.Equal(new Size(width, height), control.Size); 11291Assert.Equal(new Size(width, height), control.ClientSize); 11294Assert.Equal(new Size(width, height), control.Size); 11394Assert.Equal(new Size(width, height), control.ClientSize); 11397Assert.Equal(new Size(width, height), control.Size); 11416Assert.Equal(new Size(width, height), control.ClientSize); 11419Assert.Equal(new Size(width, height), control.Size); 11523Assert.Equal(new Size(width, height), control.ClientSize); 11526Assert.Equal(new Size(width, height), control.Size); 11550Assert.Equal(new Size(width, height), control.ClientSize); 11553Assert.Equal(new Size(width, height), control.Size); 11648Assert.Equal(new Size(clientWidth, clientHeight), control.ClientSize); 11651Assert.Equal(new Size(width, height), control.Size); 11667Assert.Equal(new Size(clientWidth, clientHeight), control.ClientSize); 11670Assert.Equal(new Size(width, height), control.Size); 11757Assert.Equal(new Size(clientWidth, clientHeight), control.ClientSize); 11760Assert.Equal(new Size(width, height), control.Size); 11777Assert.Equal(new Size(clientWidth, clientHeight), control.ClientSize); 11780Assert.Equal(new Size(width, height), control.Size); 11892Assert.Equal(new Size(clientWidth, clientHeight), control.ClientSize); 11895Assert.Equal(new Size(width, height), control.Size); 11914Assert.Equal(new Size(clientWidth, clientHeight), control.ClientSize); 11917Assert.Equal(new Size(width, height), control.Size); 12021Assert.Equal(new Size(clientWidth, clientHeight), control.ClientSize); 12024Assert.Equal(new Size(width, height), control.Size); 12048Assert.Equal(new Size(clientWidth, clientHeight), control.ClientSize); 12051Assert.Equal(new Size(width, height), control.Size); 12477yield return new object[] { new Size(10, 20), (IntPtr)(-1) }; 12478yield return new object[] { new Size(10, 20), PARAM.FromLowHigh(0, 0) }; 12479yield return new object[] { new Size(10, 20), PARAM.FromLowHigh(1, 2) }; 12480yield return new object[] { new Size(10, 20), PARAM.FromLowHigh(-1, -2) }; 12515yield return new object[] { new Size(10, 20), (IntPtr)(-1), (IntPtr)250, true }; 12516yield return new object[] { new Size(10, 20), PARAM.FromLowHigh(0, 0), IntPtr.Zero, true }; 12517yield return new object[] { new Size(10, 20), PARAM.FromLowHigh(1, 2), IntPtr.Zero, true }; 12518yield return new object[] { new Size(10, 20), PARAM.FromLowHigh(p.X, p.Y), (IntPtr)250, true }; 12519yield return new object[] { new Size(10, 20), PARAM.FromLowHigh(-1, -2), IntPtr.Zero, true }; 12589yield return new object[] { new Size(10, 20), (IntPtr)(-1), (IntPtr)250 }; 12590yield return new object[] { new Size(10, 20), PARAM.FromLowHigh(0, 0), IntPtr.Zero }; 12591yield return new object[] { new Size(10, 20), PARAM.FromLowHigh(1, 2), IntPtr.Zero }; 12592yield return new object[] { new Size(10, 20), PARAM.FromLowHigh(p.X, p.Y), (IntPtr)250 }; 12593yield return new object[] { new Size(10, 20), PARAM.FromLowHigh(-1, -2), IntPtr.Zero };
System\Windows\Forms\ControlTests.Properties.cs (734)
2478Assert.Equal(new Size(width, height), control.ClientSize); 2481Assert.Equal(new Size(width, height), control.Size); 2497Assert.Equal(new Size(width, height), control.ClientSize); 2500Assert.Equal(new Size(width, height), control.Size); 2567Assert.Equal(new Size(expectedWidth, expectedHeight), control.ClientSize); 2570Assert.Equal(new Size(expectedWidth, expectedHeight), control.Size); 2586Assert.Equal(new Size(expectedWidth, expectedHeight), control.ClientSize); 2589Assert.Equal(new Size(expectedWidth, expectedHeight), control.Size); 2652Assert.Equal(new Size(expectedClientWidth, expectedClientHeight), control.ClientSize); 2655Assert.Equal(new Size(width, height), control.Size); 2671Assert.Equal(new Size(expectedClientWidth, expectedClientHeight), control.ClientSize); 2674Assert.Equal(new Size(width, height), control.Size); 2757Assert.Equal(new Size(width, height), control.ClientSize); 2760Assert.Equal(new Size(width, height), control.Size); 2777Assert.Equal(new Size(width, height), control.ClientSize); 2780Assert.Equal(new Size(width, height), control.Size); 2857Assert.Equal(new Size(expectedWidth, expectedHeight), control.ClientSize); 2860Assert.Equal(new Size(expectedWidth, expectedHeight), control.Size); 2879Assert.Equal(new Size(expectedWidth, expectedHeight), control.ClientSize); 2882Assert.Equal(new Size(expectedWidth, expectedHeight), control.Size); 2982Assert.Equal(new Size(expectedWidth, expectedHeight), control.ClientSize); 2985Assert.Equal(new Size(expectedWidth, expectedHeight), control.Size); 3009Assert.Equal(new Size(expectedWidth, expectedHeight), control.ClientSize); 3012Assert.Equal(new Size(expectedWidth, expectedHeight), control.Size); 3287yield return new object[] { new NonZeroWidthNonZeroHeightBorderedControl(), new Size(6, 16) }; 3299protected override Size DefaultSize => new(10, 0); 3304protected override Size DefaultSize => new(0, 10); 3309protected override Size DefaultSize => new(10, 20); 3314yield return new object[] { new Size(10, 20), 1 }; 3315yield return new object[] { new Size(1, 2), 1 }; 3316yield return new object[] { new Size(0, 0), 0 }; 3317yield return new object[] { new Size(-1, -2), 1 }; 3318yield return new object[] { new Size(-1, 2), 1 }; 3319yield return new object[] { new Size(1, -2), 1 }; 3358yield return new object[] { new Size(10, 20), new Size(14, 24) }; 3359yield return new object[] { new Size(1, 2), new Size(5, 6) }; 3360yield return new object[] { new Size(0, 0), new Size(4, 4) }; 3361yield return new object[] { new Size(-1, -2), new Size(3, 2) }; 3362yield return new object[] { new Size(-1, 2), new Size(3, 6) }; 3363yield return new object[] { new Size(1, -2), new Size(5, 2) }; 3414yield return new object[] { true, new Size(1, 2), new Size(1, 2), 1, 1 }; 3415yield return new object[] { true, new Size(0, 0), new Size(0, 0), 0, 0 }; 3416yield return new object[] { true, new Size(-1, -2), new Size(0, 0), 0, 0 }; 3417yield return new object[] { true, new Size(-1, 2), new Size(0, 2), 1, 1 }; 3418yield return new object[] { true, new Size(1, -2), new Size(1, 0), 1, 1 }; 3420yield return new object[] { false, new Size(1, 2), new Size(1, 2), 1, 0 }; 3421yield return new object[] { false, new Size(0, 0), new Size(0, 0), 0, 0 }; 3422yield return new object[] { false, new Size(-1, -2), new Size(0, 0), 0, 0 }; 3423yield return new object[] { false, new Size(-1, 2), new Size(0, 2), 1, 0 }; 3424yield return new object[] { false, new Size(1, -2), new Size(1, 0), 1, 0 }; 3502control.ClientSize = new Size(10, 10); 3503Assert.Equal(new Size(10, 10), control.ClientSize); 3508control.ClientSize = new Size(10, 10); 3509Assert.Equal(new Size(10, 10), control.ClientSize); 3514control.ClientSize = new Size(11, 11); 3515Assert.Equal(new Size(11, 11), control.ClientSize); 3522control.ClientSize = new Size(10, 10); 3523Assert.Equal(new Size(10, 10), control.ClientSize); 5728Assert.Equal(new Size(0, value), control.ClientSize); 5731Assert.Equal(new Size(0, value), control.Size); 5747Assert.Equal(new Size(0, value), control.ClientSize); 5750Assert.Equal(new Size(0, value), control.Size); 5768yield return new object[] { new Size(10, 20), Size.Empty, 40, 10, 40, 1 }; 5769yield return new object[] { new Size(30, 40), Size.Empty, 40, 30, 40, 0 }; 5770yield return new object[] { new Size(31, 40), Size.Empty, 40, 31, 40, 0 }; 5771yield return new object[] { new Size(30, 41), Size.Empty, 40, 30, 41, 0 }; 5772yield return new object[] { new Size(40, 50), Size.Empty, 40, 40, 50, 0 }; 5773yield return new object[] { Size.Empty, new Size(20, 10), 40, 0, 10, 1 }; 5774yield return new object[] { Size.Empty, new Size(30, 40), 40, 0, 40, 1 }; 5775yield return new object[] { Size.Empty, new Size(31, 40), 40, 0, 40, 1 }; 5776yield return new object[] { Size.Empty, new Size(30, 41), 40, 0, 40, 1 }; 5777yield return new object[] { Size.Empty, new Size(40, 50), 40, 0, 40, 1 }; 5778yield return new object[] { new Size(10, 20), new Size(40, 50), 40, 10, 40, 1 }; 5779yield return new object[] { new Size(10, 20), new Size(20, 30), 40, 10, 30, 1 }; 5780yield return new object[] { new Size(30, 40), new Size(20, 30), 40, 30, 40, 0 }; 5781yield return new object[] { new Size(30, 40), new Size(40, 50), 40, 30, 40, 0 }; 5782yield return new object[] { new Size(40, 50), new Size(20, 30), 40, 40, 50, 0 }; 5783yield return new object[] { new Size(40, 50), new Size(40, 50), 40, 40, 50, 0 }; 5838Assert.Equal(new Size(expectedWidth, expectedHeight), control.ClientSize); 5841Assert.Equal(new Size(expectedWidth, expectedHeight), control.Size); 5857Assert.Equal(new Size(expectedWidth, expectedHeight), control.ClientSize); 5860Assert.Equal(new Size(expectedWidth, expectedHeight), control.Size); 5926Assert.Equal(new Size(expectedClientWidth, expectedClientHeight), control.ClientSize); 5929Assert.Equal(new Size(0, value), control.Size); 5945Assert.Equal(new Size(expectedClientWidth, expectedClientHeight), control.ClientSize); 5948Assert.Equal(new Size(0, value), control.Size); 6034Assert.Equal(new Size(0, value), control.ClientSize); 6037Assert.Equal(new Size(0, value), control.Size); 6054Assert.Equal(new Size(0, value), control.ClientSize); 6057Assert.Equal(new Size(0, value), control.Size); 6146Assert.Equal(new Size(0, expectedHeight), control.ClientSize); 6149Assert.Equal(new Size(0, expectedHeight), control.Size); 6168Assert.Equal(new Size(0, expectedHeight), control.ClientSize); 6171Assert.Equal(new Size(0, expectedHeight), control.Size); 6283Assert.Equal(new Size(0, expectedHeight), control.ClientSize); 6286Assert.Equal(new Size(0, expectedHeight), control.Size); 6310Assert.Equal(new Size(0, expectedHeight), control.ClientSize); 6313Assert.Equal(new Size(0, expectedHeight), control.Size); 6691Assert.Equal(new Size(0, 0), control.ClientSize); 6694Assert.Equal(new Size(0, 0), control.Size); 6713Assert.Equal(new Size(0, 0), control.ClientSize); 6716Assert.Equal(new Size(0, 0), control.Size); 6783Assert.Equal(new Size(0, 0), control.ClientSize); 6786Assert.Equal(new Size(0, 0), control.Size); 6805Assert.Equal(new Size(0, 0), control.ClientSize); 6808Assert.Equal(new Size(0, 0), control.Size); 6881Assert.Equal(new Size(0, 0), control.ClientSize); 6884Assert.Equal(new Size(0, 0), control.Size); 6906Assert.Equal(new Size(0, 0), control.ClientSize); 6909Assert.Equal(new Size(0, 0), control.Size); 6992Assert.Equal(new Size(0, 0), control.ClientSize); 6995Assert.Equal(new Size(0, 0), control.Size); 7021Assert.Equal(new Size(0, 0), control.ClientSize); 7024Assert.Equal(new Size(0, 0), control.Size); 7172Assert.Equal(new Size(0, 0), control.ClientSize); 7175Assert.Equal(new Size(0, 0), control.Size); 7194Assert.Equal(new Size(0, 0), control.ClientSize); 7197Assert.Equal(new Size(0, 0), control.Size); 7262Assert.Equal(new Size(0, 0), control.ClientSize); 7265Assert.Equal(new Size(0, 0), control.Size); 7285Assert.Equal(new Size(0, 0), control.ClientSize); 7288Assert.Equal(new Size(0, 0), control.Size); 7364Assert.Equal(new Size(0, 0), control.ClientSize); 7367Assert.Equal(new Size(0, 0), control.Size); 7389Assert.Equal(new Size(0, 0), control.ClientSize); 7392Assert.Equal(new Size(0, 0), control.Size); 7475Assert.Equal(new Size(0, 0), control.ClientSize); 7478Assert.Equal(new Size(0, 0), control.Size); 7505Assert.Equal(new Size(0, 0), control.ClientSize); 7508Assert.Equal(new Size(0, 0), control.Size); 7882yield return new object[] { new NonZeroWidthDefaultMaximumSizeControl(), new Size(10, 0) }; 7883yield return new object[] { new NonZeroHeightDefaultMaximumSizeControl(), new Size(0, 20) }; 7884yield return new object[] { new NonZeroWidthNonZeroHeightDefaultMaximumSizeControl(), new Size(10, 20) }; 7896protected override Size DefaultMaximumSize => new(10, 0); 7901protected override Size DefaultMaximumSize => new(0, 20); 7906protected override Size DefaultMaximumSize => new(10, 20); 7912yield return new object[] { new Size(-1, -2) }; 7913yield return new object[] { new Size(0, 1) }; 7914yield return new object[] { new Size(0, 10) }; 7915yield return new object[] { new Size(1, 0) }; 7916yield return new object[] { new Size(10, 0) }; 7917yield return new object[] { new Size(1, 2) }; 7918yield return new object[] { new Size(3, 4) }; 7919yield return new object[] { new Size(ushort.MaxValue - 1, ushort.MaxValue - 1) }; 7920yield return new object[] { new Size(ushort.MaxValue, ushort.MaxValue) }; 7921yield return new object[] { new Size(ushort.MaxValue + 1, ushort.MaxValue + 1) }; 7922yield return new object[] { new Size(int.MaxValue, int.MaxValue) }; 7953MaximumSize = new Size(1, 2) 7974yield return new object[] { new Size(2, 3), Size.Empty, new Size(2, 3), 0 }; 7975yield return new object[] { new Size(2, 3), new Size(0, 1), new Size(0, 1), 1 }; 7976yield return new object[] { new Size(2, 3), new Size(0, 10), new Size(0, 3), 1 }; 7977yield return new object[] { new Size(2, 3), new Size(1, 0), new Size(1, 0), 1 }; 7978yield return new object[] { new Size(2, 3), new Size(10, 0), new Size(2, 0), 1 }; 7979yield return new object[] { new Size(2, 3), new Size(1, 2), new Size(1, 2), 1 }; 7980yield return new object[] { new Size(2, 3), new Size(2, 2), new Size(2, 2), 1 }; 7981yield return new object[] { new Size(2, 3), new Size(1, 3), new Size(1, 3), 1 }; 7982yield return new object[] { new Size(2, 3), new Size(2, 3), new Size(2, 3), 0 }; 7983yield return new object[] { new Size(2, 3), new Size(3, 3), new Size(2, 3), 0 }; 7984yield return new object[] { new Size(2, 3), new Size(2, 4), new Size(2, 3), 0 }; 7985yield return new object[] { new Size(2, 3), new Size(3, 4), new Size(2, 3), 0 }; 7986yield return new object[] { new Size(2, 3), new Size(5, 6), new Size(2, 3), 0 }; 7987yield return new object[] { new Size(2, 3), new Size(ushort.MaxValue - 1, ushort.MaxValue - 1), new Size(2, 3), 0 }; 7988yield return new object[] { new Size(2, 3), new Size(ushort.MaxValue, ushort.MaxValue), new Size(2, 3), 0 }; 7989yield return new object[] { new Size(2, 3), new Size(ushort.MaxValue + 1, ushort.MaxValue + 1), new Size(2, 3), 0 }; 7990yield return new object[] { new Size(2, 3), new Size(int.MaxValue, int.MaxValue), new Size(2, 3), 0 }; 8030MinimumSize = new Size(100, 100) 8037Assert.Equal(new Size(100, 100), control.Size); 8044Assert.Equal(new Size(100, 100), control.Size); 8055MaximumSize = new Size(4, 5), 8084yield return new object[] { new Size(0, 1), 1 }; 8085yield return new object[] { new Size(0, 10), 1 }; 8086yield return new object[] { new Size(1, 0), 1 }; 8087yield return new object[] { new Size(10, 0), 1 }; 8088yield return new object[] { new Size(-1, -2), 1 }; 8089yield return new object[] { new Size(1, 2), 1 }; 8090yield return new object[] { new Size(ushort.MaxValue - 1, ushort.MaxValue - 1), 1 }; 8091yield return new object[] { new Size(ushort.MaxValue, ushort.MaxValue), 1 }; 8092yield return new object[] { new Size(ushort.MaxValue + 1, ushort.MaxValue + 1), 1 }; 8093yield return new object[] { new Size(int.MaxValue, int.MaxValue), 1 }; 8139yield return new object[] { new Size(0, 1), 1 }; 8140yield return new object[] { new Size(0, 10), 1 }; 8141yield return new object[] { new Size(1, 0), 1 }; 8142yield return new object[] { new Size(10, 0), 1 }; 8143yield return new object[] { new Size(-1, -2), 1 }; 8144yield return new object[] { new Size(1, 2), 0 }; 8145yield return new object[] { new Size(ushort.MaxValue - 1, ushort.MaxValue - 1), 1 }; 8146yield return new object[] { new Size(ushort.MaxValue, ushort.MaxValue), 1 }; 8147yield return new object[] { new Size(ushort.MaxValue + 1, ushort.MaxValue + 1), 1 }; 8148yield return new object[] { new Size(int.MaxValue, int.MaxValue), 1 }; 8158MaximumSize = new Size(1, 2), 8235MaximumSize = new Size(1, 2) 8379MaximumSize = new Size(1, 2), 8447control.MaximumSize = new Size(1, 0); 8448Assert.Equal(new Size(1, 0), control.MaximumSize); 8451control.MaximumSize = new Size(0, 1); 8452Assert.Equal(new Size(0, 1), control.MaximumSize); 8455control.MaximumSize = new Size(1, 2); 8456Assert.Equal(new Size(1, 2), control.MaximumSize); 8471control.MaximumSize = new Size(1, 0); 8472Assert.Equal(new Size(1, 0), control.MaximumSize); 8475control.MaximumSize = new Size(0, 1); 8476Assert.Equal(new Size(0, 1), control.MaximumSize); 8479control.MaximumSize = new Size(1, 2); 8480Assert.Equal(new Size(1, 2), control.MaximumSize); 8491yield return new object[] { new NonZeroWidthDefaultMinimumSizeControl(), new Size(10, 0) }; 8492yield return new object[] { new NonZeroHeightDefaultMinimumSizeControl(), new Size(0, 20) }; 8493yield return new object[] { new NonZeroWidthNonZeroHeightDefaultMinimumSizeControl(), new Size(10, 20) }; 8505protected override Size DefaultMinimumSize => new(10, 0); 8510protected override Size DefaultMinimumSize => new(0, 20); 8515protected override Size DefaultMinimumSize => new(10, 20); 8521yield return new object[] { new Size(0, 1), new Size(0, 1), 1 }; 8522yield return new object[] { new Size(0, 10), new Size(0, 10), 1 }; 8523yield return new object[] { new Size(1, 0), new Size(1, 0), 1 }; 8524yield return new object[] { new Size(10, 0), new Size(10, 0), 1 }; 8525yield return new object[] { new Size(-1, -2), Size.Empty, 0 }; 8526yield return new object[] { new Size(1, 2), new Size(1, 2), 1 }; 8527yield return new object[] { new Size(3, 4), new Size(3, 4), 1 }; 8528yield return new object[] { new Size(ushort.MaxValue - 1, ushort.MaxValue - 1), new Size(ushort.MaxValue - 1, ushort.MaxValue - 1), 1 }; 8529yield return new object[] { new Size(ushort.MaxValue, ushort.MaxValue), new Size(ushort.MaxValue, ushort.MaxValue), 1 }; 8530yield return new object[] { new Size(ushort.MaxValue + 1, ushort.MaxValue + 1), new Size(ushort.MaxValue + 1, ushort.MaxValue + 1), 1 }; 8531yield return new object[] { new Size(int.MaxValue, int.MaxValue), new Size(int.MaxValue, int.MaxValue), 1 }; 8564yield return new object[] { Size.Empty, new Size(1, 2), 0 }; 8565yield return new object[] { new Size(0, 1), new Size(1, 2), 0 }; 8566yield return new object[] { new Size(0, 10), new Size(1, 10), 1 }; 8567yield return new object[] { new Size(1, 0), new Size(1, 2), 0 }; 8568yield return new object[] { new Size(10, 0), new Size(10, 2), 1 }; 8569yield return new object[] { new Size(-1, -2), new Size(1, 2), 0 }; 8570yield return new object[] { new Size(1, 2), new Size(1, 2), 0 }; 8571yield return new object[] { new Size(3, 4), new Size(3, 4), 1 }; 8572yield return new object[] { new Size(ushort.MaxValue - 1, ushort.MaxValue - 1), new Size(ushort.MaxValue - 1, ushort.MaxValue - 1), 1 }; 8573yield return new object[] { new Size(ushort.MaxValue, ushort.MaxValue), new Size(ushort.MaxValue, ushort.MaxValue), 1 }; 8574yield return new object[] { new Size(ushort.MaxValue + 1, ushort.MaxValue + 1), new Size(ushort.MaxValue + 1, ushort.MaxValue + 1), 1 }; 8575yield return new object[] { new Size(int.MaxValue, int.MaxValue), new Size(int.MaxValue, int.MaxValue), 1 }; 8584MinimumSize = new Size(1, 2) 8611yield return new object[] { new Size(2, 3), Size.Empty, new Size(2, 3), 0 }; 8612yield return new object[] { new Size(2, 3), new Size(0, 1), new Size(2, 3), 0 }; 8613yield return new object[] { new Size(2, 3), new Size(0, 10), new Size(2, 10), 1 }; 8614yield return new object[] { new Size(2, 3), new Size(1, 0), new Size(2, 3), 0 }; 8615yield return new object[] { new Size(2, 3), new Size(10, 0), new Size(10, 3), 1 }; 8616yield return new object[] { new Size(2, 3), new Size(-1, -2), new Size(2, 3), 0 }; 8617yield return new object[] { new Size(2, 3), new Size(1, 2), new Size(2, 3), 0 }; 8618yield return new object[] { new Size(2, 3), new Size(2, 2), new Size(2, 3), 0 }; 8619yield return new object[] { new Size(2, 3), new Size(1, 3), new Size(2, 3), 0 }; 8620yield return new object[] { new Size(2, 3), new Size(2, 3), new Size(2, 3), 0 }; 8621yield return new object[] { new Size(2, 3), new Size(3, 3), new Size(3, 3), 1 }; 8622yield return new object[] { new Size(2, 3), new Size(2, 4), new Size(2, 4), 1 }; 8623yield return new object[] { new Size(2, 3), new Size(3, 4), new Size(3, 4), 1 }; 8624yield return new object[] { new Size(2, 3), new Size(5, 6), new Size(5, 6), 1 }; 8625yield return new object[] { new Size(2, 3), new Size(ushort.MaxValue - 1, ushort.MaxValue - 1), new Size(ushort.MaxValue - 1, ushort.MaxValue - 1), 1 }; 8626yield return new object[] { new Size(2, 3), new Size(ushort.MaxValue, ushort.MaxValue), new Size(ushort.MaxValue, ushort.MaxValue), 1 }; 8627yield return new object[] { new Size(2, 3), new Size(ushort.MaxValue + 1, ushort.MaxValue + 1), new Size(ushort.MaxValue + 1, ushort.MaxValue + 1), 1 }; 8628yield return new object[] { new Size(2, 3), new Size(int.MaxValue, int.MaxValue), new Size(int.MaxValue, int.MaxValue), 1 }; 8668MaximumSize = new Size(-1, -2) 8699MinimumSize = new Size(1, 2), 8728yield return new object[] { new Size(0, 1), new Size(0, 1), 1, 1 }; 8729yield return new object[] { new Size(0, 10), new Size(0, 10), 1, 1 }; 8730yield return new object[] { new Size(1, 0), new Size(1, 0), 1, 1 }; 8731yield return new object[] { new Size(10, 0), new Size(10, 0), 1, 1 }; 8732yield return new object[] { new Size(-1, -2), Size.Empty, 0, 1 }; 8733yield return new object[] { new Size(1, 2), new Size(1, 2), 1, 1 }; 8734yield return new object[] { new Size(ushort.MaxValue - 1, ushort.MaxValue - 1), new Size(ushort.MaxValue - 1, ushort.MaxValue - 1), 1, 1 }; 8735yield return new object[] { new Size(ushort.MaxValue, ushort.MaxValue), new Size(ushort.MaxValue, ushort.MaxValue), 1, 1 }; 8736yield return new object[] { new Size(ushort.MaxValue + 1, ushort.MaxValue + 1), new Size(ushort.MaxValue + 1, ushort.MaxValue + 1), 1, 1 }; 8737yield return new object[] { new Size(int.MaxValue, int.MaxValue), new Size(int.MaxValue, int.MaxValue), 1, 1 }; 8788yield return new object[] { Size.Empty, new Size(1, 2), 0, 1 }; 8789yield return new object[] { new Size(0, 1), new Size(1, 2), 0, 1 }; 8790yield return new object[] { new Size(0, 10), new Size(1, 10), 1, 1 }; 8791yield return new object[] { new Size(1, 0), new Size(1, 2), 0, 1 }; 8792yield return new object[] { new Size(10, 0), new Size(10, 2), 1, 1 }; 8793yield return new object[] { new Size(-1, -2), new Size(1, 2), 0, 1 }; 8794yield return new object[] { new Size(1, 2), new Size(1, 2), 0, 0 }; 8795yield return new object[] { new Size(ushort.MaxValue - 1, ushort.MaxValue - 1), new Size(ushort.MaxValue - 1, ushort.MaxValue - 1), 1, 1 }; 8796yield return new object[] { new Size(ushort.MaxValue, ushort.MaxValue), new Size(ushort.MaxValue, ushort.MaxValue), 1, 1 }; 8797yield return new object[] { new Size(ushort.MaxValue + 1, ushort.MaxValue + 1), new Size(ushort.MaxValue + 1, ushort.MaxValue + 1), 1, 1 }; 8798yield return new object[] { new Size(int.MaxValue, int.MaxValue), new Size(int.MaxValue, int.MaxValue), 1, 1 }; 8808MinimumSize = new Size(1, 2), 8853yield return new object[] { new Size(0, 1), new Size(0, 1), 1 }; 8854yield return new object[] { new Size(0, 10), new Size(0, 10), 1 }; 8855yield return new object[] { new Size(1, 0), new Size(1, 0), 1 }; 8856yield return new object[] { new Size(10, 0), new Size(10, 0), 1 }; 8857yield return new object[] { new Size(-1, -2), Size.Empty, 0 }; 8858yield return new object[] { new Size(1, 2), new Size(1, 2), 1 }; 8859yield return new object[] { new Size(3, 4), new Size(3, 4), 1 }; 8860yield return new object[] { new Size(ushort.MaxValue - 1, ushort.MaxValue - 1), new Size(ushort.MaxValue - 1, ushort.MaxValue - 1), 1 }; 8861yield return new object[] { new Size(ushort.MaxValue, ushort.MaxValue), new Size(ushort.MaxValue, ushort.MaxValue), 1 }; 8862yield return new object[] { new Size(ushort.MaxValue + 1, ushort.MaxValue + 1), new Size(ushort.MaxValue, ushort.MaxValue), 1 }; 8863yield return new object[] { new Size(int.MaxValue, int.MaxValue), new Size(ushort.MaxValue, ushort.MaxValue), 1 }; 8909yield return new object[] { Size.Empty, new Size(1, 2), 0 }; 8910yield return new object[] { new Size(0, 1), new Size(1, 2), 0 }; 8911yield return new object[] { new Size(0, 10), new Size(1, 10), 1 }; 8912yield return new object[] { new Size(1, 0), new Size(1, 2), 0 }; 8913yield return new object[] { new Size(10, 0), new Size(10, 2), 1 }; 8914yield return new object[] { new Size(-1, -2), new Size(1, 2), 0 }; 8915yield return new object[] { new Size(1, 2), new Size(1, 2), 0 }; 8916yield return new object[] { new Size(3, 4), new Size(3, 4), 1 }; 8917yield return new object[] { new Size(ushort.MaxValue - 1, ushort.MaxValue - 1), new Size(ushort.MaxValue - 1, ushort.MaxValue - 1), 1 }; 8918yield return new object[] { new Size(ushort.MaxValue, ushort.MaxValue), new Size(ushort.MaxValue, ushort.MaxValue), 1 }; 8919yield return new object[] { new Size(ushort.MaxValue + 1, ushort.MaxValue + 1), new Size(ushort.MaxValue, ushort.MaxValue), 1 }; 8920yield return new object[] { new Size(int.MaxValue, int.MaxValue), new Size(ushort.MaxValue, ushort.MaxValue), 1 }; 8929MinimumSize = new Size(1, 2) 8969yield return new object[] { new Size(2, 3), Size.Empty, new Size(2, 3), 0 }; 8970yield return new object[] { new Size(2, 3), new Size(0, 1), new Size(2, 3), 0 }; 8971yield return new object[] { new Size(2, 3), new Size(0, 10), new Size(2, 10), 1 }; 8972yield return new object[] { new Size(2, 3), new Size(1, 0), new Size(2, 3), 0 }; 8973yield return new object[] { new Size(2, 3), new Size(10, 0), new Size(10, 3), 1 }; 8974yield return new object[] { new Size(2, 3), new Size(-1, -2), new Size(2, 3), 0 }; 8975yield return new object[] { new Size(2, 3), new Size(1, 2), new Size(2, 3), 0 }; 8976yield return new object[] { new Size(2, 3), new Size(2, 2), new Size(2, 3), 0 }; 8977yield return new object[] { new Size(2, 3), new Size(1, 3), new Size(2, 3), 0 }; 8978yield return new object[] { new Size(2, 3), new Size(2, 3), new Size(2, 3), 0 }; 8979yield return new object[] { new Size(2, 3), new Size(3, 3), new Size(3, 3), 1 }; 8980yield return new object[] { new Size(2, 3), new Size(2, 4), new Size(2, 4), 1 }; 8981yield return new object[] { new Size(2, 3), new Size(3, 4), new Size(3, 4), 1 }; 8982yield return new object[] { new Size(2, 3), new Size(5, 6), new Size(5, 6), 1 }; 8983yield return new object[] { new Size(2, 3), new Size(ushort.MaxValue - 1, ushort.MaxValue - 1), new Size(ushort.MaxValue - 1, ushort.MaxValue - 1), 1 }; 8984yield return new object[] { new Size(2, 3), new Size(ushort.MaxValue, ushort.MaxValue), new Size(ushort.MaxValue, ushort.MaxValue), 1 }; 8985yield return new object[] { new Size(2, 3), new Size(ushort.MaxValue + 1, ushort.MaxValue + 1), new Size(ushort.MaxValue, ushort.MaxValue), 1 }; 8986yield return new object[] { new Size(2, 3), new Size(int.MaxValue, int.MaxValue), new Size(ushort.MaxValue, ushort.MaxValue), 1 }; 9036yield return new object[] { new Size(0, 1), new Size(0, 1), 1, 1 }; 9037yield return new object[] { new Size(0, 10), new Size(0, 10), 1, 1 }; 9038yield return new object[] { new Size(1, 0), new Size(1, 0), 1, 1 }; 9039yield return new object[] { new Size(10, 0), new Size(10, 0), 1, 1 }; 9040yield return new object[] { new Size(-1, -2), Size.Empty, 0, 1 }; 9041yield return new object[] { new Size(1, 2), new Size(1, 2), 1, 1 }; 9042yield return new object[] { new Size(ushort.MaxValue - 1, ushort.MaxValue - 1), new Size(ushort.MaxValue - 1, ushort.MaxValue - 1), 1, 1 }; 9043yield return new object[] { new Size(ushort.MaxValue, ushort.MaxValue), new Size(ushort.MaxValue, ushort.MaxValue), 1, 1 }; 9044yield return new object[] { new Size(ushort.MaxValue + 1, ushort.MaxValue + 1), new Size(ushort.MaxValue, ushort.MaxValue), 1, 1 }; 9045yield return new object[] { new Size(int.MaxValue, int.MaxValue), new Size(ushort.MaxValue, ushort.MaxValue), 1, 1 }; 9123yield return new object[] { Size.Empty, new Size(1, 2), 0, 1 }; 9124yield return new object[] { new Size(0, 1), new Size(1, 2), 0, 1 }; 9125yield return new object[] { new Size(0, 10), new Size(1, 10), 1, 1 }; 9126yield return new object[] { new Size(1, 0), new Size(1, 2), 0, 1 }; 9127yield return new object[] { new Size(10, 0), new Size(10, 2), 1, 1 }; 9128yield return new object[] { new Size(-1, -2), new Size(1, 2), 0, 1 }; 9129yield return new object[] { new Size(1, 2), new Size(1, 2), 0, 0 }; 9130yield return new object[] { new Size(ushort.MaxValue - 1, ushort.MaxValue - 1), new Size(ushort.MaxValue - 1, ushort.MaxValue - 1), 1, 1 }; 9131yield return new object[] { new Size(ushort.MaxValue, ushort.MaxValue), new Size(ushort.MaxValue, ushort.MaxValue), 1, 1 }; 9132yield return new object[] { new Size(ushort.MaxValue + 1, ushort.MaxValue + 1), new Size(ushort.MaxValue, ushort.MaxValue), 1, 1 }; 9133yield return new object[] { new Size(int.MaxValue, int.MaxValue), new Size(ushort.MaxValue, ushort.MaxValue), 1, 1 }; 9143MinimumSize = new Size(1, 2), 9217control.MinimumSize = new Size(1, 0); 9218Assert.Equal(new Size(1, 0), control.MinimumSize); 9221control.MinimumSize = new Size(0, 1); 9222Assert.Equal(new Size(0, 1), control.MinimumSize); 9225control.MinimumSize = new Size(1, 2); 9226Assert.Equal(new Size(1, 2), control.MinimumSize); 9241control.MinimumSize = new Size(1, 0); 9242Assert.Equal(new Size(1, 0), control.MinimumSize); 9245control.MinimumSize = new Size(0, 1); 9246Assert.Equal(new Size(0, 1), control.MinimumSize); 9249control.MinimumSize = new Size(1, 2); 9250Assert.Equal(new Size(1, 2), control.MinimumSize); 9840Size = new Size(16, 20) 9843Assert.Equal(new Size(0, 0), control.PreferredSize); 9846Assert.Equal(new Size(0, 0), control.PreferredSize); 9858Size = new Size(16, 20) 9861Assert.Equal(new Size(0, 0), control.PreferredSize); 9864Assert.Equal(new Size(0, 0), control.PreferredSize); 11057yield return new object[] { new Size(-3, -4), 1 }; 11058yield return new object[] { new Size(0, 0), 0 }; 11059yield return new object[] { new Size(1, 0), 1 }; 11060yield return new object[] { new Size(0, 2), 1 }; 11061yield return new object[] { new Size(30, 40), 1 }; 11151yield return new object[] { Size.Empty, Size.Empty, new Size(30, 40), 30, 40, 1 }; 11152yield return new object[] { new Size(10, 20), Size.Empty, new Size(30, 40), 30, 40, 1 }; 11153yield return new object[] { new Size(30, 40), Size.Empty, new Size(30, 40), 30, 40, 0 }; 11154yield return new object[] { new Size(31, 40), Size.Empty, new Size(30, 40), 31, 40, 0 }; 11155yield return new object[] { new Size(30, 41), Size.Empty, new Size(30, 40), 30, 41, 0 }; 11156yield return new object[] { new Size(40, 50), Size.Empty, new Size(30, 40), 40, 50, 0 }; 11157yield return new object[] { Size.Empty, new Size(20, 10), new Size(30, 40), 20, 10, 1 }; 11158yield return new object[] { Size.Empty, new Size(30, 40), new Size(30, 40), 30, 40, 1 }; 11159yield return new object[] { Size.Empty, new Size(31, 40), new Size(30, 40), 30, 40, 1 }; 11160yield return new object[] { Size.Empty, new Size(30, 41), new Size(30, 40), 30, 40, 1 }; 11161yield return new object[] { Size.Empty, new Size(40, 50), new Size(30, 40), 30, 40, 1 }; 11162yield return new object[] { new Size(10, 20), new Size(40, 50), new Size(30, 40), 30, 40, 1 }; 11163yield return new object[] { new Size(10, 20), new Size(20, 30), new Size(30, 40), 20, 30, 1 }; 11164yield return new object[] { new Size(10, 20), new Size(20, 30), new Size(30, 40), 20, 30, 1 }; 11165yield return new object[] { new Size(30, 40), new Size(20, 30), new Size(30, 40), 30, 40, 0 }; 11166yield return new object[] { new Size(30, 40), new Size(40, 50), new Size(30, 40), 30, 40, 0 }; 11167yield return new object[] { new Size(40, 50), new Size(20, 30), new Size(30, 40), 40, 50, 0 }; 11168yield return new object[] { new Size(40, 50), new Size(40, 50), new Size(30, 40), 40, 50, 0 }; 11223Assert.Equal(new Size(expectedWidth, expectedHeight), control.ClientSize); 11226Assert.Equal(new Size(expectedWidth, expectedHeight), control.Size); 11242Assert.Equal(new Size(expectedWidth, expectedHeight), control.ClientSize); 11245Assert.Equal(new Size(expectedWidth, expectedHeight), control.Size); 11262yield return new object[] { new Size(0, 0), 0, 0, 0 }; 11263yield return new object[] { new Size(-3, -4), -7, -8, 1 }; 11264yield return new object[] { new Size(1, 0), -3, -4, 1 }; 11265yield return new object[] { new Size(0, 2), -4, -2, 1 }; 11266yield return new object[] { new Size(1, 2), -3, -2, 1 }; 11267yield return new object[] { new Size(30, 40), 26, 36, 1 }; 11318Assert.Equal(new Size(expectedClientWidth, expectedClientHeight), control.ClientSize); 11337Assert.Equal(new Size(expectedClientWidth, expectedClientHeight), control.ClientSize); 11357yield return new object[] { new Size(0, 0), 0, 0 }; 11358yield return new object[] { new Size(-3, -4), 1, 2 }; 11359yield return new object[] { new Size(1, 0), 1, 2 }; 11360yield return new object[] { new Size(0, 2), 1, 2 }; 11361yield return new object[] { new Size(1, 2), 1, 2 }; 11362yield return new object[] { new Size(30, 40), 1, 2 }; 11479yield return new object[] { true, new Size(0, 0), 0, 0, 0, 0 }; 11480yield return new object[] { true, new Size(-3, -4), 0, 0, 0, 0 }; 11481yield return new object[] { true, new Size(1, 0), 1, 0, 1, 1 }; 11482yield return new object[] { true, new Size(0, 2), 0, 2, 1, 1 }; 11483yield return new object[] { true, new Size(1, 2), 1, 2, 1, 1 }; 11484yield return new object[] { true, new Size(30, 40), 30, 40, 1, 1 }; 11486yield return new object[] { false, new Size(0, 0), 0, 0, 0, 0 }; 11487yield return new object[] { false, new Size(-3, -4), 0, 0, 0, 0 }; 11488yield return new object[] { false, new Size(1, 0), 1, 0, 1, 0 }; 11489yield return new object[] { false, new Size(0, 2), 0, 2, 1, 0 }; 11490yield return new object[] { false, new Size(1, 2), 1, 2, 1, 0 }; 11491yield return new object[] { false, new Size(30, 40), 30, 40, 1, 0 }; 11550Assert.Equal(new Size(expectedWidth, expectedHeight), control.ClientSize); 11553Assert.Equal(new Size(expectedWidth, expectedHeight), control.Size); 11572Assert.Equal(new Size(expectedWidth, expectedHeight), control.ClientSize); 11575Assert.Equal(new Size(expectedWidth, expectedHeight), control.Size); 11595yield return new object[] { true, new Size(0, 0), 0, 0, 0, 0, 0, 0 }; 11596yield return new object[] { true, new Size(-3, -4), 0, 0, 0, 0, 1, 2 }; 11597yield return new object[] { true, new Size(1, 0), 1, 0, 1, 1, 2, 2 }; 11598yield return new object[] { true, new Size(0, 2), 0, 2, 1, 1, 2, 2 }; 11599yield return new object[] { true, new Size(1, 2), 1, 2, 1, 1, 2, 2 }; 11600yield return new object[] { true, new Size(30, 40), 30, 40, 1, 1, 2, 2 }; 11602yield return new object[] { false, new Size(0, 0), 0, 0, 0, 0, 0, 0 }; 11603yield return new object[] { false, new Size(-3, -4), 0, 0, 0, 0, 1, 2 }; 11604yield return new object[] { false, new Size(1, 0), 1, 0, 1, 0, 2, 2 }; 11605yield return new object[] { false, new Size(0, 2), 0, 2, 1, 0, 2, 2 }; 11606yield return new object[] { false, new Size(1, 2), 1, 2, 1, 0, 2, 2 }; 11607yield return new object[] { false, new Size(30, 40), 30, 40, 1, 0, 2, 2 }; 11692Assert.Equal(new Size(expectedWidth, expectedHeight), control.ClientSize); 11695Assert.Equal(new Size(expectedWidth, expectedHeight), control.Size); 11719Assert.Equal(new Size(expectedWidth, expectedHeight), control.ClientSize); 11722Assert.Equal(new Size(expectedWidth, expectedHeight), control.Size); 11757control.Size = new Size(1, 0); 11758Assert.Equal(new Size(1, 0), control.Size); 11761control.Size = new Size(0, 1); 11762Assert.Equal(new Size(0, 1), control.Size); 11765control.Size = new Size(1, 2); 11766Assert.Equal(new Size(1, 2), control.Size); 11781control.Size = new Size(1, 0); 11782Assert.Equal(new Size(1, 0), control.Size); 11785control.Size = new Size(0, 1); 11786Assert.Equal(new Size(0, 1), control.Size); 11789control.Size = new Size(1, 2); 11790Assert.Equal(new Size(1, 2), control.Size); 12127Assert.Equal(new Size(0, 0), control.ClientSize); 12130Assert.Equal(new Size(0, 0), control.Size); 12148Assert.Equal(new Size(0, 0), control.ClientSize); 12151Assert.Equal(new Size(0, 0), control.Size); 12217Assert.Equal(new Size(0, 0), control.ClientSize); 12220Assert.Equal(new Size(0, 0), control.Size); 12239Assert.Equal(new Size(0, 0), control.ClientSize); 12242Assert.Equal(new Size(0, 0), control.Size); 12315Assert.Equal(new Size(0, 0), control.ClientSize); 12318Assert.Equal(new Size(0, 0), control.Size); 12339Assert.Equal(new Size(0, 0), control.ClientSize); 12342Assert.Equal(new Size(0, 0), control.Size); 12424Assert.Equal(new Size(0, 0), control.ClientSize); 12427Assert.Equal(new Size(0, 0), control.Size); 12453Assert.Equal(new Size(0, 0), control.ClientSize); 12456Assert.Equal(new Size(0, 0), control.Size); 13147Assert.Equal(new Size(value, 0), control.ClientSize); 13150Assert.Equal(new Size(value, 0), control.Size); 13166Assert.Equal(new Size(value, 0), control.ClientSize); 13169Assert.Equal(new Size(value, 0), control.Size); 13187yield return new object[] { new Size(10, 20), Size.Empty, 30, 30, 20, 1 }; 13188yield return new object[] { new Size(30, 40), Size.Empty, 30, 30, 40, 0 }; 13189yield return new object[] { new Size(31, 40), Size.Empty, 30, 31, 40, 0 }; 13190yield return new object[] { new Size(30, 41), Size.Empty, 30, 30, 41, 0 }; 13191yield return new object[] { new Size(40, 50), Size.Empty, 30, 40, 50, 0 }; 13192yield return new object[] { Size.Empty, new Size(20, 10), 30, 20, 0, 1 }; 13193yield return new object[] { Size.Empty, new Size(30, 40), 30, 30, 0, 1 }; 13194yield return new object[] { Size.Empty, new Size(31, 40), 30, 30, 0, 1 }; 13195yield return new object[] { Size.Empty, new Size(30, 41), 30, 30, 0, 1 }; 13196yield return new object[] { Size.Empty, new Size(40, 50), 30, 30, 0, 1 }; 13197yield return new object[] { new Size(10, 20), new Size(40, 50), 30, 30, 20, 1 }; 13198yield return new object[] { new Size(10, 20), new Size(20, 30), 30, 20, 20, 1 }; 13199yield return new object[] { new Size(30, 40), new Size(20, 30), 30, 30, 40, 0 }; 13200yield return new object[] { new Size(30, 40), new Size(40, 50), 30, 30, 40, 0 }; 13201yield return new object[] { new Size(40, 50), new Size(20, 30), 30, 40, 50, 0 }; 13202yield return new object[] { new Size(40, 50), new Size(40, 50), 30, 40, 50, 0 }; 13257Assert.Equal(new Size(expectedWidth, expectedHeight), control.ClientSize); 13260Assert.Equal(new Size(expectedWidth, expectedHeight), control.Size); 13276Assert.Equal(new Size(expectedWidth, expectedHeight), control.ClientSize); 13279Assert.Equal(new Size(expectedWidth, expectedHeight), control.Size); 13345Assert.Equal(new Size(expectedClientWidth, expectedClientHeight), control.ClientSize); 13348Assert.Equal(new Size(value, 0), control.Size); 13364Assert.Equal(new Size(expectedClientWidth, expectedClientHeight), control.ClientSize); 13367Assert.Equal(new Size(value, 0), control.Size); 13453Assert.Equal(new Size(value, 0), control.ClientSize); 13456Assert.Equal(new Size(value, 0), control.Size); 13473Assert.Equal(new Size(value, 0), control.ClientSize); 13476Assert.Equal(new Size(value, 0), control.Size); 13565Assert.Equal(new Size(expectedWidth, 0), control.ClientSize); 13568Assert.Equal(new Size(expectedWidth, 0), control.Size); 13587Assert.Equal(new Size(expectedWidth, 0), control.ClientSize); 13590Assert.Equal(new Size(expectedWidth, 0), control.Size); 13702Assert.Equal(new Size(expectedWidth, 0), control.ClientSize); 13705Assert.Equal(new Size(expectedWidth, 0), control.Size); 13729Assert.Equal(new Size(expectedWidth, 0), control.ClientSize); 13732Assert.Equal(new Size(expectedWidth, 0), control.Size);
System\Windows\Forms\CursorConverterTests.cs (2)
41Assert.True(cursor.Size == new Size(32, 32) || cursor.Size == new Size(64, 64));
System\Windows\Forms\CursorsTests.cs (2)
56Assert.True(cursor.Size == new Size(32, 32) || cursor.Size == new Size(64, 64));
System\Windows\Forms\CursorTests.cs (10)
46Assert.True(cursor.Size == new Size(32, 32) || cursor.Size == new Size(64, 64)); 70Assert.True(cursor.Size == new Size(32, 32) || cursor.Size == new Size(64, 64)); 121Assert.True(cursor.Size == new Size(32, 32) || cursor.Size == new Size(64, 64)); 158Assert.True(cursor.Size == new Size(32, 32) || cursor.Size == new Size(64, 64)); 234Assert.True(cursor.Size == new Size(32, 32) || cursor.Size == new Size(64, 64));
System\Windows\Forms\DataGridViewCellTests.cs (12)
37Assert.Equal(new Size(-1, -1), cell.PreferredSize); 42Assert.Equal(new Size(-1, -1), cell.Size); 3349Assert.Equal(new Size(-1, -1), cell.PreferredSize); 3352Assert.Equal(new Size(-1, -1), cell.Size); 3386Assert.Equal(new Size(-1, -1), cell.PreferredSize); 3389Assert.Equal(new Size(-1, -1), cell.Size); 4780Size = new Size(600, 200) 4830Assert.Equal(new Size(-1, -1), cell.GetPreferredSize(null, null, -1, Size.Empty)); 4841Assert.Equal(new Size(-1, -1), cell.GetSize(rowIndex)); 4854Assert.Equal(new Size(-1, -1), cell.GetSize(rowIndex)); 4874Assert.Equal(new Size(10, 11), cell.GetSize(rowIndex)); 4893Assert.Equal(new Size(10, Control.DefaultFont.Height + 9), cell.GetSize(rowIndex));
System\Windows\Forms\DataGridViewHeaderCellTests.cs (19)
35Assert.Equal(new Size(-1, -1), cell.PreferredSize); 40Assert.Equal(new Size(-1, -1), cell.Size); 2051Assert.Equal(new Size(-1, -1), cell.PreferredSize); 2054Assert.Equal(new Size(-1, -1), cell.Size); 2088Assert.Equal(new Size(-1, -1), cell.PreferredSize); 2091Assert.Equal(new Size(-1, -1), cell.Size); 2137Assert.Equal(new Size(-1, -1), cell.PreferredSize); 2140Assert.Equal(new Size(-1, -1), cell.Size); 2174Assert.Equal(new Size(-1, -1), cell.PreferredSize); 2177Assert.Equal(new Size(-1, -1), cell.Size); 3128Assert.Equal(new Size(-1, -1), cell.GetSize(-1)); 3137Assert.Equal(new Size(-1, -1), cell.GetSize(-1)); 3146Assert.Equal(new Size(-1, -1), cell.GetSize(-1)); 3155Assert.Equal(new Size(-1, -1), cell.GetSize(-1)); 3177Assert.Equal(new Size(10, 25), cell.GetSize(-1)); 3201Assert.Equal(new Size(20, 11), cell.GetSize(0)); 3225Assert.Equal(new Size(10, 25), cell.GetSize(-1)); 3239Assert.Equal(new Size(20, 25), cell.GetSize(-1)); 3260Assert.Equal(new Size(10, 25), cell.GetSize(-1));
System\Windows\Forms\DataGridViewTests.Rendering.cs (2)
36Assert.Equal(new Size(100, 25), dataGrid[0, 0].Size); 108Size = new Size(700, 200)
System\Windows\Forms\DataGridViewTextBoxEditingControlTests.cs (3)
47Assert.Equal(new Size(96, control.PreferredHeight - 4), control.ClientSize); 62Assert.Equal(new Size(100, control.PreferredHeight), control.DefaultSize); 116Assert.Equal(new Size(100, control.PreferredHeight), control.Size);
System\Windows\Forms\DateTimePickerTests.cs (4)
50Assert.Equal(new Size(196, control.PreferredHeight - 4), control.ClientSize); 66Assert.Equal(new Size(200, control.PreferredHeight), control.DefaultSize); 98Assert.Equal(new Size(200, control.PreferredHeight), control.PreferredSize); 112Assert.Equal(new Size(200, control.PreferredHeight), control.Size);
System\Windows\Forms\Design\ComponentEditorFormTests.cs (3)
57Assert.Equal(new Size(control.ClientSize.Width, control.ClientSize.Height), control.ClientSize); 74Assert.Equal(new Size(300, 300), control.DefaultSize); 146Assert.Equal(new Size(control.Width, control.Height), control.Size);
System\Windows\Forms\Design\ComponentEditorPageTests.cs (3)
44Assert.Equal(new Size(200, 100), control.ClientSize); 60Assert.Equal(new Size(200, 100), control.DefaultSize); 111Assert.Equal(new Size(200, 100), control.Size);
System\Windows\Forms\Design\PropertyTabTests.cs (1)
28Assert.Equal(new Size(11, 22), tab.Bitmap.Size);
System\Windows\Forms\DomainUpDownTests.cs (6)
59_sub.ClientSize.Should().Be(new Size(120, Control.DefaultFont.Height + 7)); 60_sub.PreferredSize.Should().Be(new Size(16, _sub.PreferredHeight)); 66_sub.ClientSize.Should().Be(new Size(116, Control.DefaultFont.Height + 3)); 67_sub.PreferredSize.Should().Be(new Size(20, _sub.PreferredHeight)); 84_sub.DefaultSize.Should().Be(new Size(120, _sub.PreferredHeight)); 136_sub.Size.Should().Be(new Size(120, _sub.PreferredHeight));
System\Windows\Forms\DragDropHelperTests.cs (2)
121(dragImage is null ? new Size(0, 0) : dragImage.Size).Should().Be(dragImageSize); 147(e.DragImage is null ? new Size(0, 0) : e.DragImage.Size).Should().Be(dragImageSize);
System\Windows\Forms\ErrorProviderTests.cs (4)
1154control.Size = new Size(2, 3); 1155Assert.Equal(new Size(2, 3), control.Size); 1186control.Size = new Size(4, 5); 1187Assert.Equal(new Size(4, 5), control.Size);
System\Windows\Forms\FlowLayoutPanelTests.cs (3)
43Assert.Equal(new Size(200, 100), control.ClientSize); 57Assert.Equal(new Size(200, 100), control.DefaultSize); 104Assert.Equal(new Size(200, 100), control.Size);
System\Windows\Forms\FormTests.cs (10)
73Assert.Equal(new Size(300, 300), control.DefaultSize); 148Assert.Equal(new Size(300, 300), control.Size); 986form.Size = new Size(200, 210); 991form.Size = new Size(300, 310); 995Assert.NotEqual(new Size(300, 310), form.Size); 1000Assert.Equal(new Size(300, 310), form.Size); 1015form.Size = new Size(200, 210); 1020form.Size = new Size(300, 310); 1024Assert.NotEqual(new Size(300, 310), form.Size); 1029Assert.Equal(new Size(300, 310), form.Size);
System\Windows\Forms\GroupBoxTests.cs (12)
39Assert.Equal(new Size(200, 100), control.ClientSize); 54Assert.Equal(new Size(200, 100), control.DefaultSize); 83Assert.Equal(new Size(6, 6 + Control.DefaultFont.Height), control.PreferredSize); 92Assert.Equal(new Size(200, 100), control.Size); 927Size = new Size(16, 20) 930Assert.Equal(new Size(22, 25), control.PreferredSize); 940Assert.Equal(new Size(8, 9), control.PreferredSize); 1833yield return new object[] { new Size(100, 200), enabled, useCompatibleTextRendering, rightToLeft, foreColor, text }; 1834yield return new object[] { new Size(10, 10), enabled, useCompatibleTextRendering, rightToLeft, foreColor, text }; 1835yield return new object[] { new Size(9, 10), enabled, useCompatibleTextRendering, rightToLeft, foreColor, text }; 1836yield return new object[] { new Size(10, 9), enabled, useCompatibleTextRendering, rightToLeft, foreColor, text }; 1837yield return new object[] { new Size(9, 9), enabled, useCompatibleTextRendering, rightToLeft, foreColor, text };
System\Windows\Forms\ImageList.ImageCollectionTests.cs (20)
65Assert.Equal(new Size(16, 16), bitmap1.Size); 70Assert.Equal(new Size(16, 16), bitmap2.Size); 75Assert.Equal(new Size(16, 16), bitmap3.Size); 80Assert.Equal(new Size(16, 16), bitmap4.Size); 85Assert.Equal(new Size(16, 16), bitmap5.Size); 113Assert.Equal(new Size(16, 16), bitmap1.Size); 118Assert.Equal(new Size(16, 16), bitmap2.Size); 123Assert.Equal(new Size(16, 16), bitmap3.Size); 128Assert.Equal(new Size(16, 16), bitmap4.Size); 133Assert.Equal(new Size(16, 16), bitmap5.Size); 272Assert.Equal(new Size(16, 16), bitmap.Size); 293Assert.Equal(new Size(16, 16), bitmap.Size); 359Assert.Equal(new Size(16, 16), result1.Size); 366Assert.Equal(new Size(16, 16), result1.Size); 1171Assert.Equal(new Size(16, 16), result1.Size); 1177Assert.Equal(new Size(16, 16), result2.Size); 1209Assert.Equal(new Size(16, 16), result1.Size); 1215Assert.Equal(new Size(16, 16), result2.Size); 1645Assert.Equal(new Size(16, 16), bitmap.Size); 1666Assert.Equal(new Size(16, 16), bitmap.Size);
System\Windows\Forms\ImageListTests.cs (52)
21Assert.Equal(new Size(16, 16), list.ImageSize); 39Assert.Equal(new Size(16, 16), list.ImageSize); 228yield return new object[] { new Size(16, 16) }; 229yield return new object[] { new Size(17, 16) }; 230yield return new object[] { new Size(16, 17) }; 231yield return new object[] { new Size(24, 25) }; 232yield return new object[] { new Size(256, 26) }; 260list.ImageSize = new Size(10, 10); 261Assert.Equal(new Size(10, 10), list.ImageSize); 266list.ImageSize = new Size(10, 10); 267Assert.Equal(new Size(10, 10), list.ImageSize); 272list.ImageSize = new Size(11, 11); 273Assert.Equal(new Size(11, 11), list.ImageSize); 279list.ImageSize = new Size(10, 10); 280Assert.Equal(new Size(10, 10), list.ImageSize); 317list.ImageSize = new Size(10, 10); 318Assert.Equal(new Size(10, 10), list.ImageSize); 324list.ImageSize = new Size(10, 10); 325Assert.Equal(new Size(10, 10), list.ImageSize); 331list.ImageSize = new Size(11, 10); 332Assert.Equal(new Size(11, 10), list.ImageSize); 338list.ImageSize = new Size(11, 11); 339Assert.Equal(new Size(11, 11), list.ImageSize); 345list.ImageSize = new Size(12, 12); 346Assert.Equal(new Size(12, 12), list.ImageSize); 353list.ImageSize = new Size(10, 10); 354Assert.Equal(new Size(10, 10), list.ImageSize); 365Assert.Equal(new Size(16, 16), list.ImageSize); 368list.ImageSize = new Size(32, 32); 369Assert.Equal(new Size(32, 32), list.ImageSize); 373Assert.Equal(new Size(16, 16), list.ImageSize); 382Assert.Equal(new Size(16, 16), list.ImageSize); 385list.ImageSize = new Size(32, 32); 386Assert.Equal(new Size(32, 32), list.ImageSize); 390Assert.Equal(new Size(16, 16), list.ImageSize); 417Assert.Throws<ArgumentOutOfRangeException>("value", () => list.ImageSize = new Size(width, 1)); 425Assert.Throws<ArgumentOutOfRangeException>("value", () => list.ImageSize = new Size(1, height)); 459ImageSize = new Size(32, 32) 473Assert.Equal(new Size(32, 32), ((Image)Assert.Single(list.Images)).Size); 474Assert.Equal(new Size(32, 32), list.ImageSize); 482Assert.Equal(new Size(32, 32), ((Image)Assert.Single(list.Images)).Size); 483Assert.Equal(new Size(32, 32), list.ImageSize); 496ImageSize = new Size(32, 32) 511Assert.Equal(new Size(16, 16), list.ImageSize); 523ImageSize = new Size(32, 32) 536Assert.Equal(new Size(16, 16), list.ImageSize); 548ImageSize = new Size(32, 32) 561Assert.Equal(new Size(16, 16), list.ImageSize); 573ImageSize = new Size(32, 32) 585Assert.Equal(new Size(16, 16), list.ImageSize); 597ImageSize = new Size(32, 32) 609Assert.Equal(new Size(16, 16), list.ImageSize);
System\Windows\Forms\LabelTests.cs (4)
39Assert.Equal(new Size(100, 23), control.ClientSize); 54Assert.Equal(new Size(100, 23), control.DefaultSize); 101Assert.Equal(new Size(100, 23), control.Size); 292Size = new(10, 10),
System\Windows\Forms\Layout\FlowLayoutTests.cs (20)
43Size = new Size(10, 20) 48Size = new Size(10, 20) 53Size = new Size(100, 200) 67Size = new Size(50, 100) 72Size = new Size(10, 20) 104Size = new Size(10, 20) 109Size = new Size(10, 20) 114Size = new Size(100, 200) 128Size = new Size(50, 100) 133Size = new Size(10, 20) 165Size = new Size(10, 20) 170Size = new Size(10, 20) 175Size = new Size(100, 200) 189Size = new Size(50, 100) 194Size = new Size(10, 20) 226Size = new Size(10, 20) 231Size = new Size(10, 20) 236Size = new Size(100, 200) 250Size = new Size(50, 100) 255Size = new Size(10, 20)
System\Windows\Forms\ListBoxTests.cs (12)
40Assert.Equal(new Size(116, 92), control.ClientSize); 60Assert.Equal(new Size(120, 96), control.DefaultSize); 101Assert.Equal(new Size(120, 96), control.PreferredSize); 120Assert.Equal(new Size(120, 96), control.Size); 4791yield return new object[] { borderStyle, new Size(-1, -2) }; 4792yield return new object[] { borderStyle, new Size(10, 20) }; 4793yield return new object[] { borderStyle, new Size(30, 40) }; 4794yield return new object[] { borderStyle, new Size(int.MaxValue, int.MaxValue) }; 4806Assert.Equal(new Size(120, 96), control.GetPreferredSize(proposedSize)); 4810Assert.Equal(new Size(120, 96), control.GetPreferredSize(proposedSize)); 4823Assert.Equal(new Size(120, 96), control.GetPreferredSize(proposedSize)); 4827Assert.Equal(new Size(120, 96), control.GetPreferredSize(proposedSize));
System\Windows\Forms\ListViewItem.IKeyboardToolTipTests.cs (19)
242using var listView = GetListView(virtualMode: false, view: View.LargeIcon, size: new Size(150, 150)); 260using var listView = GetListView(virtualMode: false, view: View.LargeIcon, size: new Size(150, 150)); 279using var listView = GetListView(virtualMode: false, view: View.LargeIcon, size: new Size(150, 150)); 297using var listView = GetListView(virtualMode: false, view: View.LargeIcon, size: new Size(150, 150)); 316using var listView = GetListView(virtualMode: false, view: View.LargeIcon, size: new Size(150, 150)); 336using var listView = GetListView(virtualMode: false, view: View.LargeIcon, size: new Size(150, 150)); 355using var listView = GetListView(virtualMode: false, view: View.LargeIcon, size: new Size(150, 150)); 373using var listView = GetListView(virtualMode: false, view: View.LargeIcon, size: new Size(150, 150)); 392using var listView = GetListView(virtualMode: false, view: View.LargeIcon, size: new Size(150, 150)); 410using var listView = GetListView(virtualMode: false, view: View.SmallIcon, size: new Size(220, 150)); 429using var listView = GetListView(virtualMode: false, view: View.SmallIcon, size: new Size(220, 150)); 450using var listView = GetListView(virtualMode: false, view: View.SmallIcon, size: new Size(220, 150)); 470using var listView = GetListView(virtualMode: false, view: View.SmallIcon, size: new Size(220, 150)); 491using var listView = GetListView(virtualMode: false, view: View.SmallIcon, size: new Size(220, 150)); 513using var listView = GetListView(virtualMode: false, view: View.SmallIcon, size: new Size(220, 150)); 534using var listView = GetListView(virtualMode: false, view: View.SmallIcon, size: new Size(220, 150)); 554using var listView = GetListView(virtualMode: false, view: View.SmallIcon, size: new Size(220, 150)); 574using var listView = GetListView(virtualMode: false, view: View.SmallIcon, size: new Size(220, 150)); 818Size = size ?? new Size(50, 50),
System\Windows\Forms\ListViewTests.cs (12)
52Assert.Equal(new Size(117, 93), control.ClientSize); 69Assert.Equal(new Size(121, 97), control.DefaultSize); 116Assert.Equal(new Size(121, 97), control.PreferredSize); 135Assert.Equal(new Size(121, 97), control.Size); 5036listView.Size = new Size(200, 200); 5092listView.Size = new Size(200, 200); 5143Size = new Size(300, 200), 5170Size = new Size(300, 200), 5195Size = new Size(300, 200), 5218Size = new Size(300, 200), 5423Size = new Size(300, 200), 5447Point subItemLocation = listView.Items[0].SubItems[subItemIndex].Bounds.Location + new Size(1, 1);
System\Windows\Forms\MdiClientTests.cs (45)
482yield return new object[] { new Size(-3, -4), -7, -8, 1 }; 483yield return new object[] { new Size(0, 0), 0, 0, 0 }; 484yield return new object[] { new Size(1, 0), -3, -4, 1 }; 485yield return new object[] { new Size(0, 2), -4, -2, 1 }; 486yield return new object[] { new Size(30, 40), 26, 36, 1 }; 537Assert.Equal(new Size(expectedWidth, expectedHeight), control.ClientSize); 556Assert.Equal(new Size(expectedWidth, expectedHeight), control.ClientSize); 576yield return new object[] { new Size(0, 0), 0, 0, 0, 0, 0, 0 }; 577yield return new object[] { new Size(-3, -4), 0, 0, 0, 0, 0, 0 }; 578yield return new object[] { new Size(1, 0), 1, 0, 1, 0, 1, 0 }; 579yield return new object[] { new Size(0, 2), 0, 2, 0, 2, 1, 0 }; 580yield return new object[] { new Size(1, 2), 1, 2, 1, 2, 1, 0 }; 581yield return new object[] { new Size(30, 40), 30, 40, 26, 36, 1, 0 }; 639Assert.Equal(new Size(expectedClientWidth, expectedClientHeight), control.ClientSize); 642Assert.Equal(new Size(expectedWidth, expectedHeight), control.Size); 661Assert.Equal(new Size(expectedClientWidth, expectedClientHeight), control.ClientSize); 664Assert.Equal(new Size(expectedWidth, expectedHeight), control.Size); 684yield return new object[] { new Size(0, 0), 0, 0, 0 }; 685yield return new object[] { new Size(-3, -4), 0, 0, 1 }; 686yield return new object[] { new Size(1, 0), 2, 0, 2 }; 687yield return new object[] { new Size(0, 2), 2, 0, 2 }; 688yield return new object[] { new Size(1, 2), 2, 0, 2 }; 689yield return new object[] { new Size(30, 40), 2, 0, 2 }; 985yield return new object[] { new Size(0, 0), 0, 0, 0, 0, 0, 0, 0, 0, 0 }; 986yield return new object[] { new Size(-3, -4), 0, 0, 0, 0, 0, 0, 0, 1, 2 }; 987yield return new object[] { new Size(1, 0), 0, 0, 0, 0, 2, 4, 0, 2, 4 }; 988yield return new object[] { new Size(0, 2), 0, 0, 0, 0, 2, 4, 0, 2, 4 }; 989yield return new object[] { new Size(1, 2), 0, 0, 0, 0, 2, 4, 0, 2, 4 }; 990yield return new object[] { new Size(30, 40), 0, 0, 0, 0, 2, 4, 0, 2, 4 }; 1087Assert.Equal(new Size(expectedClientWidth, expectedClientHeight), control.ClientSize); 1090Assert.Equal(new Size(expectedWidth, expectedHeight), control.Size); 1114Assert.Equal(new Size(expectedClientWidth, expectedClientHeight), control.ClientSize); 1117Assert.Equal(new Size(expectedWidth, expectedHeight), control.Size); 1152control.Size = new Size(1, 0); 1153Assert.Equal(new Size(1, 0), control.Size); 1156control.Size = new Size(0, 1); 1157Assert.Equal(new Size(0, 1), control.Size); 1160control.Size = new Size(1, 2); 1161Assert.Equal(new Size(1, 2), control.Size); 1176control.Size = new Size(1, 0); 1177Assert.Equal(new Size(1, 0), control.Size); 1180control.Size = new Size(0, 1); 1181Assert.Equal(new Size(0, 1), control.Size); 1184control.Size = new Size(1, 2); 1185Assert.Equal(new Size(1, 2), control.Size);
System\Windows\Forms\MdiControlStripTests.cs (5)
46Assert.Equal(new Size(200, 24), mdiControlStrip.ClientSize); 63Assert.Equal(new Size(200, 24), mdiControlStrip.DefaultSize); 94Assert.Equal(new Size(16, 16), mdiControlStrip.ImageScalingSize); 111Assert.Equal(new Size(194, 20), mdiControlStrip.MaxItemSize); 136Assert.Equal(new Size(200, 24), mdiControlStrip.Size);
System\Windows\Forms\MenuStripTests.cs (5)
44Assert.Equal(new Size(200, 24), control.ClientSize); 61Assert.Equal(new Size(200, 24), control.DefaultSize); 92Assert.Equal(new Size(16, 16), control.ImageScalingSize); 109Assert.Equal(new Size(194, 20), control.MaxItemSize); 134Assert.Equal(new Size(200, 24), control.Size);
System\Windows\Forms\MonthCalendarTests.cs (41)
41Assert.Equal(new Size(1, 1), control.CalendarDimensions); 124Assert.Equal(new Size(176, 153), control.SingleMonthSize); 609yield return new object[] { new Size(1, 1), new Size(1, 1) }; 610yield return new object[] { new Size(1, 2), new Size(1, 2) }; 611yield return new object[] { new Size(2, 1), new Size(2, 1) }; 612yield return new object[] { new Size(2, 3), new Size(2, 3) }; 613yield return new object[] { new Size(3, 4), new Size(3, 4) }; 614yield return new object[] { new Size(3, 5), new Size(3, 4) }; 615yield return new object[] { new Size(3, 10), new Size(3, 4) }; 616yield return new object[] { new Size(5, 3), new Size(4, 3) }; 617yield return new object[] { new Size(10, 3), new Size(4, 3) }; 642Size value = new(width, height); 694Size value = new(width, height); 730Assert.Throws<ArgumentOutOfRangeException>("x", () => calendar.CalendarDimensions = new Size(x, 1)); 739Assert.Throws<ArgumentOutOfRangeException>("y", () => calendar.CalendarDimensions = new Size(1, y)); 2445yield return new object[] { new RECT(1, 2, 3, 4), new Size(3, 4) }; 2446yield return new object[] { new RECT(1, 2, 1, 6), new Size(1, 6) }; 2447yield return new object[] { new RECT(1, 2, 6, 1), new Size(6, 1) }; 2448yield return new object[] { new RECT(1, 2, 6, 6), new Size(6, 6) }; 2449yield return new object[] { new RECT(1, 2, 30, 40), new Size(30, 40) }; 2511yield return new object[] { new Size(1, 2) }; 2512yield return new object[] { new Size(0, 0) }; 2513yield return new object[] { new Size(-1, -2) }; 2514yield return new object[] { new Size(-1, 2) }; 2515yield return new object[] { new Size(1, -2) }; 2605control.Size = new Size(10, 10); 2611control.Size = new Size(10, 10); 2617control.Size = new Size(11, 11); 2625control.Size = new Size(10, 10); 4189using MonthCalendar calendar = new() { Size = new Size(600, 600), FirstDayOfWeek = Day.Sunday }; 4676calendar.CalendarDimensions = new Size(2, 2); 4680calendar.CalendarDimensions.Should().Be(new Size(1, 1));
System\Windows\Forms\PaddingTests.cs (2)
38Assert.Equal(new Size(all * 2, all * 2), padding.Size); 60Assert.Equal(new Size(right + left, top + bottom), padding.Size);
System\Windows\Forms\PanelTests.cs (7)
44Assert.Equal(new Size(200, 100), control.ClientSize); 58Assert.Equal(new Size(200, 100), control.DefaultSize); 103Assert.Equal(new Size(200, 100), control.Size); 614Size = new Size(16, 20) 617Assert.Equal(new Size(19, 23), control.PreferredSize); 629Size = new Size(16, 20) 632Assert.Equal(new Size(26, 31), control.PreferredSize);
System\Windows\Forms\PictureBoxTests.cs (14)
42Assert.Equal(new Size(100, 50), control.ClientSize); 57Assert.Equal(new Size(100, 50), control.DefaultSize); 89Assert.Equal(new Size(100, 50), control.PreferredSize); 99Assert.Equal(new Size(100, 50), control.Size); 722Size expectedImageSize = new(110, 100); 747Size expectedImageSize = new(110, 100); 1752Assert.Equal(new Size(110, 100), pictureBox.Image.Size); 1977Assert.Equal(new Size(110, 100), pictureBox.Image.Size); 1991Assert.Equal(new Size(110, 100), pictureBox.Image.Size); 1996Assert.Equal(new Size(110, 100), pictureBox.Image.Size); 2012Size expectedImageSize = new(110, 100); 2104Assert.Equal(new Size(110, 100), pictureBox.Image.Size); 2109Assert.Equal(new Size(110, 100), pictureBox.Image.Size); 2522Assert.Equal(new Size(110, 100), pictureBox.Image.Size);
System\Windows\Forms\PopupEventArgsTests.cs (5)
13yield return new object[] { new SubWin32Window(), new Button(), true, new Size(1, 2) }; 14yield return new object[] { new SubWin32Window(), new Button(), true, new Size(-1, -2) }; 32yield return new object[] { new Size(1, 2) }; 33yield return new object[] { new Size(-1, -2) }; 40PopupEventArgs e = new(new SubWin32Window(), new Button(), true, new Size(1, 2))
System\Windows\Forms\Printing\PrintPreviewControl.PrintPreviewControlAccessibilityObjectTests.cs (5)
186Size = new(100, 100); 202SetVirtualSizeNoInvalidate(new Size(50, 50)); 212SetVirtualSizeNoInvalidate(new Size(50, 200)); 222SetVirtualSizeNoInvalidate(new Size(200, 50)); 232SetVirtualSizeNoInvalidate(new Size(200, 200));
System\Windows\Forms\ProgressBarTests.cs (4)
39Assert.Equal(new Size(100, 23), control.ClientSize); 53Assert.Equal(new Size(100, 23), control.DefaultSize); 80Assert.Equal(new Size(100, 23), control.PreferredSize); 90Assert.Equal(new Size(100, 23), control.Size);
System\Windows\Forms\PropertyGridInternal\PropertyGridViewTests.Rendering.cs (1)
19Size = new(300, 200),
System\Windows\Forms\PropertyGridTests.cs (3)
60Assert.Equal(new Size(130, 130), control.ClientSize); 84Assert.Equal(new Size(130, 130), control.DefaultSize); 149Assert.Equal(new Size(130, 130), control.Size);
System\Windows\Forms\RadioButtonRendererTests.cs (1)
141? Validate.PolyPolygon16(new(new(bounds.X, bounds.Y), new Size(-1, -1)))
System\Windows\Forms\RadioButtonTests.cs (4)
44Assert.Equal(new Size(104, 24), control.ClientSize); 59Assert.Equal(new Size(104, 24), control.DefaultSize); 96Assert.Equal(new Size(14, 13), control.PreferredSize); 105Assert.Equal(new Size(104, 24), control.Size);
System\Windows\Forms\RichTextBoxTests.cs (3)
53Assert.Equal(new Size(96, 92), control.ClientSize); 68Assert.Equal(new Size(100, 96), control.DefaultSize); 124Assert.Equal(new Size(100, 96), control.Size);
System\Windows\Forms\ScrollableControlTests.cs (94)
218ClientSize = new Size(width, height) 328yield return new object[] { true, new Size(0, 0), 0 }; 329yield return new object[] { true, new Size(1, 0), 1 }; 330yield return new object[] { true, new Size(0, 1), 1 }; 331yield return new object[] { true, new Size(1, 2), 1 }; 332yield return new object[] { false, new Size(0, 0), 0 }; 333yield return new object[] { false, new Size(1, 0), 0 }; 334yield return new object[] { false, new Size(0, 1), 0 }; 335yield return new object[] { false, new Size(1, 2), 0 }; 420control.AutoScrollMargin = new Size(1, 0); 421Assert.Equal(new Size(1, 0), control.AutoScrollMargin); 424control.AutoScrollMargin = new Size(0, 1); 425Assert.Equal(new Size(0, 1), control.AutoScrollMargin); 428control.AutoScrollMargin = new Size(1, 2); 429Assert.Equal(new Size(1, 2), control.AutoScrollMargin); 444control.AutoScrollMargin = new Size(1, 0); 445Assert.Equal(new Size(1, 0), control.AutoScrollMargin); 448control.AutoScrollMargin = new Size(0, 1); 449Assert.Equal(new Size(0, 1), control.AutoScrollMargin); 452control.AutoScrollMargin = new Size(1, 2); 453Assert.Equal(new Size(1, 2), control.AutoScrollMargin); 468Assert.Throws<ArgumentOutOfRangeException>("value", () => control.AutoScrollMargin = new Size(x, y)); 555yield return new object[] { true, new Size(-1, -2), true, 3 }; 556yield return new object[] { true, new Size(0, 0), true, 0 }; 557yield return new object[] { true, new Size(1, 0), true, 4 }; 558yield return new object[] { true, new Size(0, 1), true, 4 }; 559yield return new object[] { true, new Size(1, 2), true, 4 }; 561yield return new object[] { false, new Size(-1, -2), true, 3 }; 562yield return new object[] { false, new Size(0, 0), false, 0 }; 563yield return new object[] { false, new Size(1, 0), true, 4 }; 564yield return new object[] { false, new Size(0, 1), true, 4 }; 565yield return new object[] { false, new Size(1, 2), true, 4 }; 599yield return new object[] { true, new Size(-1, -2), true, 3, 0 }; 600yield return new object[] { true, new Size(0, 0), true, 0, 0 }; 601yield return new object[] { true, new Size(1, 0), true, 4, 2 }; 602yield return new object[] { true, new Size(0, 1), true, 4, 2 }; 603yield return new object[] { true, new Size(1, 2), true, 4, 2 }; 605yield return new object[] { false, new Size(-1, -2), true, 3, 0 }; 606yield return new object[] { false, new Size(0, 0), false, 0, 0 }; 607yield return new object[] { false, new Size(1, 0), true, 4, 2 }; 608yield return new object[] { false, new Size(0, 1), true, 4, 2 }; 609yield return new object[] { false, new Size(1, 2), true, 4, 2 }; 661control.AutoScrollMinSize = new Size(1, 0); 662Assert.Equal(new Size(1, 0), control.AutoScrollMinSize); 665control.AutoScrollMinSize = new Size(0, 1); 666Assert.Equal(new Size(0, 1), control.AutoScrollMinSize); 669control.AutoScrollMinSize = new Size(1, 2); 670Assert.Equal(new Size(1, 2), control.AutoScrollMinSize); 685control.AutoScrollMinSize = new Size(1, 0); 686Assert.Equal(new Size(1, 0), control.AutoScrollMinSize); 689control.AutoScrollMinSize = new Size(0, 1); 690Assert.Equal(new Size(0, 1), control.AutoScrollMinSize); 693control.AutoScrollMinSize = new Size(1, 2); 694Assert.Equal(new Size(1, 2), control.AutoScrollMinSize); 711ClientSize = new Size(70, 80), 1119AutoScrollMinSize = new Size(10, 20), 1297AutoScrollMinSize = new Size(10, 20), 2219yield return new object[] { true, -1, -1, new Size(0, 0), 0 }; 2220yield return new object[] { true, 0, 0, new Size(0, 0), 0 }; 2221yield return new object[] { true, 0, 1, new Size(0, 1), 1 }; 2222yield return new object[] { true, 1, 0, new Size(1, 0), 1 }; 2223yield return new object[] { true, 1, 2, new Size(1, 2), 1 }; 2224yield return new object[] { false, -1, -1, new Size(0, 0), 0 }; 2225yield return new object[] { false, 0, 0, new Size(0, 0), 0 }; 2226yield return new object[] { false, 0, 1, new Size(0, 1), 0 }; 2227yield return new object[] { false, 1, 0, new Size(1, 0), 0 }; 2228yield return new object[] { false, 1, 2, new Size(1, 2), 0 }; 2293Size scrollableSize = new(100, 150); 2294Size nonScrollableSize = new(width, height); 2330ClientSize = new Size(width, height) 2354Size scrollableSize = new(100, 150); 2355Size nonScrollableSize = new(width, height); 2391ClientSize = new Size(width, height) 2481yield return new object[] { true, true, true, new Size(70, 80), null, new Rectangle(0, 0, 70, 80) }; 2482yield return new object[] { false, true, true, new Size(70, 80), null, new Rectangle(0, 0, 70, 80) }; 2484yield return new object[] { true, true, true, new Size(70, 80), new Control(), new Rectangle(0, 0, 70, 80) }; 2487yield return new object[] { false, true, true, new Size(70, 80), new LargeControl(), new Rectangle(0, 0, 70, 80) }; 2490yield return new object[] { true, false, false, new Size(70, 80), new LargeControl(), new Rectangle(0, 0, 100, 150) }; 2493yield return new object[] { true, false, false, new Size(0, 80), new LargeControl(), new Rectangle(0, 0, 100, 150) }; 2494yield return new object[] { true, false, false, new Size(-1, 80), new LargeControl(), new Rectangle(0, 0, 100, 150) }; 2495yield return new object[] { true, false, false, new Size(70, 0), new LargeControl(), new Rectangle(0, 0, 100, 150) }; 2496yield return new object[] { true, false, false, new Size(70, -1), new LargeControl(), new Rectangle(0, 0, 100, 150) }; 2499yield return new object[] { true, true, false, new Size(70, 80), new LargeControl(), new Rectangle(0, 0, 100, 150) }; 2500yield return new object[] { true, false, true, new Size(70, 80), new LargeControl(), new Rectangle(0, 0, 100, 150) }; 2501yield return new object[] { true, true, true, new Size(70, 80), new LargeControl(), new Rectangle(0, 0, 100, 150) }; 2503yield return new object[] { true, true, false, new Size(70, 80), new SmallControl(), new Rectangle(0, 0, 70, 80) }; 2504yield return new object[] { true, false, true, new Size(70, 80), new SmallControl(), new Rectangle(0, 0, 70, 80) }; 2505yield return new object[] { true, true, true, new Size(70, 80), new SmallControl(), new Rectangle(0, 0, 70, 80) }; 2512yield return new object[] { true, true, true, new Size(70, 80), parentControl, new Rectangle(0, 0, 100, 150) }; 2513yield return new object[] { true, hScroll, true, new Size(70, 80), childControl, new Rectangle(0, 0, 100, 150) }; 2521yield return new object[] { true, true, true, new Size(70, 80), parentControl, new Rectangle(0, 0, 100, 150) }; 2522yield return new object[] { true, true, vScroll, new Size(70, 80), childControl, new Rectangle(0, 0, 100, 150) }; 2550protected override Size DefaultSize => new(100, 150); 2557protected override Size DefaultSize => new(50, 60);
System\Windows\Forms\ScrollBarTests.cs (62)
1768yield return new object[] { Rectangle.Empty, new Size(0, 0), specified, Rectangle.Empty }; 1769yield return new object[] { Rectangle.Empty, new Size(1, 1), specified, Rectangle.Empty }; 1770yield return new object[] { Rectangle.Empty, new Size(2, 3), specified, Rectangle.Empty }; 1771yield return new object[] { Rectangle.Empty, new Size(-2, -3), specified, Rectangle.Empty }; 1774yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(0, 0), BoundsSpecified.All, new Rectangle(0, 0, 0, 4) }; 1775yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(0, 0), BoundsSpecified.X, new Rectangle(0, 2, 3, 4) }; 1776yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(0, 0), BoundsSpecified.Y, new Rectangle(1, 0, 3, 4) }; 1777yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(0, 0), BoundsSpecified.Width, new Rectangle(1, 2, 0, 4) }; 1778yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(0, 0), BoundsSpecified.Height, new Rectangle(1, 2, 3, 4) }; 1780yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), BoundsSpecified.All, new Rectangle(1, 2, 3, 4) }; 1781yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), BoundsSpecified.X, new Rectangle(1, 2, 3, 4) }; 1782yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), BoundsSpecified.Y, new Rectangle(1, 2, 3, 4) }; 1783yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), BoundsSpecified.Width, new Rectangle(1, 2, 3, 4) }; 1784yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), BoundsSpecified.Height, new Rectangle(1, 2, 3, 4) }; 1786yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(2, 3), BoundsSpecified.All, new Rectangle(2, 6, 6, 4) }; 1787yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(2, 3), BoundsSpecified.X, new Rectangle(2, 2, 3, 4) }; 1788yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(2, 3), BoundsSpecified.Y, new Rectangle(1, 6, 3, 4) }; 1789yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(2, 3), BoundsSpecified.Width, new Rectangle(1, 2, 6, 4) }; 1790yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(2, 3), BoundsSpecified.Height, new Rectangle(1, 2, 3, 4) }; 1792yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(-2, -3), BoundsSpecified.All, new Rectangle(-2, -6, -6, 4) }; 1793yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(-2, -3), BoundsSpecified.X, new Rectangle(-2, 2, 3, 4) }; 1794yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(-2, -3), BoundsSpecified.Y, new Rectangle(1, -6, 3, 4) }; 1795yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(-2, -3), BoundsSpecified.Width, new Rectangle(1, 2, -6, 4) }; 1796yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(-2, -3), BoundsSpecified.Height, new Rectangle(1, 2, 3, 4) }; 1816yield return new object[] { Rectangle.Empty, new Size(0, 0), specified, Rectangle.Empty }; 1817yield return new object[] { Rectangle.Empty, new Size(1, 1), specified, Rectangle.Empty }; 1818yield return new object[] { Rectangle.Empty, new Size(2, 3), specified, Rectangle.Empty }; 1819yield return new object[] { Rectangle.Empty, new Size(-2, -3), specified, Rectangle.Empty }; 1822yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(0, 0), BoundsSpecified.All, new Rectangle(0, 0, 3, 0) }; 1823yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(0, 0), BoundsSpecified.X, new Rectangle(0, 2, 3, 4) }; 1824yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(0, 0), BoundsSpecified.Y, new Rectangle(1, 0, 3, 4) }; 1825yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(0, 0), BoundsSpecified.Width, new Rectangle(1, 2, 3, 4) }; 1826yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(0, 0), BoundsSpecified.Height, new Rectangle(1, 2, 3, 0) }; 1828yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), BoundsSpecified.All, new Rectangle(1, 2, 3, 4) }; 1829yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), BoundsSpecified.X, new Rectangle(1, 2, 3, 4) }; 1830yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), BoundsSpecified.Y, new Rectangle(1, 2, 3, 4) }; 1831yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), BoundsSpecified.Width, new Rectangle(1, 2, 3, 4) }; 1832yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), BoundsSpecified.Height, new Rectangle(1, 2, 3, 4) }; 1834yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(2, 3), BoundsSpecified.All, new Rectangle(2, 6, 3, 12) }; 1835yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(2, 3), BoundsSpecified.X, new Rectangle(2, 2, 3, 4) }; 1836yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(2, 3), BoundsSpecified.Y, new Rectangle(1, 6, 3, 4) }; 1837yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(2, 3), BoundsSpecified.Width, new Rectangle(1, 2, 3, 4) }; 1838yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(2, 3), BoundsSpecified.Height, new Rectangle(1, 2, 3, 12) }; 1840yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(-2, -3), BoundsSpecified.All, new Rectangle(-2, -6, 3, -12) }; 1841yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(-2, -3), BoundsSpecified.X, new Rectangle(-2, 2, 3, 4) }; 1842yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(-2, -3), BoundsSpecified.Y, new Rectangle(1, -6, 3, 4) }; 1843yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(-2, -3), BoundsSpecified.Width, new Rectangle(1, 2, 3, 4) }; 1844yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(-2, -3), BoundsSpecified.Height, new Rectangle(1, 2, 3, -12) }; 2576yield return new object[] { true, 100, 200, ScrollOrientation.HorizontalScroll, new Size(10, 20), new Size(20, 20) }; 2577yield return new object[] { true, 200, 100, ScrollOrientation.HorizontalScroll, new Size(10, 20), new Size(5, 20) }; 2578yield return new object[] { true, 100, 200, ScrollOrientation.VerticalScroll, new Size(10, 20), new Size(10, 40) }; 2579yield return new object[] { true, 200, 100, ScrollOrientation.VerticalScroll, new Size(10, 20), new Size(10, 10) }; 2581yield return new object[] { false, 100, 200, ScrollOrientation.HorizontalScroll, new Size(10, 20), new Size(10, 20) }; 2582yield return new object[] { false, 100, 100, ScrollOrientation.VerticalScroll, new Size(10, 20), new Size(10, 20) }; 3113vScrollBar.Size = new(50, 200); 3132hScrollBar.Size = new(200, 50);
System\Windows\Forms\SplitterPanelTests.cs (20)
48Assert.Equal(new Size(200, 100), control.ClientSize); 90Assert.Equal(new Size(200, 100), control.Size); 463Assert.Equal(new Size(200, 100), control.ClientSize); 466Assert.Equal(new Size(200, 100), control.Size); 482Assert.Equal(new Size(200, 100), control.ClientSize); 485Assert.Equal(new Size(200, 100), control.Size); 540Assert.Equal(new Size(200, 100), control.ClientSize); 543Assert.Equal(new Size(200, 100), control.Size); 562Assert.Equal(new Size(200, 100), control.ClientSize); 565Assert.Equal(new Size(200, 100), control.Size); 772yield return new object[] { new Size(-3, -4), 1 }; 773yield return new object[] { new Size(0, 0), 1 }; 774yield return new object[] { new Size(1, 0), 1 }; 775yield return new object[] { new Size(0, 2), 1 }; 776yield return new object[] { new Size(30, 40), 1 }; 777yield return new object[] { new Size(200, 100), 0 }; 1185Assert.Equal(new Size(200, 100), control.ClientSize); 1188Assert.Equal(new Size(200, 100), control.Size); 1204Assert.Equal(new Size(200, 100), control.ClientSize); 1207Assert.Equal(new Size(200, 100), control.Size);
System\Windows\Forms\SplitterTests.cs (4)
38Assert.Equal(new Size(3, 3), control.ClientSize); 53Assert.Equal(new Size(3, 3), control.DefaultSize); 82Assert.Equal(new Size(3, 3), control.PreferredSize); 93Assert.Equal(new Size(3, 3), control.Size);
System\Windows\Forms\StatusStripTests.cs (7)
44Assert.Equal(new Size(200, 22), control.ClientSize); 61Assert.Equal(new Size(200, 22), control.DefaultSize); 92Assert.Equal(new Size(16, 16), control.ImageScalingSize); 109Assert.Equal(new Size(185, 22), control.MaxItemSize); 135Assert.Equal(new Size(200, 22), control.Size); 665Size = new Size(210, 32) 692Size = new Size(190, 12)
System\Windows\Forms\StatusStripTests.Rendering.cs (1)
20Size = new Size(200, 38)
System\Windows\Forms\SystemInformationTests.cs (3)
117Assert.Contains(size, new Size[] { new(32, 32), new(48, 48), new(64, 64) });
System\Windows\Forms\TabControl.ControlCollectionTests.cs (3)
153yield return new object[] { TabAppearance.Buttons, new Size(100, 120), 0 }; 154yield return new object[] { TabAppearance.FlatButtons, new Size(100, 120), 1 }; 155yield return new object[] { TabAppearance.Normal, new Size(100, 120), 0 };
System\Windows\Forms\TabControl.TabPageCollectionTests.cs (3)
141yield return new object[] { TabAppearance.Buttons, new Size(100, 120), 0 }; 142yield return new object[] { TabAppearance.FlatButtons, new Size(100, 120), 1 }; 143yield return new object[] { TabAppearance.Normal, new Size(100, 120), 0 };
System\Windows\Forms\TabControlTests.cs (30)
41Assert.Equal(new Size(200, 100), control.ClientSize); 55Assert.Equal(new Size(200, 100), control.DefaultSize); 86Assert.Equal(new Size(200, 100), control.PreferredSize); 100Assert.Equal(new Size(200, 100), control.Size); 1382imageList1.ImageSize = new Size(1, 2); 1389imageList1.ImageSize = new Size(2, 3); 1419imageList1.ImageSize = new Size(1, 2); 1430imageList1.ImageSize = new Size(2, 3); 1469yield return new object[] { new Size(0, 0) }; 1470yield return new object[] { new Size(0, 16) }; 1471yield return new object[] { new Size(16, 0) }; 1472yield return new object[] { new Size(16, 16) }; 1494yield return new object[] { new Size(0, 16) }; 1495yield return new object[] { new Size(16, 0) }; 1496yield return new object[] { new Size(16, 16) }; 1533ItemSize = new Size(16, 16) 1561control.ItemSize = new Size(1, 0); 1562Assert.Equal(new Size(1, 0), control.ItemSize); 1565control.ItemSize = new Size(0, 1); 1566Assert.Equal(new Size(0, 1), control.ItemSize); 1569control.ItemSize = new Size(1, 2); 1570Assert.Equal(new Size(1, 2), control.ItemSize); 1585control.ItemSize = new Size(1, 0); 1586Assert.Equal(new Size(1, 0), control.ItemSize); 1589control.ItemSize = new Size(0, 1); 1590Assert.Equal(new Size(0, 1), control.ItemSize); 1593control.ItemSize = new Size(1, 2); 1594Assert.Equal(new Size(1, 2), control.ItemSize); 1606Assert.Throws<ArgumentOutOfRangeException>("value", () => control.ItemSize = new Size(-1, 1)); 1613Assert.Throws<ArgumentOutOfRangeException>("value", () => control.ItemSize = new Size(1, -1));
System\Windows\Forms\TableLayoutPanelTests.cs (10)
46Assert.Equal(new Size(200, 100), control.ClientSize); 63Assert.Equal(new Size(200, 100), control.DefaultSize); 114Assert.Equal(new Size(200, 100), control.Size); 977ClientSize = new Size(70, 80) 1022ClientSize = new Size(70, 80) 1045ClientSize = new Size(70, 80) 1065ClientSize = new Size(70, 80) 1085ClientSize = new Size(70, 80) 1105ClientSize = new Size(70, 80) 1125ClientSize = new Size(50, 50)
System\Windows\Forms\TabPageTests.cs (30)
48Assert.Equal(new Size(200, 100), control.ClientSize); 63Assert.Equal(new Size(200, 100), control.DefaultSize); 109Assert.Equal(new Size(200, 100), control.Size); 157Assert.Equal(new Size(200, 100), control.ClientSize); 172Assert.Equal(new Size(200, 100), control.DefaultSize); 218Assert.Equal(new Size(200, 100), control.Size); 1898Assert.Equal(new Size(200, 100), control.ClientSize); 1901Assert.Equal(new Size(200, 100), control.Size); 1920Assert.Equal(new Size(200, 100), control.ClientSize); 1923Assert.Equal(new Size(200, 100), control.Size); 1988Assert.Equal(new Size(200, 100), control.ClientSize); 1991Assert.Equal(new Size(200, 100), control.Size); 2011Assert.Equal(new Size(200, 100), control.ClientSize); 2014Assert.Equal(new Size(200, 100), control.Size); 2089Assert.Equal(new Size(200, 100), control.ClientSize); 2092Assert.Equal(new Size(200, 100), control.Size); 2114Assert.Equal(new Size(200, 100), control.ClientSize); 2117Assert.Equal(new Size(200, 100), control.Size); 4345Assert.Equal(new Size(width, height), control.ClientSize); 4348Assert.Equal(new Size(width, height), control.Size); 4366Assert.Equal(new Size(width, height), control.ClientSize); 4369Assert.Equal(new Size(width, height), control.Size); 4482Assert.Equal(new Size(width, height), control.ClientSize); 4485Assert.Equal(new Size(width, height), control.Size); 4504Assert.Equal(new Size(width, height), control.ClientSize); 4507Assert.Equal(new Size(width, height), control.Size); 4637Assert.Equal(new Size(expectedWidth, expectedHeight), control.ClientSize); 4640Assert.Equal(new Size(expectedWidth, expectedHeight), control.Size); 4661Assert.Equal(new Size(expectedWidth, expectedHeight), control.ClientSize); 4664Assert.Equal(new Size(expectedWidth, expectedHeight), control.Size);
System\Windows\Forms\TextBoxBase.TextBoxBaseUiaTextProviderTests.cs (63)
164using TextBoxBase textBoxBase = new SubTextBoxBase { Size = new Size(width, height) }; 190textBoxBase.Size = new Size(50, 100); 216textBoxBase.Size = new Size(30, 100); 232textBoxBase.Size = new Size(30, 50); 258textBoxBase.Size = new Size(30, 50); 269yield return new object[] { new Size(50, 20), false, 0, 0 }; 270yield return new object[] { new Size(50, 20), false, 50, 0 }; 271yield return new object[] { new Size(100, 50), true, 50, 3 }; 272yield return new object[] { new Size(50, 50), true, 50, 8 }; 310yield return new object[] { new Size(50, 20), false, 0, 0 }; 311yield return new object[] { new Size(50, 20), false, 3, 0 }; 312yield return new object[] { new Size(50, 50), true, 3, 19 }; 313yield return new object[] { new Size(100, 50), true, 3, 40 }; 314yield return new object[] { new Size(50, 50), true, 100, -1 }; 388yield return new object[] { new Size(50, 20), "Some test text for testing", false, 0, new Point(1, 0) }; 389yield return new object[] { new Size(50, 20), "Some test text for testing", false, 15, new Point(79, 0) }; 390yield return new object[] { new Size(50, 20), "Some test text for testing", true, 15, new Point(27, 30) }; 391yield 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) }; 392yield 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) }; 393yield 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) }; 426yield return new object[] { new Size(50, 20), "", false, 0, new Point(0, 0) }; 427yield return new object[] { new Size(50, 20), "Some test text", false, 100, new Point(0, 0) }; 428yield return new object[] { new Size(50, 20), "Some test text", false, -1, new Point(0, 0) }; 429yield return new object[] { new Size(50, 20), "Some test text", false, 12, new Point(71, 0) }; 430yield return new object[] { new Size(50, 20), "Some test text", true, 12, new Point(19, 30) }; 431yield return new object[] { new Size(100, 60), "Some test \n text", false, 10, new Point(56, 0) }; 432yield return new object[] { new Size(100, 60), "Some test \n text", true, 10, new Point(59, 1) }; 433yield return new object[] { new Size(100, 60), "Some test \r\n text", false, 10, new Point(56, 0) }; 434yield return new object[] { new Size(100, 60), "Some test \r\n text", true, 10, new Point(59, 1) }; 435yield return new object[] { new Size(100, 60), "Some test \r\n text", false, 12, new Point(60, 0) }; 436yield return new object[] { new Size(100, 60), "Some test \r\n text", true, 12, new Point(7, 16) }; 437yield return new object[] { new Size(100, 60), "Some test \t text", false, 10, new Point(57, 0) }; 438yield return new object[] { new Size(100, 60), "Some test \t text", true, 10, new Point(60, 1) }; 439yield return new object[] { new Size(40, 60), "Some test \t text", true, 12, new Point(8, 46) }; 470yield return new object[] { false, new Size(0, 0), new Rectangle(1, 0, 78, 16) }; 471yield return new object[] { false, new Size(50, 50), new Rectangle(1, 1, 44, 15) }; 472yield return new object[] { false, new Size(250, 100), new Rectangle(1, 1, 244, 15) }; 473yield return new object[] { true, new Size(0, 0), new Rectangle(4, 0, 72, 16) }; 477yield return new object[] { true, new Size(50, 50), new Rectangle(4, 1, 38, 44) }; 478yield return new object[] { true, new Size(250, 100), new Rectangle(4, 1, 238, 94) }; 482yield return new object[] { true, new Size(50, 50), new Rectangle(4, 1, 38, 30) }; 483yield return new object[] { true, new Size(250, 100), new Rectangle(4, 1, 238, 90) }; 611yield return new object[] { new Size(0, 0), 0, 0 }; 612yield return new object[] { new Size(0, 20), 0, 0 }; 613yield return new object[] { new Size(30, 30), 0, 4 }; 614yield return new object[] { new Size(50, 20), 0, 8 }; 615yield return new object[] { new Size(150, 20), 0, 26 }; 647yield return new object[] { new Size(0, 0), 0, 0 }; 648yield return new object[] { new Size(0, 20), 0, 0 }; 649yield return new object[] { new Size(30, 30), 0, 5 }; 650yield return new object[] { new Size(50, 20), 0, 5 }; 651yield return new object[] { new Size(120, 20), 0, 19 }; 652yield return new object[] { new Size(50, 80), 0, 26 }; 656yield return new object[] { new Size(0, 0), 0, 0 }; 657yield return new object[] { new Size(0, 20), 0, 0 }; 658yield return new object[] { new Size(30, 30), 0, 3 }; 659yield return new object[] { new Size(50, 20), 0, 6 }; 660yield return new object[] { new Size(120, 20), 0, 20 }; 661yield return new object[] { new Size(50, 80), 0, 26 }; 711yield return new object[] { new Size(0, 0) }; 712yield return new object[] { new Size(100, 20) }; 890Size = new Size(50, 100) 908Size = new Size(50, 100)
System\Windows\Forms\TextBoxRendererTests.cs (3)
44? Validate.Polygon16(new(new(1, 1), new(bounds.Width - 2, bounds.Height - 2))) 74? Validate.Polygon16(new(new(1, 1), new(bounds.Width - 2, bounds.Height - 2))) 110? Validate.Polygon16(new(new(1, 1), new(bounds.Width - 2, bounds.Height - 2)))
System\Windows\Forms\TextRendererTests.cs (40)
415yield return new object[] { "string", null, new Size(1, 2) }; 416yield return new object[] { "string", null, new Size(100, 200) }; 417yield return new object[] { "string", null, new Size(int.MaxValue, int.MaxValue) }; 419yield return new object[] { "string", SystemFonts.MenuFont, new Size(1, 2) }; 420yield return new object[] { "string", SystemFonts.MenuFont, new Size(100, 200) }; 421yield return new object[] { "string", SystemFonts.MenuFont, new Size(int.MaxValue, int.MaxValue) }; 439yield return new object[] { "string", null, new Size(1, 2), TextFormatFlags.Default }; 440yield return new object[] { "string", null, new Size(100, 200), TextFormatFlags.Default }; 441yield return new object[] { "string", null, new Size(int.MaxValue, int.MaxValue), TextFormatFlags.Default }; 443yield return new object[] { "string", SystemFonts.MenuFont, new Size(1, 2), TextFormatFlags.Default }; 444yield return new object[] { "string", SystemFonts.MenuFont, new Size(100, 200), TextFormatFlags.Default }; 445yield return new object[] { "string", SystemFonts.MenuFont, new Size(int.MaxValue, int.MaxValue), TextFormatFlags.Default }; 447yield return new object[] { "string", SystemFonts.MenuFont, new Size(100, 200), TextFormatFlags.VerticalCenter | TextFormatFlags.HorizontalCenter }; 448yield return new object[] { "string", SystemFonts.MenuFont, new Size(100, 200), TextFormatFlags.Bottom | TextFormatFlags.Right }; 449yield return new object[] { "string", SystemFonts.MenuFont, new Size(100, 200), TextFormatFlags.SingleLine }; 450yield return new object[] { "string", SystemFonts.MenuFont, new Size(int.MaxValue, int.MaxValue), TextFormatFlags.SingleLine }; 451yield return new object[] { "string", SystemFonts.MenuFont, new Size(100, 200), (TextFormatFlags)1024 }; 452yield return new object[] { "string", SystemFonts.MenuFont, new Size(100, 200), TextFormatFlags.RightToLeft }; 453yield return new object[] { "string", SystemFonts.MenuFont, new Size(100, 200), (TextFormatFlags)int.MaxValue }; 520Assert.Equal(Size.Empty, TextRenderer.MeasureText(text, SystemFonts.MenuFont, new Size(300, 400))); 521Assert.Equal(Size.Empty, TextRenderer.MeasureText(text, SystemFonts.MenuFont, new Size(300, 400), TextFormatFlags.Default)); 523Assert.Equal(Size.Empty, TextRenderer.MeasureText(graphics, text, SystemFonts.MenuFont, new Size(300, 400))); 524Assert.Equal(Size.Empty, TextRenderer.MeasureText(graphics, text, SystemFonts.MenuFont, new Size(300, 400), TextFormatFlags.Default)); 526Assert.Equal(Size.Empty, TextRenderer.MeasureText(text.AsSpan(), SystemFonts.MenuFont, new Size(300, 400))); 527Assert.Equal(Size.Empty, TextRenderer.MeasureText(text.AsSpan(), SystemFonts.MenuFont, new Size(300, 400), TextFormatFlags.Default)); 529Assert.Equal(Size.Empty, TextRenderer.MeasureText(graphics, text.AsSpan(), SystemFonts.MenuFont, new Size(300, 400))); 530Assert.Equal(Size.Empty, TextRenderer.MeasureText(graphics, text.AsSpan(), SystemFonts.MenuFont, new Size(300, 400), TextFormatFlags.Default)); 552TextRenderer.MeasureText(mockDeviceContext.Object, "text", SystemFonts.MenuFont, new Size(300, 400)); 556TextRenderer.MeasureText(mockDeviceContext.Object, "text", SystemFonts.MenuFont, new Size(300, 400), TextFormatFlags.Default); 565Assert.Throws<ArgumentNullException>("dc", () => TextRenderer.MeasureText(null, string.Empty, SystemFonts.MenuFont, new Size(300, 400))); 566Assert.Throws<ArgumentNullException>("dc", () => TextRenderer.MeasureText(null, string.Empty, SystemFonts.MenuFont, new Size(300, 400), TextFormatFlags.Default)); 731new Size(int.MaxValue, int.MaxValue), 740{ TextFormatFlags.GlyphOverhangPadding, new Size(78, 13) }, 741{ TextFormatFlags.LeftAndRightPadding, new Size(82, 13) }, 742{ TextFormatFlags.NoPadding, new Size(71, 13) } 818new Size(int.MaxValue, int.MaxValue), 829{ TextFormatFlags.Default, new Size(57, 13) }, 830{ TextFormatFlags.PreserveGraphicsTranslateTransform, new Size(57, 13) }, 831{ TextFormatFlags.PreserveGraphicsClipping, new Size(57, 13) }, 832{ TextFormatFlags.PreserveGraphicsClipping | TextFormatFlags.PreserveGraphicsTranslateTransform, new Size(57, 13) },
System\Windows\Forms\ToolStripButtonTests.cs (18)
45Assert.Equal(new Size(23, 23), item.DefaultSize); 83Assert.Equal(new Size(23, 23), item.Size); 126Assert.Equal(new Size(23, 23), item.DefaultSize); 164Assert.Equal(new Size(23, 23), item.Size); 213Assert.Equal(new Size(23, 23), item.DefaultSize); 251Assert.Equal(new Size(23, 23), item.Size); 303Assert.Equal(new Size(23, 23), item.DefaultSize); 341Assert.Equal(new Size(23, 23), item.Size); 391Assert.Equal(new Size(23, 23), item.DefaultSize); 429Assert.Equal(new Size(23, 23), item.Size); 489Assert.Equal(new Size(23, 23), item.DefaultSize); 527Assert.Equal(new Size(23, 23), item.Size); 1079yield return new object[] { new Size(-1, -2) }; 1080yield return new object[] { new Size(10, 20) }; 1081yield return new object[] { new Size(30, 40) }; 1082yield return new object[] { new Size(int.MaxValue, int.MaxValue) }; 1090Assert.Equal(new Size(23, 4), item.GetPreferredSize(proposedSize)); 1093Assert.Equal(new Size(23, 4), item.GetPreferredSize(proposedSize));
System\Windows\Forms\ToolStripComboBoxTests.cs (3)
385Size constrainingSize = new(50, 50); 395Size constrainingSize = new(50, 50); 396Size basePreferredSize = new(100, 23);
System\Windows\Forms\ToolStripContentPanelTests.cs (25)
46Assert.Equal(new Size(200, 100), control.ClientSize); 60Assert.Equal(new Size(200, 100), control.DefaultSize); 108Assert.Equal(new Size(200, 100), control.Size); 233yield return new object[] { true, new Size(0, 0), 0 }; 234yield return new object[] { true, new Size(1, 0), 1 }; 235yield return new object[] { true, new Size(0, 1), 1 }; 236yield return new object[] { true, new Size(1, 2), 1 }; 237yield return new object[] { false, new Size(0, 0), 0 }; 238yield return new object[] { false, new Size(1, 0), 0 }; 239yield return new object[] { false, new Size(0, 1), 0 }; 240yield return new object[] { false, new Size(1, 2), 0 }; 320yield return new object[] { true, new Size(-1, -2), true, 3 }; 321yield return new object[] { true, new Size(0, 0), true, 0 }; 322yield return new object[] { true, new Size(1, 0), true, 3 }; 323yield return new object[] { true, new Size(0, 1), true, 3 }; 324yield return new object[] { true, new Size(1, 2), true, 3 }; 326yield return new object[] { false, new Size(-1, -2), true, 3 }; 327yield return new object[] { false, new Size(0, 0), false, 0 }; 328yield return new object[] { false, new Size(1, 0), true, 3 }; 329yield return new object[] { false, new Size(0, 1), true, 3 }; 330yield return new object[] { false, new Size(1, 2), true, 3 }; 939Assert.Equal(new Size(200, 100), control.ClientSize); 942Assert.Equal(new Size(200, 100), control.Size); 961Assert.Equal(new Size(200, 100), control.ClientSize); 964Assert.Equal(new Size(200, 100), control.Size);
System\Windows\Forms\ToolStripControlHostTests.cs (21)
655c.Size = new Size(10, 20); 656Assert.Equal(new Size(10, 20), c.Size); 755Assert.Equal(new Size(23, 23), item.DefaultSize); 2192yield return new object[] { new Size(-1, -2) }; 2193yield return new object[] { new Size(0, 0) }; 2194yield return new object[] { new Size(1, 2) }; 2195yield return new object[] { new Size(22, 23) }; 2196yield return new object[] { new Size(23, 22) }; 2197yield return new object[] { new Size(23, 23) }; 2711yield return new object[] { new Size(-1, -2) }; 2712yield return new object[] { new Size(10, 20) }; 2713yield return new object[] { new Size(30, 40) }; 2714yield return new object[] { new Size(int.MaxValue, int.MaxValue) }; 2723MinimumSize = new Size(10, 20) 2726Assert.Equal(new Size(10, 20), item.GetPreferredSize(proposedSize)); 2729Assert.Equal(new Size(10, 20), item.GetPreferredSize(proposedSize)); 2738MinimumSize = new Size(10, 20) 2744Assert.Equal(new Size(14, 26), item.GetPreferredSize(proposedSize)); 2747Assert.Equal(new Size(14, 26), item.GetPreferredSize(proposedSize)); 4117c.Size = new Size(10, 20); 4118Assert.Equal(new Size(10, 20), c.Size);
System\Windows\Forms\ToolStripDropDownItemTests.cs (8)
41Assert.Equal(new Size(23, 23), item.DefaultSize); 83Assert.Equal(new Size(23, 23), item.Size); 130Assert.Equal(new Size(23, 23), item.DefaultSize); 172Assert.Equal(new Size(23, 23), item.Size); 229Assert.Equal(new Size(23, 23), item.DefaultSize); 271Assert.Equal(new Size(23, 23), item.Size); 329Assert.Equal(new Size(23, 23), item.DefaultSize); 379Assert.Equal(new Size(23, 23), item.Size);
System\Windows\Forms\ToolStripDropDownTests.cs (9)
48Assert.Equal(new Size(100, 25), control.ClientSize); 65Assert.Equal(new Size(100, 25), control.DefaultSize); 97Assert.Equal(new Size(16, 16), control.ImageScalingSize); 116Assert.Equal(Screen.GetWorkingArea(new Rectangle(0, 0, 100, 25)).Size - new Size(2, 4), control.MaxItemSize); 142Assert.Equal(new Size(2, 4), control.Size); 1965Assert.Equal(new Size(100, 25), control.ClientSize); 1968Assert.Equal(new Size(100, 25), control.Size); 1987Assert.Equal(new Size(100, 25), control.ClientSize); 1990Assert.Equal(new Size(100, 25), control.Size);
System\Windows\Forms\ToolStripItemTests.cs (36)
44Assert.Equal(new Size(23, 23), item.DefaultSize); 82Assert.Equal(new Size(23, 23), item.Size); 129Assert.Equal(new Size(23, 23), item.DefaultSize); 167Assert.Equal(new Size(23, 23), item.Size); 224Assert.Equal(new Size(23, 23), item.DefaultSize); 262Assert.Equal(new Size(23, 23), item.Size); 5836Size = new Size(1, 2) 5874Size = new Size(1, 2) 7817Assert.Equal(new Size(10, 11), item.Size); 7822protected override Size DefaultSize => new(10, 11); 7827yield return new object[] { new Size(-1, -2) }; 7828yield return new object[] { new Size(0, 0) }; 7829yield return new object[] { new Size(1, 2) }; 7830yield return new object[] { new Size(22, 23) }; 7831yield return new object[] { new Size(23, 22) }; 7832yield return new object[] { new Size(23, 23) }; 7940yield return new object[] { new Size(-1, -2), 1 }; 7941yield return new object[] { new Size(0, 0), 1 }; 7942yield return new object[] { new Size(1, 2), 1 }; 7943yield return new object[] { new Size(22, 23), 1 }; 7944yield return new object[] { new Size(23, 22), 1 }; 7945yield return new object[] { new Size(23, 23), 0 }; 10299yield return new object[] { new Size(-1, -2) }; 10300yield return new object[] { new Size(10, 20) }; 10301yield return new object[] { new Size(30, 40) }; 10302yield return new object[] { new Size(int.MaxValue, int.MaxValue) }; 10310Assert.Equal(new Size(4, 4), item.GetPreferredSize(proposedSize)); 10313Assert.Equal(new Size(4, 4), item.GetPreferredSize(proposedSize)); 10325Assert.Equal(new Size(4, 4), item.GetPreferredSize(proposedSize)); 10328Assert.Equal(new Size(4, 4), item.GetPreferredSize(proposedSize)); 10340Assert.Equal(new Size(4, 4), item.GetPreferredSize(proposedSize)); 10343Assert.Equal(new Size(4, 4), item.GetPreferredSize(proposedSize)); 15400menuStrip1.Size = new Size(100, 50); 15401toolStripMenuItem1.Size = new Size(10, 30); 15402toolStripMenuItem2.Size = new Size(15, 30); 15403toolStripMenuItem3.Size = new Size(15, 30);
System\Windows\Forms\ToolStripMenuItemTests.cs (3)
42Assert.Equal(new Size(32, 19), item.DefaultSize); 92Assert.Equal(new Size(32, 19), item.Size); 308Size = new Size(100, 50)
System\Windows\Forms\ToolStripRendererTests.cs (1)
17Assert.Equal(new Size(10, 11), result.Size);
System\Windows\Forms\ToolStripSeparatorTests.cs (106)
42Assert.Equal(new Size(6, 6), item.DefaultSize); 80Assert.Equal(new Size(6, 6), item.Size); 746yield return new object[] { new Size(-1, -2) }; 747yield return new object[] { new Size(10, 20) }; 748yield return new object[] { new Size(30, 40) }; 749yield return new object[] { new Size(int.MaxValue, int.MaxValue) }; 757Assert.Equal(new Size(6, 6), item.GetPreferredSize(proposedSize)); 760Assert.Equal(new Size(6, 6), item.GetPreferredSize(proposedSize)); 765yield return new object[] { ToolStripLayoutStyle.Flow, Size.Empty, new Size(6, 23) }; 766yield return new object[] { ToolStripLayoutStyle.Flow, new Size(-1, -2), new Size(6, 23) }; 767yield return new object[] { ToolStripLayoutStyle.Flow, new Size(10, 20), new Size(6, 23) }; 768yield return new object[] { ToolStripLayoutStyle.Flow, new Size(30, 40), new Size(6, 23) }; 769yield return new object[] { ToolStripLayoutStyle.Flow, new Size(int.MaxValue, int.MaxValue), new Size(6, 23) }; 771yield return new object[] { ToolStripLayoutStyle.HorizontalStackWithOverflow, Size.Empty, new Size(6, 23) }; 772yield return new object[] { ToolStripLayoutStyle.HorizontalStackWithOverflow, new Size(-1, -2), new Size(6, 23) }; 773yield return new object[] { ToolStripLayoutStyle.HorizontalStackWithOverflow, new Size(10, 20), new Size(6, 23) }; 774yield return new object[] { ToolStripLayoutStyle.HorizontalStackWithOverflow, new Size(30, 40), new Size(6, 23) }; 775yield return new object[] { ToolStripLayoutStyle.HorizontalStackWithOverflow, new Size(int.MaxValue, int.MaxValue), new Size(6, 23) }; 777yield return new object[] { ToolStripLayoutStyle.StackWithOverflow, Size.Empty, new Size(6, 23) }; 778yield return new object[] { ToolStripLayoutStyle.StackWithOverflow, new Size(-1, -2), new Size(6, 23) }; 779yield return new object[] { ToolStripLayoutStyle.StackWithOverflow, new Size(10, 20), new Size(6, 23) }; 780yield return new object[] { ToolStripLayoutStyle.StackWithOverflow, new Size(30, 40), new Size(6, 23) }; 781yield return new object[] { ToolStripLayoutStyle.StackWithOverflow, new Size(int.MaxValue, int.MaxValue), new Size(6, 23) }; 783yield return new object[] { ToolStripLayoutStyle.Table, Size.Empty, new Size(6, 23) }; 784yield return new object[] { ToolStripLayoutStyle.Table, new Size(-1, -2), new Size(6, 23) }; 785yield return new object[] { ToolStripLayoutStyle.Table, new Size(10, 20), new Size(6, 23) }; 786yield return new object[] { ToolStripLayoutStyle.Table, new Size(30, 40), new Size(6, 23) }; 787yield return new object[] { ToolStripLayoutStyle.Table, new Size(int.MaxValue, int.MaxValue), new Size(6, 23) }; 789yield return new object[] { ToolStripLayoutStyle.VerticalStackWithOverflow, Size.Empty, new Size(23, 6) }; 790yield return new object[] { ToolStripLayoutStyle.VerticalStackWithOverflow, new Size(-1, -2), new Size(23, 6) }; 791yield return new object[] { ToolStripLayoutStyle.VerticalStackWithOverflow, new Size(10, 20), new Size(23, 6) }; 792yield return new object[] { ToolStripLayoutStyle.VerticalStackWithOverflow, new Size(30, 40), new Size(23, 6) }; 793yield return new object[] { ToolStripLayoutStyle.VerticalStackWithOverflow, new Size(int.MaxValue, int.MaxValue), new Size(23, 6) }; 819yield return new object[] { layoutStyle, new Size(-1, -2) }; 820yield return new object[] { layoutStyle, new Size(10, 20) }; 821yield return new object[] { layoutStyle, new Size(30, 40) }; 822yield return new object[] { layoutStyle, new Size(int.MaxValue, int.MaxValue) }; 838Assert.Equal(new Size(52, 6), item.GetPreferredSize(proposedSize)); 841Assert.Equal(new Size(52, 6), item.GetPreferredSize(proposedSize)); 864yield return new object[] { ToolStripLayoutStyle.Flow, Size.Empty, new Size(91, 6) }; 865yield return new object[] { ToolStripLayoutStyle.Flow, new Size(-1, -2), new Size(91, 6) }; 866yield return new object[] { ToolStripLayoutStyle.Flow, new Size(10, 20), new Size(91, 6) }; 867yield return new object[] { ToolStripLayoutStyle.Flow, new Size(30, 40), new Size(91, 6) }; 868yield return new object[] { ToolStripLayoutStyle.Flow, new Size(int.MaxValue, int.MaxValue), new Size(91, 6) }; 870yield return new object[] { ToolStripLayoutStyle.HorizontalStackWithOverflow, Size.Empty, new Size(91, 6) }; 871yield return new object[] { ToolStripLayoutStyle.HorizontalStackWithOverflow, new Size(-1, -2), new Size(91, 6) }; 872yield return new object[] { ToolStripLayoutStyle.HorizontalStackWithOverflow, new Size(10, 20), new Size(91, 6) }; 873yield return new object[] { ToolStripLayoutStyle.HorizontalStackWithOverflow, new Size(30, 40), new Size(91, 6) }; 874yield return new object[] { ToolStripLayoutStyle.HorizontalStackWithOverflow, new Size(int.MaxValue, int.MaxValue), new Size(91, 6) }; 876yield return new object[] { ToolStripLayoutStyle.StackWithOverflow, Size.Empty, new Size(52, 6) }; 877yield return new object[] { ToolStripLayoutStyle.StackWithOverflow, new Size(-1, -2), new Size(52, 6) }; 878yield return new object[] { ToolStripLayoutStyle.StackWithOverflow, new Size(10, 20), new Size(52, 6) }; 879yield return new object[] { ToolStripLayoutStyle.StackWithOverflow, new Size(30, 40), new Size(52, 6) }; 880yield return new object[] { ToolStripLayoutStyle.StackWithOverflow, new Size(int.MaxValue, int.MaxValue), new Size(52, 6) }; 882yield return new object[] { ToolStripLayoutStyle.Table, Size.Empty, new Size(91, 6) }; 883yield return new object[] { ToolStripLayoutStyle.Table, new Size(-1, -2), new Size(91, 6) }; 884yield return new object[] { ToolStripLayoutStyle.Table, new Size(10, 20), new Size(91, 6) }; 885yield return new object[] { ToolStripLayoutStyle.Table, new Size(30, 40), new Size(91, 6) }; 886yield return new object[] { ToolStripLayoutStyle.Table, new Size(int.MaxValue, int.MaxValue), new Size(91, 6) }; 888yield return new object[] { ToolStripLayoutStyle.VerticalStackWithOverflow, Size.Empty, new Size(52, 6) }; 889yield return new object[] { ToolStripLayoutStyle.VerticalStackWithOverflow, new Size(-1, -2), new Size(52, 6) }; 890yield return new object[] { ToolStripLayoutStyle.VerticalStackWithOverflow, new Size(10, 20), new Size(52, 6) }; 891yield return new object[] { ToolStripLayoutStyle.VerticalStackWithOverflow, new Size(30, 40), new Size(52, 6) }; 892yield return new object[] { ToolStripLayoutStyle.VerticalStackWithOverflow, new Size(int.MaxValue, int.MaxValue), new Size(52, 6) }; 1480Assert.Equal(new Size(57, bounds.Height), item.Size); 1490Assert.Equal(new Size(57, bounds.Height), item.Size);
System\Windows\Forms\ToolStripSettingsManagerTests.cs (3)
15toolStrip.Size = new Drawing.Size(10, 10); 23toolStrip.Size = new Drawing.Size(5, 5); 28Assert.Equal(new Drawing.Size(10, 10), toolStrip.Size);
System\Windows\Forms\ToolStripTests.cs (26)
48Assert.Equal(new Size(100, 25), control.ClientSize); 65Assert.Equal(new Size(100, 25), control.DefaultSize); 74Assert.Equal(new Size(90, 25), control.MaxItemSize); 79Assert.Equal(new Size(92, 25), control.MaxItemSize); 110Assert.Equal(new Size(16, 16), control.ImageScalingSize); 150Assert.Equal(new Size(100, 25), control.Size); 206Assert.Equal(new Size(100, 25), control.ClientSize); 222Assert.Equal(new Size(100, 25), control.DefaultSize); 228Assert.Equal(new Size(90, 25), control.MaxItemSize); 233Assert.Equal(new Size(92, 25), control.MaxItemSize); 264Assert.Equal(new Size(16, 16), control.ImageScalingSize); 305Assert.Equal(new Size(100, 25), control.Size); 809yield return new object[] { new Size(0, 0), 0 }; 810yield return new object[] { new Size(1, 0), 0 }; 811yield return new object[] { new Size(0, 1), 0 }; 812yield return new object[] { new Size(1, 2), 0 }; 850Assert.Throws<NotSupportedException>(() => control.AutoScrollMinSize = new Size(1, 2)); 851Assert.Equal(new Size(1, 2), control.AutoScrollMinSize); 857control.AutoScrollMinSize = new Size(1, 2); 858Assert.Equal(new Size(1, 2), control.AutoScrollMinSize); 6695Size = new Size(400, 500) 6740Size = new Size(400, 500) 7264Size defaultSize = new(16, 16); 7405toolStrip.MinimumSize.Should().Be(new Size(-1, -1)); 7423using var toolStrip = new ToolStrip() { AutoScrollMargin = new Size(10, 20) }; 7425toolStrip.AutoScrollMargin.Should().Be(new Size(10, 20));
System\Windows\Forms\ToolStripTests.Rendering.cs (1)
18Size = new Size(200, 38)
System\Windows\Forms\TreeNode.IKeyboardToolTipTests.cs (1)
373using TreeView treeView = new() { Size = new Size(50, 50) };
System\Windows\Forms\TreeViewTests.cs (7)
55Assert.Equal(new Size(121, 97), control.DefaultSize); 97Assert.Equal(new Size(121, 97), control.PreferredSize); 115Assert.Equal(new Size(121, 97), control.Size); 2616imageList.ImageSize = new Size(10, 10); 2632imageList.ImageSize = new Size(10, 10); 4593imageList.ImageSize = new Size(10, 10); 4609imageList.ImageSize = new Size(10, 10);
System\Windows\Forms\UpDownBaseTests.cs (127)
46Assert.Equal(new Size(120, Control.DefaultFont.Height + 7), control.ClientSize); 47Assert.Equal(new Size(122, control.PreferredHeight), control.PreferredSize); 53Assert.Equal(new Size(116, Control.DefaultFont.Height + 3), control.ClientSize); 54Assert.Equal(new Size(123, control.PreferredHeight), control.PreferredSize); 71Assert.Equal(new Size(120, control.PreferredHeight), control.DefaultSize); 119Assert.Equal(new Size(120, control.PreferredHeight), control.Size); 275yield return new object[] { true, new Size(0, 0) }; 276yield return new object[] { true, new Size(1, 0) }; 277yield return new object[] { true, new Size(0, 1) }; 278yield return new object[] { true, new Size(1, 2) }; 279yield return new object[] { false, new Size(0, 0) }; 280yield return new object[] { false, new Size(1, 0) }; 281yield return new object[] { false, new Size(0, 1) }; 282yield return new object[] { false, new Size(1, 2) }; 364yield return new object[] { autoScroll, new Size(-1, -2), 1 }; 365yield return new object[] { autoScroll, new Size(0, 0), 0 }; 366yield return new object[] { autoScroll, new Size(1, 0), 1 }; 367yield return new object[] { autoScroll, new Size(0, 1), 1 }; 368yield return new object[] { autoScroll, new Size(1, 2), 1 }; 719yield return new object[] { BorderStyle.Fixed3D, new Size(122, Control.DefaultFont.Height + SystemInformation.BorderSize.Height * 4 + 3) }; 720yield return new object[] { BorderStyle.FixedSingle, new Size(122, Control.DefaultFont.Height + SystemInformation.BorderSize.Height * 4 + 3) }; 721yield return new object[] { BorderStyle.None, new Size(122, Control.DefaultFont.Height + 3) }; 725yield return new object[] { BorderStyle.Fixed3D, new Size(123, Control.DefaultFont.Height + SystemInformation.BorderSize.Height * 4 + 3) }; 726yield return new object[] { BorderStyle.FixedSingle, new Size(121, Control.DefaultFont.Height + SystemInformation.BorderSize.Height * 4 + 3) }; 727yield return new object[] { BorderStyle.None, new Size(119, Control.DefaultFont.Height + 3) }; 756yield return new object[] { BorderStyle.Fixed3D, 0, 0, new Size(122, Control.DefaultFont.Height + SystemInformation.BorderSize.Height * 4 + 3) }; 757yield return new object[] { BorderStyle.FixedSingle, 0, 1, new Size(122, Control.DefaultFont.Height + SystemInformation.BorderSize.Height * 4 + 3) }; 758yield return new object[] { BorderStyle.None, 1, 1, new Size(123, Control.DefaultFont.Height + 3) }; 762yield return new object[] { BorderStyle.Fixed3D, 0, 0, new Size(123, Control.DefaultFont.Height + SystemInformation.BorderSize.Height * 4 + 3) }; 763yield return new object[] { BorderStyle.FixedSingle, 1, 1, new Size(123, Control.DefaultFont.Height + SystemInformation.BorderSize.Height * 4 + 3) }; 764yield return new object[] { BorderStyle.None, 2, 1, new Size(123, Control.DefaultFont.Height + 3) }; 1085yield return new object[] { new Size(-1, -2), 0, 1 }; 1086yield return new object[] { new Size(0, 1), 120, 0 }; 1087yield return new object[] { new Size(0, 10), 120, 0 }; 1088yield return new object[] { new Size(1, 0), 1, 1 }; 1089yield return new object[] { new Size(10, 0), 10, 1 }; 1090yield return new object[] { new Size(1, 2), 1, 1 }; 1091yield return new object[] { new Size(3, 4), 3, 1 }; 1092yield return new object[] { new Size(ushort.MaxValue - 1, ushort.MaxValue - 1), 120, 0 }; 1093yield return new object[] { new Size(ushort.MaxValue, ushort.MaxValue), 120, 0 }; 1094yield return new object[] { new Size(ushort.MaxValue + 1, ushort.MaxValue + 1), 120, 0 }; 1095yield return new object[] { new Size(int.MaxValue, int.MaxValue), 120, 0 }; 1113Assert.Equal(new Size(value.Width, 0), control.MaximumSize); 1114Assert.Equal(new Size(expectedWidth, control.PreferredHeight), control.Size); 1120Assert.Equal(new Size(value.Width, 0), control.MaximumSize); 1121Assert.Equal(new Size(expectedWidth, control.PreferredHeight), control.Size); 1129yield return new object[] { new Size(0, 1), 120, 0 }; 1130yield return new object[] { new Size(0, 10), 120, 0 }; 1131yield return new object[] { new Size(1, 0), 120, 0 }; 1132yield return new object[] { new Size(10, 0), 120, 0 }; 1133yield return new object[] { new Size(-1, -2), 120, 0 }; 1134yield return new object[] { new Size(1, 2), 120, 0 }; 1135yield return new object[] { new Size(3, 4), 120, 0 }; 1136yield return new object[] { new Size(ushort.MaxValue - 1, ushort.MaxValue - 1), ushort.MaxValue - 1, 1 }; 1137yield return new object[] { new Size(ushort.MaxValue, ushort.MaxValue), ushort.MaxValue, 1 }; 1138yield return new object[] { new Size(ushort.MaxValue + 1, ushort.MaxValue + 1), ushort.MaxValue + 1, 1 }; 1139yield return new object[] { new Size(int.MaxValue, int.MaxValue), int.MaxValue, 1 }; 1157Assert.Equal(new Size(value.Width, 0), control.MinimumSize); 1158Assert.Equal(new Size(expectedWidth, control.PreferredHeight), control.Size); 1164Assert.Equal(new Size(value.Width, 0), control.MinimumSize); 1165Assert.Equal(new Size(expectedWidth, control.PreferredHeight), control.Size); 1580yield return new object[] { new Size(-1, -2) }; 1581yield return new object[] { new Size(10, 20) }; 1582yield return new object[] { new Size(30, 40) }; 1583yield return new object[] { new Size(int.MaxValue, int.MaxValue) }; 1594Assert.Equal(new Size(expectedWidth, control.PreferredHeight), preferredSize); 1598Assert.Equal(new Size(expectedWidth, control.PreferredHeight), preferredSize); 1614Assert.Equal(new Size(expectedWidth, control.PreferredHeight), control.GetPreferredSize(proposedSize)); 1618Assert.Equal(new Size(expectedWidth, control.PreferredHeight), control.GetPreferredSize(proposedSize)); 1626yield return new object[] { Size.Empty, Size.Empty, new Size(30, 40), expectedWidth }; 1627yield return new object[] { new Size(10, 20), Size.Empty, new Size(30, 40), expectedWidth }; 1628yield return new object[] { new Size(30, 40), Size.Empty, new Size(30, 40), expectedWidth }; 1629yield return new object[] { new Size(31, 40), Size.Empty, new Size(30, 40), expectedWidth }; 1630yield return new object[] { new Size(30, 41), Size.Empty, new Size(30, 40), expectedWidth }; 1631yield return new object[] { new Size(40, 50), Size.Empty, new Size(30, 40), expectedWidth }; 1633yield return new object[] { Size.Empty, new Size(20, 10), new Size(30, 40), 20 }; 1634yield return new object[] { Size.Empty, new Size(30, 40), new Size(30, 40), 30 }; 1635yield return new object[] { Size.Empty, new Size(31, 40), new Size(30, 40), 31 }; 1636yield return new object[] { Size.Empty, new Size(30, 41), new Size(30, 40), 30 }; 1637yield return new object[] { Size.Empty, new Size(40, 50), new Size(30, 40), 40 }; 1638yield return new object[] { new Size(10, 20), new Size(40, 50), new Size(30, 40), 40 }; 1639yield return new object[] { new Size(10, 20), new Size(40, 50), new Size(int.MaxValue, int.MaxValue), 40 }; 1640yield return new object[] { new Size(10, 20), new Size(20, 30), new Size(30, 40), 20 }; 1641yield return new object[] { new Size(10, 20), new Size(20, 30), new Size(30, 40), 20 }; 1642yield return new object[] { new Size(30, 40), new Size(20, 30), new Size(30, 40), 30 }; 1643yield return new object[] { new Size(30, 40), new Size(40, 50), new Size(30, 40), 40 }; 1644yield return new object[] { new Size(40, 50), new Size(20, 30), new Size(30, 40), 40 }; 1645yield return new object[] { new Size(40, 50), new Size(40, 50), new Size(30, 40), 40 }; 1657Assert.Equal(new Size(expectedWidth, control.PreferredHeight), control.GetPreferredSize(proposedSize)); 1661Assert.Equal(new Size(expectedWidth, control.PreferredHeight), control.GetPreferredSize(proposedSize)); 2231yield return new object[] { new Size(100, 200), enabled, borderStyle, backColor }; 2232yield return new object[] { new Size(10, 10), enabled, borderStyle, backColor }; 2233yield return new object[] { new Size(9, 10), enabled, borderStyle, backColor }; 2234yield return new object[] { new Size(10, 9), enabled, borderStyle, backColor }; 2235yield return new object[] { new Size(9, 9), enabled, borderStyle, backColor }; 2755Assert.Equal(new Size(width, Control.DefaultFont.Height + 7), control.ClientSize); 2761Assert.Equal(new Size(width - 4, Control.DefaultFont.Height + 3), control.ClientSize); 2766Assert.Equal(new Size(width, preferredHeight), control.Size); 2787Assert.Equal(new Size(width, Control.DefaultFont.Height + 7), control.ClientSize); 2793Assert.Equal(new Size(width - 4, Control.DefaultFont.Height + 3), control.ClientSize); 2798Assert.Equal(new Size(width, preferredHeight), control.Size);
System\Windows\Forms\UserControlTests.cs (3)
49Assert.Equal(new Size(150, 150), control.ClientSize); 64Assert.Equal(new Size(150, 150), control.DefaultSize); 110Assert.Equal(new Size(150, 150), control.Size);
System\Windows\Forms\WebBrowserTests.cs (18)
38Assert.Equal(new Size(250, 250), control.ClientSize); 52Assert.Equal(new Size(250, 250), control.DefaultSize); 79Assert.Equal(new Size(250, 250), control.PreferredSize); 86Assert.Equal(new Size(250, 250), control.Size); 4488yield return new object[] { new Size(10, 20), (IntPtr)(-1) }; 4489yield return new object[] { new Size(10, 20), PARAM.FromLowHigh(0, 0) }; 4490yield return new object[] { new Size(10, 20), PARAM.FromLowHigh(1, 2) }; 4491yield return new object[] { new Size(10, 20), PARAM.FromLowHigh(-1, -2) }; 4526yield return new object[] { new Size(10, 20), (IntPtr)(-1), (IntPtr)250, true }; 4527yield return new object[] { new Size(10, 20), PARAM.FromLowHigh(0, 0), IntPtr.Zero, true }; 4528yield return new object[] { new Size(10, 20), PARAM.FromLowHigh(1, 2), IntPtr.Zero, true }; 4529yield return new object[] { new Size(10, 20), PARAM.FromLowHigh(p.X, p.Y), (IntPtr)250, true }; 4530yield return new object[] { new Size(10, 20), PARAM.FromLowHigh(-1, -2), (IntPtr)250, true }; 4600yield return new object[] { new Size(10, 20), (IntPtr)(-1), (IntPtr)250 }; 4601yield return new object[] { new Size(10, 20), PARAM.FromLowHigh(0, 0), IntPtr.Zero }; 4602yield return new object[] { new Size(10, 20), PARAM.FromLowHigh(1, 2), IntPtr.Zero }; 4603yield return new object[] { new Size(10, 20), PARAM.FromLowHigh(p.X, p.Y), (IntPtr)250 }; 4604yield return new object[] { new Size(10, 20), PARAM.FromLowHigh(-1, -2), (IntPtr)250 };
Text\FontMetrics.cs (70)
92{ "Arial", 9.0f, new Size(-1, -1), (uint)DRAW_TEXT_FORMAT.DT_BOTTOM, new Size(173, 15) }, 93{ "Arial", 12.0f, new Size(-1, -1), (uint)DRAW_TEXT_FORMAT.DT_BOTTOM, new Size(215, 18) }, 94{ "Microsoft Sans Serif", 16.0f, new Size(-1, -1), (uint)DRAW_TEXT_FORMAT.DT_BOTTOM, new Size(299, 26) }, 95{ "Times New Roman", 11.0f, new Size(-1, -1), (uint)DRAW_TEXT_FORMAT.DT_BOTTOM, new Size(179, 17) }, 96{ "MS Gothic", 10.0f, new Size(-1, -1), (uint)DRAW_TEXT_FORMAT.DT_BOTTOM, new Size(189, 14) }, 97{ "Arial", 9.0f, new Size(0, 0), (uint)DRAW_TEXT_FORMAT.DT_BOTTOM, new Size(173, 15) }, 98{ "Arial", 12.0f, new Size(0, 0), (uint)DRAW_TEXT_FORMAT.DT_BOTTOM, new Size(215, 18) }, 99{ "Microsoft Sans Serif", 16.0f, new Size(0, 0), (uint)DRAW_TEXT_FORMAT.DT_BOTTOM, new Size(299, 26) }, 100{ "Times New Roman", 11.0f, new Size(0, 0), (uint)DRAW_TEXT_FORMAT.DT_BOTTOM, new Size(179, 17) }, 101{ "MS Gothic", 10.0f, new Size(0, 0), (uint)DRAW_TEXT_FORMAT.DT_BOTTOM, new Size(189, 14) }, 102{ "Arial", 9.0f, new Size(1, 1), (uint)DRAW_TEXT_FORMAT.DT_BOTTOM, new Size(173, 15) }, 103{ "Arial", 12.0f, new Size(1, 1), (uint)DRAW_TEXT_FORMAT.DT_BOTTOM, new Size(215, 18) }, 104{ "Microsoft Sans Serif", 16.0f, new Size(1, 1), (uint)DRAW_TEXT_FORMAT.DT_BOTTOM, new Size(299, 26) }, 105{ "Times New Roman", 11.0f, new Size(1, 1), (uint)DRAW_TEXT_FORMAT.DT_BOTTOM, new Size(179, 17) }, 106{ "MS Gothic", 10.0f, new Size(1, 1), (uint)DRAW_TEXT_FORMAT.DT_BOTTOM, new Size(189, 14) }, 107{ "Arial", 9.0f, new Size(300, 300), (uint)DRAW_TEXT_FORMAT.DT_BOTTOM, new Size(173, 15) }, 108{ "Arial", 12.0f, new Size(300, 300), (uint)DRAW_TEXT_FORMAT.DT_BOTTOM, new Size(215, 18) }, 109{ "Microsoft Sans Serif", 16.0f, new Size(300, 300), (uint)DRAW_TEXT_FORMAT.DT_BOTTOM, new Size(299, 26) }, 110{ "Times New Roman", 11.0f, new Size(300, 300), (uint)DRAW_TEXT_FORMAT.DT_BOTTOM, new Size(179, 17) }, 111{ "MS Gothic", 10.0f, new Size(300, 300), (uint)DRAW_TEXT_FORMAT.DT_BOTTOM, new Size(189, 14) }, 112{ "Arial", 9.0f, new Size(int.MaxValue, int.MaxValue), (uint)DRAW_TEXT_FORMAT.DT_BOTTOM, new Size(173, 15) }, 113{ "Arial", 12.0f, new Size(int.MaxValue, int.MaxValue), (uint)DRAW_TEXT_FORMAT.DT_BOTTOM, new Size(215, 18) }, 114{ "Microsoft Sans Serif", 16.0f, new Size(int.MaxValue, int.MaxValue), (uint)DRAW_TEXT_FORMAT.DT_BOTTOM, new Size(299, 26) }, 115{ "Times New Roman", 11.0f, new Size(int.MaxValue, int.MaxValue), (uint)DRAW_TEXT_FORMAT.DT_BOTTOM, new Size(179, 17) }, 116{ "MS Gothic", 10.0f, new Size(int.MaxValue, int.MaxValue), (uint)DRAW_TEXT_FORMAT.DT_BOTTOM, new Size(189, 14) }, 117{ "Arial", 9.0f, new Size(1, 1), (uint)DRAW_TEXT_FORMAT.DT_SINGLELINE, new Size(173, 15) }, 118{ "Arial", 12.0f, new Size(1, 1), (uint)DRAW_TEXT_FORMAT.DT_SINGLELINE, new Size(215, 18) }, 119{ "Microsoft Sans Serif", 16.0f, new Size(1, 1), (uint)DRAW_TEXT_FORMAT.DT_SINGLELINE, new Size(299, 26) }, 120{ "Times New Roman", 11.0f, new Size(1, 1), (uint)DRAW_TEXT_FORMAT.DT_SINGLELINE, new Size(179, 17) }, 121{ "MS Gothic", 10.0f, new Size(1, 1), (uint)DRAW_TEXT_FORMAT.DT_SINGLELINE, new Size(189, 14) }, 122{ "Arial", 9.0f, new Size(int.MaxValue, int.MaxValue), (uint)DRAW_TEXT_FORMAT.DT_SINGLELINE, new Size(173, 15) }, 123{ "Arial", 12.0f, new Size(int.MaxValue, int.MaxValue), (uint)DRAW_TEXT_FORMAT.DT_SINGLELINE, new Size(215, 18) }, 124{ "Microsoft Sans Serif", 16.0f, new Size(int.MaxValue, int.MaxValue), (uint)DRAW_TEXT_FORMAT.DT_SINGLELINE, new Size(299, 26) }, 125{ "Times New Roman", 11.0f, new Size(int.MaxValue, int.MaxValue), (uint)DRAW_TEXT_FORMAT.DT_SINGLELINE, new Size(179, 17) }, 126{ "MS Gothic", 10.0f, new Size(int.MaxValue, int.MaxValue), (uint)DRAW_TEXT_FORMAT.DT_SINGLELINE, new Size(189, 14) },
TextBoxBaseTests.cs (79)
4996yield return new object[] { multiline, wordWrap, BorderStyle.Fixed3D, Size.Empty, new Size(4, s_preferredHeight) }; 4997yield return new object[] { multiline, wordWrap, BorderStyle.Fixed3D, new Size(-1, -2), new Size(4, s_preferredHeight) }; 4998yield return new object[] { multiline, wordWrap, BorderStyle.Fixed3D, new Size(10, 20), new Size(4, s_preferredHeight) }; 4999yield return new object[] { multiline, wordWrap, BorderStyle.Fixed3D, new Size(30, 40), new Size(4, s_preferredHeight) }; 5000yield return new object[] { multiline, wordWrap, BorderStyle.Fixed3D, new Size(int.MaxValue, int.MaxValue), new Size(4, s_preferredHeight) }; 5002yield return new object[] { multiline, wordWrap, BorderStyle.FixedSingle, Size.Empty, new Size(4, s_preferredHeight) }; 5003yield return new object[] { multiline, wordWrap, BorderStyle.FixedSingle, new Size(-1, -2), new Size(4, s_preferredHeight) }; 5004yield return new object[] { multiline, wordWrap, BorderStyle.FixedSingle, new Size(10, 20), new Size(4, s_preferredHeight) }; 5005yield return new object[] { multiline, wordWrap, BorderStyle.FixedSingle, new Size(30, 40), new Size(4, s_preferredHeight) }; 5006yield return new object[] { multiline, wordWrap, BorderStyle.FixedSingle, new Size(int.MaxValue, int.MaxValue), new Size(4, s_preferredHeight) }; 5008yield return new object[] { multiline, wordWrap, BorderStyle.None, Size.Empty, new Size(0, Control.DefaultFont.Height) }; 5009yield return new object[] { multiline, wordWrap, BorderStyle.None, new Size(-1, -2), new Size(0, Control.DefaultFont.Height) }; 5010yield return new object[] { multiline, wordWrap, BorderStyle.None, new Size(10, 20), new Size(0, Control.DefaultFont.Height) }; 5011yield return new object[] { multiline, wordWrap, BorderStyle.None, new Size(30, 40), new Size(0, Control.DefaultFont.Height) }; 5012yield return new object[] { multiline, wordWrap, BorderStyle.None, new Size(int.MaxValue, int.MaxValue), new Size(0, Control.DefaultFont.Height) }; 5058yield return new object[] { BorderStyle.Fixed3D, new Size(-1, -2), 4, s_preferredHeight }; 5059yield return new object[] { BorderStyle.Fixed3D, new Size(10, 20), 4, s_preferredHeight }; 5060yield return new object[] { BorderStyle.Fixed3D, new Size(30, 40), 4, s_preferredHeight }; 5061yield return new object[] { BorderStyle.Fixed3D, new Size(int.MaxValue, int.MaxValue), 4, s_preferredHeight }; 5064yield return new object[] { BorderStyle.FixedSingle, new Size(-1, -2), 4, s_preferredHeight }; 5065yield return new object[] { BorderStyle.FixedSingle, new Size(10, 20), 4, s_preferredHeight }; 5066yield return new object[] { BorderStyle.FixedSingle, new Size(30, 40), 4, s_preferredHeight }; 5067yield return new object[] { BorderStyle.FixedSingle, new Size(int.MaxValue, int.MaxValue), 4, s_preferredHeight }; 5070yield return new object[] { BorderStyle.None, new Size(-1, -2), 0, Control.DefaultFont.Height }; 5071yield return new object[] { BorderStyle.None, new Size(10, 20), 0, Control.DefaultFont.Height }; 5072yield return new object[] { BorderStyle.None, new Size(30, 40), 0, Control.DefaultFont.Height }; 5073yield return new object[] { BorderStyle.None, new Size(int.MaxValue, int.MaxValue), 0, Control.DefaultFont.Height }; 5087Assert.Equal(new Size(width + expectedAdditionalWidth, expectedHeight), control.GetPreferredSize(proposedSize)); 5091Assert.Equal(new Size(width + expectedAdditionalWidth, expectedHeight), control.GetPreferredSize(proposedSize)); 5131Assert.Equal(new Size(width + expectedAdditionalWidth, expectedHeight), control.GetPreferredSize(proposedSize)); 5136Assert.Equal(new Size(width + expectedAdditionalWidth, expectedHeight), control.GetPreferredSize(proposedSize)); 6536Assert.Equal(new Size(width - 4, s_preferredHeight - 4), control.ClientSize); 6539Assert.Equal(new Size(width, s_preferredHeight), control.Size); 6557Assert.Equal(new Size(width - 4, s_preferredHeight - 4), control.ClientSize); 6560Assert.Equal(new Size(width, s_preferredHeight), control.Size); 6670Assert.Equal(new Size(width - 4, height - 4), control.ClientSize); 6673Assert.Equal(new Size(width, height), control.Size); 6691Assert.Equal(new Size(width - 4, height - 4), control.ClientSize); 6694Assert.Equal(new Size(width, height), control.Size); 6786Assert.Equal(new Size(width - 4, height - 4), control.ClientSize); 6789Assert.Equal(new Size(width, height), control.Size); 6807Assert.Equal(new Size(width - 4, height - 4), control.ClientSize); 6810Assert.Equal(new Size(width, height), control.Size); 6935yield return new object[] { new Size(10, 20), shortcutsEnabled, (IntPtr)(-1), expectedResult }; 6936yield return new object[] { new Size(10, 20), shortcutsEnabled, PARAM.FromLowHigh(0, 0), expectedResult }; 6937yield return new object[] { new Size(10, 20), shortcutsEnabled, PARAM.FromLowHigh(1, 2), expectedResult }; 6938yield return new object[] { new Size(10, 20), shortcutsEnabled, PARAM.FromLowHigh(-1, -2), expectedResult }; 6979yield return new object[] { new Size(10, 20), shortcutsEnabled, (IntPtr)(-1), (IntPtr)250, true, true }; 6980yield return new object[] { new Size(10, 20), shortcutsEnabled, PARAM.FromLowHigh(0, 0), expectedResult, false, true }; 6981yield return new object[] { new Size(10, 20), shortcutsEnabled, PARAM.FromLowHigh(1, 2), expectedResult, false, true }; 6982yield return new object[] { new Size(10, 20), shortcutsEnabled, PARAM.FromLowHigh(p.X, p.Y), (IntPtr)250, true, true }; 6983yield return new object[] { new Size(10, 20), shortcutsEnabled, PARAM.FromLowHigh(-1, -2), expectedResult, false, true }; 7060yield return new object[] { new Size(10, 20), shortcutsEnabled, (IntPtr)(-1), (IntPtr)250, true }; 7061yield return new object[] { new Size(10, 20), shortcutsEnabled, PARAM.FromLowHigh(0, 0), expectedResult, false }; 7062yield return new object[] { new Size(10, 20), shortcutsEnabled, PARAM.FromLowHigh(1, 2), expectedResult, false }; 7063yield return new object[] { new Size(10, 20), shortcutsEnabled, PARAM.FromLowHigh(p.X, p.Y), (IntPtr)250, true }; 7064yield return new object[] { new Size(10, 20), shortcutsEnabled, PARAM.FromLowHigh(-1, -2), expectedResult, false }; 7794yield return new object[] { new Size(50, 20), false, 0, 0 }; 7795yield return new object[] { new Size(50, 20), false, 50, 0 }; 7796yield return new object[] { new Size(100, 50), true, 50, 3 }; 7797yield return new object[] { new Size(50, 50), true, 50, 8 }; 7812yield return new object[] { new Size(50, 20), false, 0, new Point(1, 0) }; 7813yield return new object[] { new Size(50, 20), false, 15, new Point(79, 0) }; 7814yield return new object[] { new Size(50, 50), true, 12, new Point(14, 31) }; 7815yield return new object[] { new Size(100, 50), true, 22, new Point(37, 16) }; 7816yield return new object[] { new Size(50, 50), true, 100, Point.Empty }; 7817yield return new object[] { new Size(50, 50), true, -1, Point.Empty };
TextBoxTests.cs (3)
46Assert.Equal(new Size(96, control.PreferredHeight - 4), control.ClientSize); 61Assert.Equal(new Size(100, control.PreferredHeight), control.DefaultSize); 109Assert.Equal(new Size(100, control.PreferredHeight), control.Size);
TextBoxTests.Rendering.cs (1)
19Size = new Size(80, 23),
ToolStripContainerTests.cs (1)
45Size value = new(10, 10);
TrackBarTests.cs (40)
39Assert.Equal(new Size(104, s_dimension), control.ClientSize); 54Assert.Equal(new Size(104, s_dimension), control.DefaultSize); 86Assert.Equal(new Size(104, s_dimension), control.PreferredSize); 96Assert.Equal(new Size(104, s_dimension), control.Size); 228Assert.Equal(new Size(104, s_dimension), control.Size); 237Assert.Equal(new Size(104, s_dimension), control.Size); 246Assert.Equal(new Size(104, s_dimension), control.Size); 266Assert.Equal(new Size(104, s_dimension), control.Size); 275Assert.Equal(new Size(104, s_dimension), control.Size); 284Assert.Equal(new Size(104, s_dimension), control.Size); 308Assert.Equal(new Size(104, s_dimension), control.Size); 320Assert.Equal(new Size(104, s_dimension), control.Size); 332Assert.Equal(new Size(104, s_dimension), control.Size); 362Assert.Equal(new Size(s_dimension, s_dimension), control.Size); 374Assert.Equal(new Size(s_dimension, s_dimension), control.Size); 386Assert.Equal(new Size(s_dimension, s_dimension), control.Size); 849yield return new object[] { true, Orientation.Horizontal, new Size(104, s_dimension) }; 850yield return new object[] { true, Orientation.Vertical, new Size(s_dimension, s_dimension) }; 851yield return new object[] { false, Orientation.Horizontal, new Size(104, s_dimension) }; 852yield return new object[] { false, Orientation.Vertical, new Size(s_dimension, s_dimension) }; 1299yield return new object[] { true, Orientation.Horizontal, new Size(104, s_dimension), false }; 1300yield return new object[] { true, Orientation.Vertical, new Size(104, s_dimension), true }; 1301yield return new object[] { false, Orientation.Horizontal, new Size(104, s_dimension), false }; 1302yield return new object[] { false, Orientation.Vertical, new Size(104, s_dimension), false }; 1331yield return new object[] { true, Orientation.Horizontal, new Size(s_dimension, s_dimension), false, true }; 1332yield return new object[] { true, Orientation.Vertical, new Size(104, s_dimension), true, false }; 1333yield return new object[] { false, Orientation.Horizontal, new Size(s_dimension, s_dimension), false, false }; 1334yield return new object[] { false, Orientation.Vertical, new Size(104, s_dimension), false, false }; 1365yield return new object[] { true, Orientation.Horizontal, new Size(104, s_dimension), false, false, 0 }; 1366yield return new object[] { true, Orientation.Vertical, new Size(s_dimension, 104), true, false, 1 }; 1367yield return new object[] { false, Orientation.Horizontal, new Size(104, s_dimension), false, false, 0 }; 1368yield return new object[] { false, Orientation.Vertical, new Size(s_dimension, 104), false, false, 1 }; 1411yield return new object[] { true, Orientation.Horizontal, new Size(s_dimension, s_dimension), false, true, 1 }; 1412yield return new object[] { true, Orientation.Vertical, new Size(s_dimension, s_dimension), true, false, 0 }; 1413yield return new object[] { false, Orientation.Horizontal, new Size(s_dimension, s_dimension), false, false, 1 }; 1414yield return new object[] { false, Orientation.Vertical, new Size(s_dimension, s_dimension), false, false, 0 }; 2996Assert.Equal(new Size(expectedWidth, expectedHeight), control.ClientSize); 2999Assert.Equal(new Size(expectedWidth, expectedHeight), control.Size); 3017Assert.Equal(new Size(expectedWidth, expectedHeight), control.ClientSize); 3020Assert.Equal(new Size(expectedWidth, expectedHeight), control.Size);
WebBrowserBaseTests.cs (8)
75Assert.Equal(new Size(width, height), control.ClientSize); 78Assert.Equal(new Size(width, height), control.Size); 94Assert.Equal(new Size(width, height), control.ClientSize); 97Assert.Equal(new Size(width, height), control.Size); 191Assert.Equal(new Size(expectedWidth, expectedHeight), control.ClientSize); 194Assert.Equal(new Size(expectedWidth, expectedHeight), control.Size); 213Assert.Equal(new Size(expectedWidth, expectedHeight), control.ClientSize); 216Assert.Equal(new Size(expectedWidth, expectedHeight), control.Size);
System.Windows.Forms.UI.IntegrationTests (60)
AnchorLayoutTests.cs (3)
265form.Size = new Size(400, 600); 275Size = new Size(200, 300) 282Size = new Size(20, 30),
ApplicationTests.cs (1)
48ClientSize = new Size(640, 480)
ButtonTests.cs (1)
412Size = new(500, 300),
DataGridViewTests.cs (1)
87Size = new(500, 300),
DesignBehaviorsTests.cs (3)
41form.Size = new(600, 550); 73form.Size = new Size(400, 400); 77((Control)e.Component!).Size = new Size(50, 50);
Dpi\FormDpiTests.cs (4)
67var minSize = new Drawing.Size(100, 100); 68var maxSize = new Drawing.Size(500, 500); 101var minSize = new Drawing.Size(100, 100); 102var maxSize = new Drawing.Size(500, 500);
Dpi\SplitContainerTests.cs (1)
53Size = new Size(812, 619),
Dpi\ToolStripItemTests.Dpi.cs (1)
36form.ClientSize = new Size(clientWidth, 450);
DragDropTests.cs (12)
69form.ClientSize = new Size(100, 100); 285form.ClientSize = new Size(100, 100); 504form.ClientSize = new Size(100, 100); 667ListDragSource.Size = new Size(120, 225); 677ListDragTarget.Size = new Size(120, 225); 685_useCustomCursorsCheck.Size = new Size(137, 24); 690_dropLocationLabel.Size = new Size(137, 24); 694ClientSize = new Size(292, 270); 971PictureBoxDragSource.Size = new Size(125, 119); 980RichTextBoxDropTarget.Size = new Size(125, 119); 988ClientSize = new Size(285, 175); 1012ImageScalingSize = new Size(25, 25)
FormTests.cs (2)
35form.Size = new Size(300, 310); 94form.Size = new Size(300, 310);
ImageListTests.cs (1)
104Size = new Size(439, 59),
Infra\ScreenRecordService.cs (3)
172WriteFctl(fileStream, buffer, crc, sequenceNumber: 0, size: new Size(firstFrame.image.Width, firstFrame.image.Height), offset: firstFrame.offset, delay: TimeSpan.Zero, ApngDisposeOp.None, ApngBlendOp.Source); 323var offset = new Size(firstChangedColumn, firstChangedLine); 369WriteFctl(stream, buffer, crc, sequenceNumber++, size: new Size(frame.Width, frame.Height), offset: offset, delay, ApngDisposeOp.None, ApngBlendOp.Source);
Input\MouseSimulator.cs (1)
136var virtualPoint = ControlTestBase.ToVirtualPoint(point + new Size(x, y));
ListViewTests.cs (19)
124InitializeTileList(listView, columnCount, subItemsCount, tileSize: new Size(width, height)); 148InitializeTileList(listView, columnCount, subItemsCount, tileSize: new Size(width, height)); 165InitializeTileList(listView, columnCount, subItemsCount, tileSize: new Size(100, 100)); 190InitializeTileList(listView, columnCount, subItemsCount, tileSize: new Size(width, height)); 207InitializeTileList(listView, columnCount, subItemsCount, tileSize: new Size(150, 150)); 228InitializeTileList(listView, columnCount, subItemsCount, tileSize: new Size(width, height)); 247InitializeTileList(listView, columnCount, subItemsCount, tileSize: new Size(width, height)); 264InitializeTileList(listView, columnCount: 4, subItemsCount: 4, tileSize: new Size(100, 100)); 285InitializeTileList(listView, columnCount: 3, subItemsCount: 2, tileSize: new Size(100, 100)); 311InitializeTileList(listView, columnCount: 5, subItemsCount: 5, tileSize: new Size(50, 40)); 329InitializeTileList(listView, columnCount: 5, subItemsCount: 5, tileSize: new Size(50, 40)); 346InitializeTileList(listView, columnCount: 4, subItemsCount: 3, tileSize: new Size(150, 150)); 366InitializeTileList(listView, columnCount: 10, subItemsCount: 10, tileSize: new Size(100, 100)); 388InitializeTileList(listView, columnCount: 4, subItemsCount: 3, tileSize: new Size(150, 150)); 407InitializeTileList(listView, columnCount: 2, subItemsCount: 5, tileSize: new Size(150, 150)); 427InitializeTileList(listView, columnCount: 1, subItemsCount: 2, tileSize: new Size(150, 150)); 444InitializeTileList(listView, columnCount: 10, subItemsCount: 10, tileSize: new Size(100, 100)); 470InitializeTileList(listView, columnCount: 4, subItemsCount: 3, tileSize: new Size(150, 150)); 582Size = new Size(500, 400)
MDITests.cs (1)
70ClientSize = new Size(640, 480),
MonthCalendarTests.cs (2)
219Size = new(500, 300), 241Size = new(500, 300),
PropertyGridViewTests.cs (2)
23propertyGrid.Size = new Size(223, 244); 24form.ClientSize = new Size(508, 367);
RichTextBoxTests.cs (2)
242Size = new Size(439, 103), 252Size = new(300, 300),
TrimTest (5)
Form1.Designer.cs (5)
58splitContainer1.Size = new Size(800, 450); 69textBox1.Size = new Size(457, 450); 83comboBox1.Size = new Size(271, 23); 90button1.Size = new Size(187, 46); 100ClientSize = new Size(800, 450);
TrimTestBinaryDeserialization (2)
Form1.Designer.cs (2)
51listView1.Size = new Size(269, 139); 60ClientSize = new Size(800, 450);
WindowsFormsIntegration (6)
System\Windows\Integration\Convert.cs (2)
260return new SD.Size(Convert.ToBoundedInt(size.Width), 268return new SD.Size(Convert.ToBoundedInt(size.Width),
System\Windows\Integration\ElementHost.cs (2)
131return new SD.Size(200, 100); 319MaximumSize = HostUtils.ConvertUnboundedToZero(new SD.Size(maxWidth, maxHeight));
System\Windows\Integration\HostUtils.cs (2)
72return new SD.Size( 79return new SD.Size(
WinFormsControlsTest (388)
AnchorLayoutTests.Designer.cs (10)
49this.button1.Size = new System.Drawing.Size(112, 34); 59this.button2.Size = new System.Drawing.Size(112, 34); 69this.button3.Size = new System.Drawing.Size(112, 34); 79this.button4.Size = new System.Drawing.Size(112, 34); 89this.button5.Size = new System.Drawing.Size(112, 34); 101this.button6.Size = new System.Drawing.Size(112, 34); 111this.button7.Size = new System.Drawing.Size(112, 34); 121this.button8.Size = new System.Drawing.Size(112, 34); 131this.button9.Size = new System.Drawing.Size(112, 34); 140this.ClientSize = new System.Drawing.Size(800, 450);
Buttons.Designer.cs (1)
46this.ClientSize = new System.Drawing.Size(419, 271);
Calendar.Designer.cs (17)
75this.minDateDateTimePicker.Size = new System.Drawing.Size(251, 27); 83this.setMinDateButton.Size = new System.Drawing.Size(123, 29); 95this.label1.Size = new System.Drawing.Size(94, 20); 105this.label2.Size = new System.Drawing.Size(97, 20); 114this.setMaxDateButton.Size = new System.Drawing.Size(123, 29); 125this.maxDateDateTimePicker.Size = new System.Drawing.Size(250, 27); 134this.label3.Size = new System.Drawing.Size(142, 20); 153this.daysOfWeekComboBox.Size = new System.Drawing.Size(151, 28); 162this.label4.Size = new System.Drawing.Size(334, 20); 171this.resetMinDateButton.Size = new System.Drawing.Size(123, 29); 182this.resetMaxDateButton.Size = new System.Drawing.Size(123, 29); 194this.showWeekNumbersCheckBox.Size = new System.Drawing.Size(161, 24); 206this.showTodayCheckBox.Size = new System.Drawing.Size(105, 24); 218this.label5.Size = new System.Drawing.Size(137, 20); 226this.currentDPILabel1.Size = new System.Drawing.Size(227, 23); 234this.ClientSize = new System.Drawing.Size(509, 528); 251this.MinimumSize = new System.Drawing.Size(527, 575);
ChartControl.Designer.cs (5)
170this.chart1.Size = new System.Drawing.Size(650, 400); 244this.chart2.Size = new System.Drawing.Size(654, 400); 306this.chart3.Size = new System.Drawing.Size(650, 438); 400this.chart4.Size = new System.Drawing.Size(654, 438); 415this.ClientSize = new System.Drawing.Size(1535, 1017);
CollectionEditors.Designer.cs (8)
48this.comboBox1.Size = new System.Drawing.Size(121, 21); 56this.maskedTextBox1.Size = new System.Drawing.Size(121, 20); 64this.textBox1.Size = new System.Drawing.Size(121, 20); 73this.listView1.Size = new System.Drawing.Size(121, 97); 85this.propertyGrid1.Size = new System.Drawing.Size(357, 254); 93this.label1.Size = new System.Drawing.Size(35, 13); 101this.domainUpDown1.Size = new System.Drawing.Size(120, 20); 108this.ClientSize = new System.Drawing.Size(501, 303);
ComboBoxes.Designer.cs (17)
61this.comboBox1.Size = new System.Drawing.Size(121, 21); 81this.comboBox2.Size = new System.Drawing.Size(121, 21); 100this.comboBox3.Size = new System.Drawing.Size(121, 21); 115this.comboBox4.Size = new System.Drawing.Size(121, 21); 126this.comboBox5.Size = new System.Drawing.Size(121, 21); 139this.comboBox6.Size = new System.Drawing.Size(121, 21); 151this.comboBox7.Size = new System.Drawing.Size(121, 21); 164this.comboBox8.Size = new System.Drawing.Size(121, 21); 177this.comboBox9.Size = new System.Drawing.Size(121, 150); 190this.comboBox10.Size = new System.Drawing.Size(121, 150); 204this.comboBox11.Size = new System.Drawing.Size(121, 150); 224this.comboBox12.Size = new System.Drawing.Size(121, 150); 233this.dataBoundComboBox.Size = new System.Drawing.Size(121, 150); 242this.currentDPILabel1.Size = new System.Drawing.Size(90, 13); 251this.label1.Size = new System.Drawing.Size(35, 13); 260this.dataBoundLabel.Size = new System.Drawing.Size(65, 13); 268this.ClientSize = new System.Drawing.Size(975, 198);
ComboBoxesWithScrollBars.cs (1)
54changeCBHeight_UpDown2.ValueChanged += (s, e) => comboBox2.Size = new Size(comboBox2.Size.Width, (int)changeCBHeight_UpDown2.Value);
ComboBoxesWithScrollBars.Designer.cs (23)
77this.comboBox1.Size = new System.Drawing.Size(116, 23); 89this.comboBox2.Size = new System.Drawing.Size(116, 155); 101this.comboBox3.Size = new System.Drawing.Size(116, 23); 117this.changeHeightGroupBox1.Size = new System.Drawing.Size(502, 100); 128this.label1.Size = new System.Drawing.Size(100, 30); 142this.changeDDH_UpDown1.Size = new System.Drawing.Size(117, 23); 153this.label2.Size = new System.Drawing.Size(106, 30); 167this.changeCBHeight_UpDown2.Size = new System.Drawing.Size(117, 23); 176this.label3.Size = new System.Drawing.Size(100, 30); 190this.changeDDH_UpDown3.Size = new System.Drawing.Size(117, 23); 204this.changeMaxDropDownItemsGroupBox2.Size = new System.Drawing.Size(502, 63); 219this.maxDropDownItemsUpDown1.Size = new System.Drawing.Size(117, 23); 232this.maxDropDownItemsUpDown2.Size = new System.Drawing.Size(117, 23); 246this.maxDropDownItemsUpDown3.Size = new System.Drawing.Size(117, 23); 258this.changeIntegralHeightGroupBox3.Size = new System.Drawing.Size(502, 63); 269this.integralHeightCheckBox1.Size = new System.Drawing.Size(102, 19); 280this.integralHeightCheckBox2.Size = new System.Drawing.Size(102, 19); 291this.integralHeightCheckBox3.Size = new System.Drawing.Size(102, 19); 305this.changeHeightsStyleGroupBox4.Size = new System.Drawing.Size(502, 63); 316this.useDifferentHeightsCheckBox1.Size = new System.Drawing.Size(135, 19); 327this.useDifferentHeightsCheckBox2.Size = new System.Drawing.Size(135, 19); 338this.useDifferentHeightsCheckBox3.Size = new System.Drawing.Size(135, 19); 349this.ClientSize = new System.Drawing.Size(531, 517);
CustomComCtl32Button.cs (1)
19ClientSize = new Size(400, 100);
DataGridViewInVirtualModeTest.Designer.cs (2)
55this.dataGridView1.Size = new System.Drawing.Size(492, 150); 85this.ClientSize = new System.Drawing.Size(492, 180);
DataGridViewTest.Designer.cs (7)
86this.dataGridView1.Size = new System.Drawing.Size(750, 150); 140this.currentDPILabel1.Size = new System.Drawing.Size(116, 13); 151this.changeFontButton.Size = new System.Drawing.Size(154, 29); 172this.numericUpDown1.Size = new System.Drawing.Size(64, 20); 188this.label1.Size = new System.Drawing.Size(51, 13); 199this.resetFontButton.Size = new System.Drawing.Size(154, 29); 209this.ClientSize = new System.Drawing.Size(750, 272);
DateTimePicker.Designer.cs (6)
48this.dateTimePicker1.Size = new Size(233, 23); 58this.dateTimePicker2.Size = new Size(233, 23); 69this.dateTimePicker3.Size = new Size(233, 23); 79this.dateTimePicker4.Size = new Size(233, 23); 89this.dateTimePicker5.Size = new Size(233, 23); 97this.ClientSize = new Size(331, 301);
DesignTimeAligned.Designer.cs (6)
47this.label1.Size = new System.Drawing.Size(36, 25); 58this.label2.Size = new System.Drawing.Size(36, 25); 68this.button1.Size = new System.Drawing.Size(60, 46); 79this.textBox1.Size = new System.Drawing.Size(56, 31); 88this.currentDPILabel1.Size = new System.Drawing.Size(178, 25); 96this.ClientSize = new System.Drawing.Size(490, 196);
Dialogs.Designer.cs (9)
57this.propertyGrid1.Size = new System.Drawing.Size(332, 430); 65this.btnOpenFileDialog.Size = new System.Drawing.Size(163, 23); 75this.btnColorDialog.Size = new System.Drawing.Size(163, 23); 85this.btnThreadExceptionDialog.Size = new System.Drawing.Size(163, 23); 95this.btnPrintDialog.Size = new System.Drawing.Size(163, 23); 105this.btnFolderBrowserDialog.Size = new System.Drawing.Size(163, 23); 115this.btnSaveFileDialog.Size = new System.Drawing.Size(163, 23); 132this.flowLayoutPanel1.Size = new System.Drawing.Size(171, 430); 150this.ClientSize = new System.Drawing.Size(503, 430);
DockLayoutTests.Designer.cs (6)
48this.button1.Size = new System.Drawing.Size(112, 450); 58this.button3.Size = new System.Drawing.Size(112, 450); 68this.button2.Size = new System.Drawing.Size(576, 89); 78this.button4.Size = new System.Drawing.Size(576, 66); 88this.button5.Size = new System.Drawing.Size(576, 295); 97this.ClientSize = new System.Drawing.Size(800, 450);
DragDrop.cs (1)
434ImageScalingSize = new Size(75, 75)
DragDrop.Designer.cs (12)
80tableLayoutPanel1.Size = new Size(1226, 625); 91textBox.Size = new Size(488, 554); 101richTextBox.Size = new Size(611, 554); 112pictureBox1.Size = new Size(109, 106); 123pictureBox2.Size = new Size(109, 106); 134pictureBox3.Size = new Size(109, 106); 145pictureBox4.Size = new Size(109, 106); 156pictureBox5.Size = new Size(109, 106); 172tableLayoutPanel2.Size = new Size(177, 59); 180buttonOpenCats.Size = new Size(82, 53); 190buttonClear.Size = new Size(82, 53); 199ClientSize = new Size(1226, 625);
ErrorProviderTest.Designer.cs (8)
62this.label1.Size = new System.Drawing.Size(155, 15); 71this.label1_2.Size = new System.Drawing.Size(155, 15); 79this.textBox1.Size = new System.Drawing.Size(120, 23); 92this.label2.Size = new System.Drawing.Size(155, 15); 101this.label2_1.Size = new System.Drawing.Size(155, 23); 109this.textBox2.Size = new System.Drawing.Size(120, 23); 120this.submitButton.Size = new System.Drawing.Size(120, 27); 130this.ClientSize = new System.Drawing.Size(290, 230);
FormBorderStyles.Designer.cs (3)
39this.btnChangeFormBorderStyle.Size = new System.Drawing.Size(162, 23); 50this.lblFormBorderStyle.Size = new System.Drawing.Size(0, 13); 57this.ClientSize = new System.Drawing.Size(349, 214);
ListBoxes.Designer.cs (12)
59this.label1.Size = new System.Drawing.Size(200, 20); 66this.listBox1.Size = new System.Drawing.Size(200, 150); 74this.textBox1.Size = new System.Drawing.Size(100, 30); 101this.listBox2.Size = new System.Drawing.Size(200, 150); 107this.textBox2.Size = new System.Drawing.Size(100, 30); 128this.label3.Size = new System.Drawing.Size(250, 20); 135this.listBox3.Size = new System.Drawing.Size(200, 150); 143this.textBox3.Size = new System.Drawing.Size(100, 30); 164this.label4.Size = new System.Drawing.Size(250, 20); 171this.listBox4.Size = new System.Drawing.Size(200, 150); 180this.textBox4.Size = new System.Drawing.Size(100, 30); 202this.ClientSize = new System.Drawing.Size(800, 500);
ListViewTest.cs (2)
21listView1.TileSize = new Size(200, 50); 57Bounds = new Rectangle(new Point(0, 0), new Size(400, 200)),
ListViewTest.Designer.cs (6)
81this.listView1.Size = new System.Drawing.Size(439, 159); 96this.listView1.Size = new System.Drawing.Size(439, 40); 111this.btnClearListView1.Size = new System.Drawing.Size(75, 23); 121this.btnLoadImagesListView1.Size = new System.Drawing.Size(75, 23); 130this.LargeImageList.ImageSize = new System.Drawing.Size(256, 256); 143this.btnReplaceImageListView1.Size = new System.Drawing.Size(87, 23);
MainForm.cs (1)
293ClientSize = new Size(
MainForm.Designer.cs (1)
50this.ClientSize = new System.Drawing.Size(570, 30);
MdiChild.Designer.cs (9)
57this.panel1.Size = new System.Drawing.Size(480, 221); 66this.chkChildAlign.Size = new System.Drawing.Size(162, 17); 77this.chkRightToLeft.Size = new System.Drawing.Size(162, 17); 88this.btnOpenChild.Size = new System.Drawing.Size(138, 23); 99this.chkSetParentMenustrip.Size = new System.Drawing.Size(123, 17); 110this.chkSetMenustrip.Size = new System.Drawing.Size(115, 17); 121this.chkAddParentMenustrip.Size = new System.Drawing.Size(179, 17); 132this.chkAddMenustrip.Size = new System.Drawing.Size(146, 17); 142this.ClientSize = new System.Drawing.Size(480, 221);
MdiParent.Designer.cs (1)
40this.ClientSize = new System.Drawing.Size(900, 578);
MediaPlayer.Designer.cs (2)
48this.axWindowsMediaPlayer1.Size = new System.Drawing.Size(800, 450); 55this.ClientSize = new System.Drawing.Size(800, 450);
MenuStripAndCheckedListBox.Designer.cs (28)
66this.menuStrip1.ImageScalingSize = new System.Drawing.Size(32, 32); 76this.menuStrip1.Size = new System.Drawing.Size(736, 46); 91this.fileToolStripMenuItem.Size = new System.Drawing.Size(108, 38); 98this.newToolStripMenuItem.Size = new System.Drawing.Size(401, 44); 106this.openToolStripMenuItem1.Size = new System.Drawing.Size(401, 44); 112this.toolStripSeparator1.Size = new System.Drawing.Size(398, 6); 122this.memoryCardFileToolStripMenuItem.Size = new System.Drawing.Size(401, 44); 131this.navigationToolStripMenuItem.Size = new System.Drawing.Size(265, 44); 140this.newToolStripMenuItem1.Size = new System.Drawing.Size(197, 44); 148this.settingsEditorToolStripMenuItem.Size = new System.Drawing.Size(304, 44); 154this.openToolStripMenuItem.Size = new System.Drawing.Size(208, 44); 160this.saveToolStripMenuItem.Size = new System.Drawing.Size(265, 44); 166this.saveAsToolStripMenuItem.Size = new System.Drawing.Size(265, 44); 172this.exitToolStripMenuItem1.Size = new System.Drawing.Size(265, 44); 178this.toolStripSeparator2.Size = new System.Drawing.Size(398, 6); 183this.exitToolStripMenuItem.Size = new System.Drawing.Size(401, 44); 189this.editToolStripMenuItem.Size = new System.Drawing.Size(75, 38); 195this.viewToolStripMenuItem.Size = new System.Drawing.Size(86, 38); 201this.insertToolStripMenuItem.Size = new System.Drawing.Size(94, 38); 207this.checkStateSamplesToolStripMenuItem.Size = new System.Drawing.Size(200, 38); 220this.uncheckedToolStripMenuItem.Size = new System.Drawing.Size(401, 44); 228this.uncheckedCheckOnClickToolStripMenuItem.Size = new System.Drawing.Size(401, 44); 238this.checkedToolStripMenuItem.Size = new System.Drawing.Size(401, 44); 248this.checkedCheckOnClickToolStripMenuItem.Size = new System.Drawing.Size(401, 44); 257this.indeterminateToolStripMenuItem.Size = new System.Drawing.Size(401, 44); 267this.indeterminateCheckOnClickToolStripMenuItem.Size = new System.Drawing.Size(401, 44); 277this.currentDpiLabel.Size = new System.Drawing.Size(131, 25); 285this.ClientSize = new System.Drawing.Size(736, 342);
MessageBoxes.Designer.cs (2)
45this.propertyGrid1.Size = new System.Drawing.Size(332, 430); 53this.ClientSize = new System.Drawing.Size(503, 430);
MultipleControls.cs (1)
22Bounds = new Rectangle(new Point(0, 0), new Size(400, 200)),
MultipleControls.Designer.cs (22)
67this.progressBar1.Size = new System.Drawing.Size(331, 27); 81this.button1.Size = new System.Drawing.Size(88, 27); 95this.label1.Size = new System.Drawing.Size(38, 15); 103this.maskedTextBox1.Size = new System.Drawing.Size(116, 23); 112this.richTextBox1.Size = new System.Drawing.Size(116, 110); 121this.textBox1.Size = new System.Drawing.Size(116, 23); 133this.tabControl1.Size = new System.Drawing.Size(233, 115); 142this.tabPage1.Size = new System.Drawing.Size(225, 87); 153this.comboBox1.Size = new System.Drawing.Size(140, 23); 162this.tabPage2.Size = new System.Drawing.Size(225, 87); 173this.checkBox1.Size = new System.Drawing.Size(83, 19); 183this.checkBox2.Size = new System.Drawing.Size(153, 19); 193this.radioButton2.Size = new System.Drawing.Size(99, 20); 203this.radioButton1.Size = new System.Drawing.Size(99, 20); 218this.groupBox1.Size = new System.Drawing.Size(206, 93); 234this.checkedListBox1.Size = new System.Drawing.Size(140, 112); 243this.numericUpDown1.Size = new System.Drawing.Size(140, 23); 254this.domainUpDown1.Size = new System.Drawing.Size(140, 23); 263this.linkLabel1.Size = new System.Drawing.Size(60, 15); 273this.linkLabel2.Size = new System.Drawing.Size(108, 21); 292this.checkedListBox2.Size = new System.Drawing.Size(140, 58); 301this.ClientSize = new System.Drawing.Size(746, 458);
Password.Designer.cs (21)
62textBox1.Size = new Size(125, 27); 71textBox2.Size = new Size(125, 27); 79label1.Size = new Size(215, 20); 88label2.Size = new Size(130, 20); 97maskedTextBox1.Size = new Size(125, 27); 104maskedTextBox2.Size = new Size(125, 27); 114maskedTextBox3.Size = new Size(125, 27); 122textBox3.Size = new Size(125, 27); 130button1.Size = new Size(94, 29); 142textBox4.Size = new Size(125, 76); 150textBox5.Size = new Size(125, 76); 159label3.Size = new Size(75, 20); 168label4.Size = new Size(126, 20); 177label5.Size = new Size(137, 20); 186label6.Size = new Size(130, 20); 195label7.Size = new Size(215, 20); 204label8.Size = new Size(130, 20); 213label9.Size = new Size(215, 20); 222label10.Size = new Size(148, 20); 231label11.Size = new Size(234, 20); 239ClientSize = new Size(898, 451);
PictureBoxes.Designer.cs (4)
48this.pictureBox1.Size = new System.Drawing.Size(584, 281); 61this.btnloadImage.Size = new System.Drawing.Size(56, 23); 74this.imageUri.Size = new System.Drawing.Size(521, 20); 83this.ClientSize = new System.Drawing.Size(606, 331);
PropertyGrid.Designer.cs (2)
44this.propertyGrid1.Size = new System.Drawing.Size(465, 413); 51this.ClientSize = new System.Drawing.Size(465, 413);
RichTextBoxes.Designer.cs (3)
43this.richTextBox1.Size = new System.Drawing.Size(455, 104); 54this.richTextBox2.Size = new System.Drawing.Size(455, 99); 64this.ClientSize = new System.Drawing.Size(455, 203);
ScalingBeforeChanges.Designer.cs (2)
42this.checkBox1.Size = new System.Drawing.Size(80, 17); 51this.ClientSize = new System.Drawing.Size(284, 261);
ScrollableControls.Designer.cs (34)
99flowLayoutPanel1.Size = new Size(97, 93); 106button1.Size = new Size(75, 23); 115button2.Size = new Size(75, 23); 124button3.Size = new Size(75, 23); 133button4.Size = new Size(75, 23); 142button5.Size = new Size(75, 23); 152label1.Size = new Size(97, 15); 166panel1.Size = new Size(120, 89); 173button9.Size = new Size(75, 23); 182button8.Size = new Size(113, 23); 191button7.Size = new Size(113, 23); 200button6.Size = new Size(113, 20); 210label2.Size = new Size(36, 15); 234splitContainer1.Size = new Size(163, 108); 242button16.Size = new Size(113, 20); 251button15.Size = new Size(113, 20); 260button10.Size = new Size(113, 20); 269button14.Size = new Size(113, 20); 278button13.Size = new Size(113, 20); 287button12.Size = new Size(113, 20); 296button11.Size = new Size(113, 20); 306label3.Size = new Size(82, 15); 317tabControl1.Size = new Size(167, 101); 327tabPage1.Size = new Size(159, 73); 336button17.Size = new Size(194, 74); 346tabPage2.Size = new Size(159, 73); 356label4.Size = new Size(65, 15); 365label5.Size = new Size(48, 15); 375textBox1.Size = new Size(93, 65); 403treeView1.Size = new Size(115, 83); 411label6.Size = new Size(55, 15); 420label7.Size = new Size(45, 15); 431listBox1.Size = new Size(113, 79); 438ClientSize = new Size(759, 422);
ScrollBars.Designer.cs (10)
53this.hScrollBar.Size = new System.Drawing.Size(200, 26); 61this.vScrollBar.Size = new System.Drawing.Size(26, 200); 69this.numericMinimum.Size = new System.Drawing.Size(150, 27); 77this.numericMaximum.Size = new System.Drawing.Size(150, 27); 91this.chbRightToLeft.Size = new System.Drawing.Size(110, 24); 102this.lblMinimum.Size = new System.Drawing.Size(72, 20); 111this.lblMaximum.Size = new System.Drawing.Size(75, 20); 120this.lblHValue.Size = new System.Drawing.Size(50, 20); 129this.lblVValue.Size = new System.Drawing.Size(50, 20); 137this.ClientSize = new System.Drawing.Size(800, 450);
Splitter.Designer.cs (2)
53this.splitContainer1.Size = new System.Drawing.Size(568, 502); 62this.ClientSize = new System.Drawing.Size(568, 502);
TextBoxes.Designer.cs (7)
46this.textBox.Size = new System.Drawing.Size(120, 30); 54this.RTLTextBox.Size = new System.Drawing.Size(120, 30); 63this.multilineTextBox.Size = new System.Drawing.Size(120, 110); 86this.RTLMultilineTextBox.Size = new System.Drawing.Size(120, 110); 110this.richTextBox.Size = new System.Drawing.Size(120, 110); 131this.RTLRichTextBox.Size = new System.Drawing.Size(120, 110); 153this.ClientSize = new System.Drawing.Size(300, 330);
ToolStripSeparatorPreferredSize.cs (5)
50_toolStrip1.Size = new System.Drawing.Size(481, 22); 58_toolStripLabel1.Size = new System.Drawing.Size(86, 22); 64_toolStripLabel2.Size = new System.Drawing.Size(86, 22); 72_buttonChangeOrientation.Size = new System.Drawing.Size(150, 25); 87Size = new System.Drawing.Size(881, 150);
ToolStripTests.Designer.cs (43)
90this.toolStrip1.Size = new System.Drawing.Size(481, 22); 110this.toolStrip2.Size = new System.Drawing.Size(481, 22); 122this.toolStrip3.Size = new System.Drawing.Size(481, 22); 134this.toolStrip4.Size = new System.Drawing.Size(481, 22); 143this.toolStrip4_Label1.Size = new System.Drawing.Size(86, 22); 150this.toolStrip4_MenuItem1.Size = new System.Drawing.Size(180, 40); 157this.toolStrip4_SubMenuItem.Size = new System.Drawing.Size(481, 44); 165this.toolStrip2_Button1.Size = new System.Drawing.Size(114, 22); 174this.toolStrip2_Button2.Size = new System.Drawing.Size(114, 22); 182this.toolStrip2_Button3.Size = new System.Drawing.Size(114, 22); 191this.toolStrip2_Button4.Size = new System.Drawing.Size(114, 22); 198this.toolStrip2_Button5.Size = new System.Drawing.Size(114, 22); 205this.toolStrip2_Button6.Size = new System.Drawing.Size(114, 22); 211this.toolStrip2_SplitButton1_ChildButton1.Size = new System.Drawing.Size(180, 22); 217this.toolStrip2_SplitButton1_ChildButton2.Size = new System.Drawing.Size(180, 22); 224this.toolStrip3_MenuItem1.Size = new System.Drawing.Size(180, 40); 232this.toolStrip3_MenuItem2.Size = new System.Drawing.Size(180, 40); 240this.uncheckedCheckOnClickToolStripMenuItem.Size = new System.Drawing.Size(481, 44); 249this.checkCheckOnClickToolStripMenuItem.Size = new System.Drawing.Size(481, 44); 257this.thirdLevelItem.Size = new System.Drawing.Size(481, 44); 265this.thirdLevelButton.Size = new System.Drawing.Size(481, 44); 272this.toolStripComboBox2.Size = new System.Drawing.Size(481, 44); 280this.toolStripTextBox2.Size = new System.Drawing.Size(481, 44); 290this.toolStrip2_SplitButton2.Size = new System.Drawing.Size(133, 22); 297this.toolStripMenuItem1.Size = new System.Drawing.Size(481, 44); 307this.toolStrip2_DropDownButton2.Size = new System.Drawing.Size(180, 22); 314this.toolStripMenuItem2.Size = new System.Drawing.Size(481, 44); 323this.checkedCheckOnClickFToolStripMenuItem.Size = new System.Drawing.Size(481, 44); 332this.indeterminateToolStripMenuItem.Size = new System.Drawing.Size(481, 44); 340this.indeterminateCheckOnClickFToolStripMenuItem.Size = new System.Drawing.Size(481, 44); 351this.toolStrip2_SplitButton1.Size = new System.Drawing.Size(133, 22); 357this.toolStrip2_DropDownButton1_ChildButton1.Size = new System.Drawing.Size(180, 22); 363this.toolStrip2_DropDownButton1_ChildButton2.Size = new System.Drawing.Size(180, 22); 373this.toolStrip2_DropDownButton1.Size = new System.Drawing.Size(180, 22); 383this.statusStrip1.Size = new System.Drawing.Size(481, 22); 393this.label1.Size = new System.Drawing.Size(78, 13); 400this.toolStripProgressBar1.Size = new System.Drawing.Size(100, 22); 406this.toolStripLabel1.Size = new System.Drawing.Size(86, 22); 412this.toolStripTextBox1.Size = new System.Drawing.Size(100, 22); 418this.toolStripComboBox1.Size = new System.Drawing.Size(100, 22); 424this.toolStripProgressBar2.Size = new System.Drawing.Size(100, 16); 430this.toolStripStatusLabel1.Size = new System.Drawing.Size(118, 17); 437this.ClientSize = new System.Drawing.Size(881, 200);
ToolTipTests.Designer.cs (9)
54this.delaysNotSetButton.Size = new System.Drawing.Size(876, 183); 65this.automaticDelayButton.Size = new System.Drawing.Size(1031, 183); 76this.autoPopDelayButton.Size = new System.Drawing.Size(949, 183); 94this.flowLayoutPanel1.Size = new System.Drawing.Size(1417, 1577); 102this.defaultAutomaticDelayButton.Size = new System.Drawing.Size(915, 183); 113this.defaultAutoPopDelayButton.Size = new System.Drawing.Size(904, 183); 124this.initialDelayButton.Size = new System.Drawing.Size(876, 183); 136this.autoEllipsisButton.Size = new System.Drawing.Size(876, 183); 161this.ClientSize = new System.Drawing.Size(1417, 1577);
TrackBars.Designer.cs (16)
63this.trackBar1.Size = new System.Drawing.Size(457, 45); 75this.rbHorizontal.Size = new System.Drawing.Size(80, 19); 88this.rbVertical.Size = new System.Drawing.Size(63, 19); 102this.gbOrientation.Size = new System.Drawing.Size(168, 84); 113this.chbRightToLeft.Size = new System.Drawing.Size(86, 19); 125this.chbRightToLeftLayout.Size = new System.Drawing.Size(122, 19); 137this.tickstyleNone.Size = new System.Drawing.Size(100, 19); 153this.numericMinimum.Size = new System.Drawing.Size(131, 23); 172this.numericMaximum.Size = new System.Drawing.Size(131, 23); 191this.numericFrequency.Size = new System.Drawing.Size(131, 23); 205this.lblMinimum.Size = new System.Drawing.Size(60, 15); 214this.lblMaximum.Size = new System.Drawing.Size(62, 15); 223this.lblTickFrequency.Size = new System.Drawing.Size(86, 15); 232this.lblTrackBarSize.Size = new System.Drawing.Size(39, 15); 241this.lblTrackBarValue.Size = new System.Drawing.Size(47, 15); 249this.ClientSize = new System.Drawing.Size(479, 308);
3025 references to Size
BinaryFormatTests (1)
FormatTests\FormattedObject\BinaryFormattedTypes.cs (1)
54typeof(Size),
DesignSurfaceExt (12)
DesignerOptionServiceExt.cs (4)
30private System.Drawing.Size _gridSize; 32public DesignerOptionServiceExt4Grid(System.Drawing.Size gridSize) : base() { _gridSize = gridSize; } 54private System.Drawing.Size _gridSize; 56public DesignerOptionServiceExt4GridWithoutSnapping(System.Drawing.Size gridSize) : base() { _gridSize = gridSize; }
DesignSurfaceExt.cs (4)
44public void UseGrid(Size gridSize) 57public void UseGridWithoutSnapping(Size gridSize) 88public TControl CreateRootComponent<TControl>(Size controlSize) 161public TControl CreateControl<TControl>(Size controlSize, Point controlLocation)
IDesignSurfaceExt.cs (4)
21void UseGrid(System.Drawing.Size gridSize); 22void UseGridWithoutSnapping(System.Drawing.Size gridSize); 26TControl CreateRootComponent<TControl>(Size controlSize) 29TControl CreateControl<TControl>(Size controlSize, Point controlLocation)
netstandard (1)
netstandard.cs (1)
754[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Drawing.Size))]
PresentationCore.Tests (1)
BinaryFormat\BinaryFormattedTypes.cs (1)
55typeof(System.Drawing.Size),
PresentationUI (3)
MS\Internal\Documents\RMPublishingDialog.cs (2)
508images.ImageSize = System.Drawing.Size.Subtract( 923System.Drawing.Size imageButtonSize = new System.Drawing.Size(
MS\Internal\Documents\RMPublishingDialog.RightsTable.cs (1)
1031System.Drawing.Size boxSize = CheckBoxRenderer.GetGlyphSize(graphics, state);
System.ComponentModel.TypeConverter (3)
System\Drawing\SizeConverter.cs (3)
63if (value is Size size) 82ConstructorInfo? ctor = typeof(Size).GetConstructor(new Type[] { typeof(int), typeof(int) }); 115PropertyDescriptorCollection props = TypeDescriptor.GetProperties(typeof(Size), attributes);
System.Data.Common (1)
System\Data\TypeLimiter.cs (1)
179typeof(Size),
System.Drawing (1)
System.Drawing.cs (1)
143[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Drawing.Size))]
System.Drawing.Common (15)
Special\NotSupported.cs (15)
16public Bitmap(System.Drawing.Image original, System.Drawing.Size newSize) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 227public System.Drawing.Size MaximumBuffer { get { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } set { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } } 457public void CopyFromScreen(System.Drawing.Point upperLeftSource, System.Drawing.Point upperLeftDestination, System.Drawing.Size blockRegionSize) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 458public void CopyFromScreen(System.Drawing.Point upperLeftSource, System.Drawing.Point upperLeftDestination, System.Drawing.Size blockRegionSize, System.Drawing.CopyPixelOperation copyPixelOperation) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 459public void CopyFromScreen(int sourceX, int sourceY, int destinationX, int destinationY, System.Drawing.Size blockRegionSize) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 460public void CopyFromScreen(int sourceX, int sourceY, int destinationX, int destinationY, System.Drawing.Size blockRegionSize, System.Drawing.CopyPixelOperation copyPixelOperation) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 699public Icon(System.Drawing.Icon original, System.Drawing.Size size) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 702public Icon(System.IO.Stream stream, System.Drawing.Size size) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 705public Icon(string fileName, System.Drawing.Size size) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 712public System.Drawing.Size Size { get { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } } 765public System.Drawing.Size Size { get { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } } 2926public PreviewPageInfo(System.Drawing.Image image, System.Drawing.Size physicalSize) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 2928public System.Drawing.Size PhysicalSize { get { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } } 3127public static System.Drawing.Size Convert(System.Drawing.Size value, System.Drawing.Printing.PrinterUnit fromUnit, System.Drawing.Printing.PrinterUnit toUnit) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
System.Drawing.Common.Tests (40)
System\Drawing\GraphicsTests.cs (10)
1536public void CopyFromScreen_OutOfRange_DoesNotAffectGraphics(int sourceX, int sourceY, int destinationX, int destinationY, Size size) 1648Assert.ThrowsAny<ArgumentException>(() => graphics.CopyFromScreen(1, 2, 3, 4, Size.Empty, copyPixelOperation)); 1660Assert.Throws<InvalidOperationException>(() => graphics.CopyFromScreen(0, 0, 0, 0, Size.Empty)); 1661Assert.Throws<InvalidOperationException>(() => graphics.CopyFromScreen(0, 0, 0, 0, Size.Empty, CopyPixelOperation.DestinationInvert)); 1662Assert.Throws<InvalidOperationException>(() => graphics.CopyFromScreen(Point.Empty, Point.Empty, Size.Empty)); 1663Assert.Throws<InvalidOperationException>(() => graphics.CopyFromScreen(Point.Empty, Point.Empty, Size.Empty, CopyPixelOperation.DestinationInvert)); 1678AssertExtensions.Throws<ArgumentException>(null, () => graphics.CopyFromScreen(0, 0, 0, 0, Size.Empty)); 1679AssertExtensions.Throws<ArgumentException>(null, () => graphics.CopyFromScreen(0, 0, 0, 0, Size.Empty, CopyPixelOperation.MergeCopy)); 1680AssertExtensions.Throws<ArgumentException>(null, () => graphics.CopyFromScreen(Point.Empty, Point.Empty, Size.Empty)); 1681AssertExtensions.Throws<ArgumentException>(null, () => graphics.CopyFromScreen(Point.Empty, Point.Empty, Size.Empty, CopyPixelOperation.MergeCopy));
System\Drawing\IconConverterTests.cs (6)
44Assert.False(_icoConv.CanConvertFrom(null, typeof(Size)), "Size"); 57Assert.False(_icoConvFrmTD.CanConvertFrom(null, typeof(Size)), "TD Size"); 80Assert.False(_icoConv.CanConvertTo(null, typeof(Size)), "Size"); 98Assert.False(_icoConvFrmTD.CanConvertTo(null, typeof(Size)), "TD Size"); 146Assert.Throws<NotSupportedException>(() => _icoConv.ConvertTo(null, CultureInfo.InvariantCulture, _icon, typeof(Size))); 163Assert.Throws<NotSupportedException>(() => _icoConvFrmTD.ConvertTo(null, CultureInfo.InvariantCulture, _icon, typeof(Size)));
System\Drawing\IconTests.cs (12)
68public void Ctor_FilePath_Width_Height(string fileName, Size size, Size expectedSize) 78public void Ctor_FilePath_Size(string fileName, Size size, Size expectedSize) 122public void Ctor_Stream_Width_Height(string fileName, Size size, Size expectedSize) 133public void Ctor_Stream_Size(string fileName, Size size, Size expectedSize) 220public void Ctor_Icon_Width_Height(string fileName, Size size, Size expectedSize) 232public void Ctor_Icon_Size(string fileName, Size size, Size expectedSize)
System\Drawing\ImageConverterTests.cs (6)
70Assert.False(_imgConv.CanConvertFrom(null, typeof(Size)), "Size"); 83Assert.False(_imgConvFrmTD.CanConvertFrom(null, typeof(Size)), "TD Size"); 102Assert.False(_imgConv.CanConvertTo(null, typeof(Size)), "Size"); 116Assert.False(_imgConvFrmTD.CanConvertTo(null, typeof(Size)), "TD Size"); 199Assert.Throws<NotSupportedException>(() => _imgConv.ConvertTo(null, CultureInfo.InvariantCulture, _image, typeof(Size))); 208Assert.Throws<NotSupportedException>(() => _imgConvFrmTD.ConvertTo(null, CultureInfo.InvariantCulture, _image, typeof(Size)));
System\Drawing\Printing\PrinterUnitConvertTests.cs (1)
122var converted = PrinterUnitConvert.Convert(new Size(100, 1000), fromUnit, toUnit);
System\Drawing\TextureBrushTests.cs (2)
19public void Ctor_Bitmap(Image bitmap, PixelFormat expectedPixelFormat, Size expectedSize) 60public void Ctor_Image_WrapMode(Image image, WrapMode wrapMode, PixelFormat expectedPixelFormat, Size expectedSize)
System\Drawing\ToolboxBitmapAttributeTests.cs (3)
16private static Size s_defaultSize = new(16, 16); 33public void Ctor_FileName(string fileName, Size size) 38if (size == Size.Empty)
System.Drawing.Primitives (106)
System\Drawing\Point.cs (12)
35/// Initializes a new instance of the <see cref='System.Drawing.Point'/> class from a <see cref='System.Drawing.Size'/> . 37public Point(Size sz) 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); 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));
System\Drawing\PointF.cs (8)
84/// Translates a <see cref='System.Drawing.PointF'/> by a given <see cref='System.Drawing.Size'/> . 86public static PointF operator +(PointF pt, Size sz) => Add(pt, sz); 89/// Translates a <see cref='System.Drawing.PointF'/> by the negative of a given <see cref='System.Drawing.Size'/> . 91public static PointF operator -(PointF pt, Size sz) => Subtract(pt, sz); 118/// Translates a <see cref='System.Drawing.PointF'/> by a given <see cref='System.Drawing.Size'/> . 120public static PointF Add(PointF pt, Size sz) => new PointF(pt.X + sz.Width, pt.Y + sz.Height); 123/// Translates a <see cref='System.Drawing.PointF'/> by the negative of a given <see cref='System.Drawing.Size'/> . 125public static PointF Subtract(PointF pt, Size sz) => new PointF(pt.X - sz.Width, pt.Y - sz.Height);
System\Drawing\Rectangle.cs (3)
39public Rectangle(Point location, Size size) 72public Size Size 259public void Inflate(Size size) => Inflate(size.Width, size.Height);
System\Drawing\Size.cs (81)
15public struct Size : IEquatable<Size> 18/// Initializes a new instance of the <see cref='System.Drawing.Size'/> class. 20public static readonly Size Empty; 26/// Initializes a new instance of the <see cref='System.Drawing.Size'/> class from the specified 36/// Initializes a new instance of the <see cref='System.Drawing.Size'/> class from the specified dimensions. 45/// Converts the specified <see cref='System.Drawing.Size'/> to a <see cref='System.Drawing.SizeF'/>. 47public static implicit operator SizeF(Size p) => new SizeF(p.Width, p.Height); 50/// Performs vector addition of two <see cref='System.Drawing.Size'/> objects. 52public static Size operator +(Size sz1, Size sz2) => Add(sz1, sz2); 55/// Contracts a <see cref='System.Drawing.Size'/> by another <see cref='System.Drawing.Size'/> 57public static Size operator -(Size sz1, Size sz2) => Subtract(sz1, sz2); 60/// Multiplies a <see cref="Size"/> by an <see cref="int"/> producing <see cref="Size"/>. 63/// <param name="right">Multiplicand of type <see cref="Size"/>.</param> 64/// <returns>Product of type <see cref="Size"/>.</returns> 65public static Size operator *(int left, Size right) => Multiply(right, left); 68/// Multiplies <see cref="Size"/> by an <see cref="int"/> producing <see cref="Size"/>. 70/// <param name="left">Multiplicand of type <see cref="Size"/>.</param> 72/// <returns>Product of type <see cref="Size"/>.</returns> 73public static Size operator *(Size left, int right) => Multiply(left, right); 76/// Divides <see cref="Size"/> by an <see cref="int"/> producing <see cref="Size"/>. 78/// <param name="left">Dividend of type <see cref="Size"/>.</param> 80/// <returns>Result of type <see cref="Size"/>.</returns> 81public static Size operator /(Size left, int right) => new Size(unchecked(left.width / right), unchecked(left.height / right)); 84/// Multiplies <see cref="Size"/> by a <see cref="float"/> producing <see cref="SizeF"/>. 87/// <param name="right">Multiplicand of type <see cref="Size"/>.</param> 89public static SizeF operator *(float left, Size right) => Multiply(right, left); 92/// Multiplies <see cref="Size"/> by a <see cref="float"/> producing <see cref="SizeF"/>. 94/// <param name="left">Multiplicand of type <see cref="Size"/>.</param> 97public static SizeF operator *(Size left, float right) => Multiply(left, right); 100/// Divides <see cref="Size"/> by a <see cref="float"/> producing <see cref="SizeF"/>. 102/// <param name="left">Dividend of type <see cref="Size"/>.</param> 105public static SizeF operator /(Size left, float right) 109/// Tests whether two <see cref='System.Drawing.Size'/> objects are identical. 111public static bool operator ==(Size sz1, Size sz2) => sz1.Width == sz2.Width && sz1.Height == sz2.Height; 114/// Tests whether two <see cref='System.Drawing.Size'/> objects are different. 116public static bool operator !=(Size sz1, Size sz2) => !(sz1 == sz2); 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); 124/// Tests whether this <see cref='System.Drawing.Size'/> has zero width and height. 130/// Represents the horizontal component of this <see cref='System.Drawing.Size'/>. 139/// Represents the vertical component of this <see cref='System.Drawing.Size'/>. 148/// Performs vector addition of two <see cref='System.Drawing.Size'/> objects. 150public static Size Add(Size sz1, Size sz2) => 156public static Size Ceiling(SizeF value) => 160/// Contracts a <see cref='System.Drawing.Size'/> by another <see cref='System.Drawing.Size'/> . 162public static Size Subtract(Size sz1, Size sz2) => 168public static Size Truncate(SizeF value) => new Size(unchecked((int)value.Width), unchecked((int)value.Height)); 173public static Size Round(SizeF value) => 177/// Tests to see whether the specified object is a <see cref='System.Drawing.Size'/> with the same dimensions 178/// as this <see cref='System.Drawing.Size'/>. 180public override readonly bool Equals([NotNullWhen(true)] object? obj) => obj is Size && Equals((Size)obj); 182public readonly bool Equals(Size other) => this == other; 190/// Creates a human-readable string that represents this <see cref='System.Drawing.Size'/>. 195/// Multiplies <see cref="Size"/> by an <see cref="int"/> producing <see cref="Size"/>. 197/// <param name="size">Multiplicand of type <see cref="Size"/>.</param> 199/// <returns>Product of type <see cref="Size"/>.</returns> 200private static Size Multiply(Size size, int multiplier) => 204/// Multiplies <see cref="Size"/> by a <see cref="float"/> producing <see cref="SizeF"/>. 206/// <param name="size">Multiplicand of type <see cref="Size"/>.</param> 209private static SizeF Multiply(Size size, float multiplier) =>
System\Drawing\SizeF.cs (2)
175public readonly Size ToSize() => Size.Truncate(this);
System.Private.Windows.Core (19)
System\Private\Windows\Core\BinaryFormat\BinaryFormatWriter.cs (4)
174/// Writes a <see cref="Size"/> in binary format. 176public static void WriteSize(Stream stream, Size value) 181new ClassInfo(1, typeof(Size).FullName!, s_sizeMemberNames), 741case Size size:
System\Private\Windows\Core\Nrbf\SerializationRecordExtensions.cs (2)
130/// Tries to get this object as a <see cref="Size"/>. 141|| !classInfo.TypeNameMatches(typeof(Size))
System\Value.cs (9)
400public Value(Size value) 406public Value(Size? value) 419public static implicit operator Value(Size value) => new(value); 420public static explicit operator Size(in Value value) => value.GetValue<Size>(); 421public static implicit operator Value(Size? value) => new(value); 422public static explicit operator Size?(in Value value) => value.GetValue<Size?>(); 714|| (typeof(T) == typeof(Size) && _object == TypeFlags.Size)
System\Value.TypeFlags.cs (2)
28internal static StraightCastFlag<Size> Size { get; } = StraightCastFlag<Size>.Instance;
System\Value.Union.cs (1)
39[FieldOffset(0)] public Size Size;
Windows\Win32\Foundation\RECT.cs (1)
10public RECT(Size size)
System.Private.Windows.Core.TestUtilities (3)
CommonTestHelper.cs (3)
95public static TheoryData<Size> GetSizeTheoryData() => GetSizeTheoryData(TestIncludeType.All); 97public static TheoryData<Size> GetSizeTheoryData(TestIncludeType includeType) 99TheoryData<Size> data = new();
System.Private.Windows.GdiPlus (2)
System\Drawing\IIcon.cs (1)
8public Size Size { get; }
System\Drawing\IIconExtensions.cs (1)
19Size size = icon.Size;
System.Windows.Forms (1012)
System\Windows\Forms\Accessibility\LabelEditUiaTextProvider.cs (2)
141if (GetTextExtentPoint32(ch, out Size size)) 372private unsafe bool GetTextExtentPoint32(char item, out Size size)
System\Windows\Forms\ActiveX\AxHost.cs (13)
320protected override Size DefaultSize 1074private unsafe void HiMetric2Pixel(ref Size sz) 1087private unsafe void Pixel2hiMetric(ref Size sz) 1121private unsafe Size SetExtent(int width, int height) 1123Size size = new(width, height); 1142private unsafe Size GetExtent() 1144Size size = default; 1187Size adjustedSize = ApplySizeConstraints(width, height); 1217Size p = SetExtent(width, height); 1410Size p = GetExtent(); 3248Size setExtent = Size; 3252Size ocxExtent = GetExtent(); 3263Size newSize = SetExtent(setExtent.Width, setExtent.Height);
System\Windows\Forms\ActiveX\Control.ActiveXImpl.cs (7)
442Size sWindowExt = default; 443Size sViewportExt = default; 692internal unsafe void GetExtent(DVASPECT dwDrawAspect, Size* pSizel) 699Size size = _control.Size; 1675internal unsafe void SetExtent(DVASPECT dwDrawAspect, Size* pSizel) 1692Size size = new(HiMetricToPixel(pSizel->Width, pSizel->Height)); 1703Size adjusted = new(size.Width, size.Height);
System\Windows\Forms\ActiveX\Control_ActiveXControlInterfaces.cs (4)
273ActiveXInstance.SetExtent(dwDrawAspect, (Size*)psizel); 285ActiveXInstance.GetExtent(dwDrawAspect, (Size*)psizel); 497ActiveXInstance.SetExtent(DVASPECT.DVASPECT_CONTENT, (Size*)pSizel); 509ActiveXInstance.GetExtent(DVASPECT.DVASPECT_CONTENT, (Size*)pSizel);
System\Windows\Forms\Control.cs (44)
357Size defaultSize = DefaultSize; 1174public Size ClientSize 1582protected virtual Size DefaultMaximumSize => CommonProperties.DefaultMaximumSize; 1584protected virtual Size DefaultMinimumSize => CommonProperties.DefaultMinimumSize; 1594protected virtual Size DefaultSize => Size.Empty; 2049public virtual Size GetPreferredSize(Size proposedSize) 2065Size cachedSize = CommonProperties.xGetPreferredSizeCache(this); 2074Size preferredSize; 2101internal virtual Size GetPreferredSizeCore(Size proposedSize) 2467[AmbientValue(typeof(Size), "0, 0")] 2468public virtual Size MaximumSize 2473if (value == Size.Empty) 2490public virtual Size MinimumSize 3011public Size Size 3740public Size PreferredSize 3742get { return GetPreferredSize(Size.Empty); } 5176internal Size ApplySizeConstraints(int width, int height) 5183internal Size ApplySizeConstraints(Size proposedSize) 5193if (MaximumSize != Size.Empty || MinimumSize != Size.Empty) 5195Size maximumSize = LayoutUtils.ConvertZeroToUnbounded(MaximumSize); 6352public Size LogicalToDeviceUnits(Size value) => ScaleHelper.ScaleToDpi(value, DeviceDpi); 9705Size minSize = MinimumSize; 9706Size maxSize = MaximumSize; 9709MinimumSize = Size.Empty; 9710MaximumSize = Size.Empty; 9752Size adornmentSize = adornments.Size; 9757LayoutUtils.UnionSizes(Size.Empty, minSize), // make sure we don't go below 0. 9766LayoutUtils.UnionSizes(Size.Empty, maxSize), // make sure we don't go below 0. 9773Size maximumSize = LayoutUtils.ConvertZeroToUnbounded(maxSize); 9774Size scaledSize = LayoutUtils.IntersectSizes(rawScaledBounds.Size, maximumSize); 9831internal Size ScaleSize(Size startSize, float x, float y) 9833Size size = startSize; 10146protected virtual Size SizeFromClientSize(Size clientSize) => SizeFromClientSizeInternal(clientSize); 10148internal Size SizeFromClientSizeInternal(Size size) 10654Size s = DefaultSize;
System\Windows\Forms\Control.MetafileDCWrapper.cs (1)
28internal unsafe MetafileDCWrapper(HDC hOriginalDC, Size size)
System\Windows\Forms\Controls\Buttons\Button.cs (6)
31private Size _systemSize = new(InvalidDimensionValue, InvalidDimensionValue); 84internal override Size GetPreferredSizeCore(Size proposedConstraints) 88Size preferredSize = base.GetPreferredSizeCore(proposedConstraints); 96Size requiredSize = TextRenderer.MeasureText(Text, Font); 106Size paddedSize = _systemSize + Padding.Size;
System\Windows\Forms\Controls\Buttons\ButtonBase.cs (7)
255protected override Size DefaultSize => new(75, 23); 940public override Size GetPreferredSize(Size proposedSize) 958internal override Size GetPreferredSizeCore(Size proposedConstraints) 960Size preferedSize = Adapter.GetPreferredSizeCore(proposedConstraints); 1182Size preferredSize = PreferredSize;
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonBaseAdapter.cs (4)
48internal virtual Size GetPreferredSizeCore(Size proposedSize) 575ImageSize = Size.Empty, 602ImageSize = (Control.Image is null) ? Size.Empty : Control.Image.Size,
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonBaseAdapter.LayoutOptions.cs (34)
32public Size ImageSize { get; set; } 117private Size Compose(Size checkSize, Size imageSize, Size textSize) 148private Size Decompose(Size checkSize, Size imageSize, Size proposedSize) 187internal Size GetPreferredSizeCore(Size proposedSize) 196Size bordersAndPadding = new(linearBorderAndPadding, linearBorderAndPadding); 201Size checkSize = checkSizeLinear > 0 ? new(checkSizeLinear + 1, checkSizeLinear) : Size.Empty; 204Size textImageInsetSize = new(TextImageInset * 2, TextImageInset * 2); 205Size requiredImageSize = (ImageSize != Size.Empty) ? ImageSize + textImageInsetSize : Size.Empty; 211Size textSize = Size.Empty; 232Size requiredSize = Compose(checkSize, ImageSize, textSize); 286layout.Focus = ImageSize != Size.Empty 490if (ImageSize == Size.Empty || Text is null || Text.Length == 0 || textImageRelation == TextImageRelation.Overlay) 493Size textSize = GetTextSize(maxBounds.Size); 496Size size = ImageSize; 497if (layout.Options.DotNetOneButtonCompat && ImageSize != Size.Empty) 508Size maxTextSize = LayoutUtils.SubAlignedRegion(maxBounds.Size, ImageSize, textImageRelation); 509Size textSize = GetTextSize(maxTextSize); 513Size combinedSize = LayoutUtils.AddAlignedRegion(textSize, ImageSize, textImageRelation); 659protected virtual Size GetTextSize(Size proposedSize) 663Size textSize = Size.Empty; 670textSize = Size.Ceiling(
System\Windows\Forms\Controls\Buttons\ButtonInternal\CheckableControlBaseAdapter.cs (2)
22internal override Size GetPreferredSizeCore(Size proposedSize)
System\Windows\Forms\Controls\Buttons\ButtonInternal\CheckBoxStandardAdapter.cs (2)
88internal override Size GetPreferredSizeCore(Size proposedSize)
System\Windows\Forms\Controls\Buttons\CheckBox.cs (5)
251protected override Size DefaultSize => new(104, 24); 270internal override Size GetPreferredSizeCore(Size proposedConstraints) 283Size textSize = TextRenderer.MeasureText(Text, Font); 284Size size = SizeFromClientSize(textSize);
System\Windows\Forms\Controls\Buttons\CheckBoxRenderer.cs (3)
230public static Size GetGlyphSize(Graphics g, CheckBoxState state) => GetGlyphSize((IDeviceContext)g, state); 232internal static Size GetGlyphSize(IDeviceContext deviceContext, CheckBoxState state, HWND hwnd = default) 243internal static Size GetGlyphSize(HDC hdc, CheckBoxState state, HWND hwnd)
System\Windows\Forms\Controls\Buttons\RadioButton.cs (5)
219protected override Size DefaultSize => new(104, 24); 247internal override Size GetPreferredSizeCore(Size proposedConstraints) 254Size textSize = TextRenderer.MeasureText(Text, Font); 255Size size = SizeFromClientSize(textSize);
System\Windows\Forms\Controls\Buttons\RadioButtonRenderer.cs (2)
251public static Size GetGlyphSize(Graphics g, RadioButtonState state) 257internal static Size GetGlyphSize(HDC hdc, RadioButtonState state, HWND hwnd)
System\Windows\Forms\Controls\ComboBox\ComboBox.ComboBoxUiaTextProvider.cs (2)
196if (GetTextExtentPoint32(ch, out Size size)) 447private unsafe bool GetTextExtentPoint32(char item, out Size size)
System\Windows\Forms\Controls\ComboBox\ComboBox.cs (8)
377protected override Size DefaultSize 660public override Size MaximumSize 666public override Size MinimumSize 774Size textSize = TextRenderer.MeasureText(LayoutUtils.TestString, Font, new Size(short.MaxValue, (int)(FontHeight * 1.25)), TextFormatFlags.SingleLine); 785Size textSize = TextRenderer.MeasureText(LayoutUtils.TestString, Font, new Size(short.MaxValue, (int)(FontHeight * 1.25)), TextFormatFlags.SingleLine); 816Size textExtent = Size.Empty; 836Size fixedFrameBoderSize = SystemInformation.FixedFrameBorderSize;
System\Windows\Forms\Controls\DataGridView\DataGridView.cs (2)
229private static readonly Size s_dragSize = SystemInformation.DragSize; 2110protected override Size DefaultSize => new(240, 150);
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (3)
5788Size hotDoubleClickZone = SystemInformation.DoubleClickSize; 8980internal override Size GetPreferredSizeCore(Size proposedConstraints)
System\Windows\Forms\Controls\DataGridView\DataGridViewButtonCell.cs (3)
279protected override Size GetPreferredSize( 283Size constraintSize) 292Size preferredSize;
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (17)
422public Size PreferredSize => GetPreferredSize(RowIndex); 591public Size Size => GetSize(RowIndex); 1681internal static DataGridViewFreeDimension GetFreeDimensionFromConstraint(Size constraintSize) 2293internal Size GetPreferredSize(int rowIndex) 2302return GetPreferredSize(screen, dataGridViewCellStyle, rowIndex, Size.Empty); 2305protected virtual Size GetPreferredSize( 2309Size constraintSize) => new(-1, -1); 2328Size size = MeasureTextSize(g, text, cellStyle.Font!, flags); 2348protected virtual Size GetSize(int rowIndex) 2552Size requiredSize = TextRenderer.MeasureText(text, font, new Size(maxWidth, int.MaxValue), flags); 2558public static Size MeasureTextPreferredSize( 2579Size textOneLineSize = MeasureTextSize(graphics, text, font, flags); 2587Size textSize; 2604public static Size MeasureTextSize( 2633Size oneLineSize = MeasureTextSize(graphics, text, font, flags); 2643Size textSize; 3954internal static bool TextFitsInBounds(Graphics graphics, string text, Font font, Size maxBounds, TextFormatFlags flags)
System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxCell.cs (5)
635protected override Size GetPreferredSize( 639Size constraintSize) 652Size preferredSize; 656Size checkBoxSize = CheckBoxRenderer.GetGlyphSize(graphics, CheckBoxState.UncheckedNormal); 1150Size checkBoxSize;
System\Windows\Forms\Controls\DataGridView\DataGridViewColumnHeaderCell.cs (5)
476protected override Size GetPreferredSize( 480Size constraintSize) 502Size preferredSize; 556Size glyphSize; 568glyphSize = Size.Empty;
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.cs (6)
536Size size = GetSize(rowIndex); 537Size adjustedSize = new(size.Width - borderAndPaddingWidths.X - borderAndPaddingWidths.Width, 606Size preferredSize = TextRenderer.MeasureText(comboBox.GetItemText(item), comboBox.Font); 1162protected override Size GetPreferredSize( 1166Size constraintSize) 1183Size preferredSize =
System\Windows\Forms\Controls\DataGridView\DataGridViewHeaderCell.cs (1)
342protected override Size GetSize(int rowIndex)
System\Windows\Forms\Controls\DataGridView\DataGridViewImageCell.cs (7)
395protected override Size GetPreferredSize( 399Size constraintSize) 408Size preferredSize; 431preferredSize = Size.Empty; 443preferredSize = Size.Empty; 466preferredSize = Size.Empty; 478preferredSize = Size.Empty;
System\Windows\Forms\Controls\DataGridView\DataGridViewLinkCell.cs (3)
536protected override Size GetPreferredSize( 540Size constraintSize) 549Size preferredSize;
System\Windows\Forms\Controls\DataGridView\DataGridViewRowHeaderCell.cs (3)
506protected override Size GetPreferredSize( 510Size constraintSize) 851Size maxBounds = new(valBounds.Width - s_iconsWidth - 2 * RowHeaderIconMarginWidth, valBounds.Height);
System\Windows\Forms\Controls\DataGridView\DataGridViewTextBoxCell.cs (3)
388protected override Size GetPreferredSize( 392Size constraintSize) 401Size preferredSize;
System\Windows\Forms\Controls\DataGridView\DataGridViewTopLeftHeaderCell.cs (2)
134protected override Size GetPreferredSize(Graphics graphics, DataGridViewCellStyle cellStyle, int rowIndex, Size constraintSize)
System\Windows\Forms\Controls\DataGridView\DataGridViewUtilities.cs (7)
150internal static Size GetPreferredRowHeaderSize( 158Size constraintSize, 161Size preferredSize; 322Size sizeRequired = TextRenderer.MeasureText(text, font, new Size(int.MaxValue, int.MaxValue), flags); 329Size sizeCell = new(cellBounds.Width, cellBounds.Height); 330Size sizeConstraint = TextRenderer.MeasureText(text, font, sizeCell, flags); 351Size sizeText,
System\Windows\Forms\Controls\DateTimePicker\DateTimePicker.cs (3)
452protected override Size DefaultSize => new(200, PreferredHeight); 1020internal override Size GetPreferredSizeCore(Size proposedConstraints)
System\Windows\Forms\Controls\GroupBox\GroupBox.cs (10)
137protected override Size DefaultSize => new(200, 100); 146Size size = ClientSize; 468Size textSize; 486textSize = Size.Ceiling(graphics.MeasureString(Text, Font, textRectangle.Width, format)); 599internal override Size GetPreferredSizeCore(Size proposedSize) 602Size borderSize = SizeFromClientSize(Size.Empty); 603Size totalPadding = borderSize + new Size(0, _fontHeight) + Padding.Size; 605Size prefSize = LayoutEngine.GetPreferredSize(this, proposedSize - totalPadding);
System\Windows\Forms\Controls\GroupBox\GroupBoxRenderer.cs (2)
181Size measuredBounds = TextRenderer.MeasureText( 284Size measuredBounds = TextRenderer.MeasureText(
System\Windows\Forms\Controls\ImageList\ImageList.cs (4)
27private static readonly Size s_defaultImageSize = new(16, 16); 36private Size _imageSize = s_defaultImageSize; 144public Size ImageSize 319Size size = bitmap.Size;
System\Windows\Forms\Controls\ImageList\ImageList.NativeImageList.cs (1)
33public NativeImageList(Size imageSize, IMAGELIST_CREATION_FLAGS flags)
System\Windows\Forms\Controls\Labels\Label.cs (17)
318protected override Size DefaultSize => new(100, AutoSize ? PreferredHeight : 23); 839Size preferredSize = (AutoSize) ? PreferredSize : new Size(saveWidth, saveHeight); 875Size pointImageSize = image.Size; 919private protected TextFormatFlags CreateTextFormatFlags(Size constrainingSize) 999private Size GetBordersAndPadding() 1001Size bordersAndPadding = Padding.Size; 1021bordersAndPadding += SizeFromClientSize(Size.Empty); 1031public override Size GetPreferredSize(Size proposedSize) 1050internal override Size GetPreferredSizeCore(Size proposedConstraints) 1052Size bordersAndPadding = GetBordersAndPadding(); 1058proposedConstraints = LayoutUtils.UnionSizes(proposedConstraints, Size.Empty); 1060Size requiredSize; 1086requiredSize = Size.Ceiling(screen.Graphics.MeasureString(Text, Font, bounds, stringFormat)); 1272Size preferredSize = GetPreferredSize(new Size(clientRect.Width, clientRect.Height)); 1393Size preferredSize = PreferredSize;
System\Windows\Forms\Controls\Labels\LinkLabel.cs (5)
557Size clientSize = new(clientRectWithPadding.Width, clientRectWithPadding.Height); 559Size textSize = TextRenderer.MeasureText(text, alwaysUnderlined, clientSize, flags); 987Size preferredSize = GetPreferredSize(new Size(clientRect.Width, clientRect.Height)); 1069Size finalRectSize = focusRectangle.Size.ToSize(); 1071Size requiredSize = MeasureTextCache.GetTextSize(Text, Font, finalRectSize, CreateTextFormatFlags(finalRectSize));
System\Windows\Forms\Controls\ListBoxes\ListBox.cs (5)
376protected override Size DefaultSize 603Size oldSize = Size; 757internal override Size GetPreferredSizeCore(Size proposedConstraints) 1307Size textSize = LayoutUtils.OldGetLargestStringSizeInCollection(Font, strings);
System\Windows\Forms\Controls\ListView\DrawListViewItemEventArgs.cs (1)
104Size textSize = TextRenderer.MeasureText(subItem.Text, subItem.Font);
System\Windows\Forms\Controls\ListView\ListView.cs (7)
139private Size _tileSize = Size.Empty; 746protected override Size DefaultSize 1639public unsafe Size TileSize 1650return Size.Empty; 1701return !_tileSize.Equals(Size.Empty); 5475int textWidth = Size.Ceiling(g.MeasureString(text, Font)).Width;
System\Windows\Forms\Controls\Menus\MenuStrip.cs (1)
66protected override Size DefaultSize =>
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.cs (14)
84private static readonly Size s_defaultSingleMonthSize = new(176, 153); 98private Size _dimensions = new(1, 1); 272public Size CalendarDimensions 325protected override Size DefaultSize => GetMinReqRect(); 796public Size SingleMonthSize 822public new Size Size 1080Size minSize = GetMinReqRect(); 1177private Size GetMinReqRect() => GetMinReqRect(0, false, false); 1185private Size GetMinReqRect(int newDimensionLength, bool updateRows, bool updateCols) 1187Size minSize = SingleMonthSize; 1190Size textExtent; 1278Size preferredSize = GetMinReqRect(height, updateRows, false); 1288Size preferredSize = GetMinReqRect(width, false, updateCols); 1654Size max = SystemInformation.MaxWindowTrackSize;
System\Windows\Forms\Controls\PictureBox\PictureBox.cs (7)
47private Size _savedSize; 223protected override Size DefaultSize => new(100, 50); 367Size imageSize = _image.Size; 1032internal override Size GetPreferredSizeCore(Size proposedSize) 1040Size bordersAndPadding = SizeFromClientSize(Size.Empty) + Padding.Size;
System\Windows\Forms\Controls\ProgressBar\ProgressBar.cs (1)
181protected override Size DefaultSize => new(100, 23);
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.cs (17)
98private static readonly Size s_defaultLargeButtonSize = new(32, 32); 99private static readonly Size s_defaultNormalButtonSize = new(16, 16); 100private static Size s_largeButtonSize = s_defaultLargeButtonSize; 101private static Size s_normalButtonSize = s_defaultNormalButtonSize; 546protected override Size DefaultSize => new(130, 130); 2632int endSize = Size.Height; 2657helpOptimalHeight = _helpPane.GetOptimalHeight(Size.Width - s_cyDivider); 2674commandsOptimalHeight = _commandsPane.GetOptimalHeight(Size.Width - s_cyDivider); 2713_helpPane.SetBounds(0, endSize - height, Size.Width, height); 2758_commandsPane.SetBounds(0, endSize - height, Size.Width, height); 2763_gridView.Size = new Size(Size.Width, endSize - _gridView.Location.Y); 2829Size size = _targetMove.Size; 2836Invalidate(new Rectangle(0, me.Y - s_cyDivider, Size.Width, me.Y + s_cyDivider)); 2839_gridView.Invalidate(new Rectangle(0, _gridView.Size.Height - s_cyDivider, Size.Width, s_cyDivider)); 2895int width = Size.Width; 2921pevent.Graphics.FillRectangle(backgroundBrush, new Rectangle(0, yLast, width, Size.Height - yLast)); 4105Size size = child.Size;
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.MeasureTextHelper.cs (2)
28Size.Ceiling(size), 38Size.Ceiling(size),
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\CommandsPane.cs (1)
61Size size = ClientSize;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\HelpPane.cs (3)
91Size size = Size.Ceiling(sizef); 148Size size = ClientSize;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (17)
938Size size = new(width, height); 1072var size = Size.Ceiling(sizeF); 1418Size size = _dropDownHolder.Size; 1651Size size = GetOurSize(); 1854private Size GetOurSize() 1856Size size = ClientSize; 1859Size sizeWindow = Size; 1870Size sizeScroll = ScrollBar.Size; 1882Size size = GetOurSize(); 1968Size sizeWindow = new(rect.Width, rect.Height); 3268Size sizeWindow = Size; 3287Size size = GetOurSize(); 3704Size textSize = default; 4321Size sizeBtn = ScaleHelper.IsScalingRequirementMet 4421Size size = GetOurSize(); 4826Size size = GetOurSize();
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.DropDownHolder.cs (3)
40private static readonly Size s_minDropDownSize = 297Size newSize = new(2 * DropDownHolderBorder + _currentControl.Width, 2 * DropDownHolderBorder + _currentControl.Height); 600Size size = new(2 * DropDownHolderBorder + control.Width, 2 * DropDownHolderBorder + control.Height);
System\Windows\Forms\Controls\RichTextBox\RichTextBox.cs (6)
350protected override Size DefaultSize => new(100, 96); 426internal override Size GetPreferredSizeCore(Size proposedConstraints) 428Size scrollBarPadding = Size.Empty; 444Size prefSize = base.GetPreferredSizeCore(proposedConstraints);
System\Windows\Forms\Controls\Splitter\Splitter.cs (2)
93protected override Size DefaultSize 669Size clientSize = parent.ClientSize;
System\Windows\Forms\Controls\TabControl\TabControl.cs (6)
24private static readonly Size s_defaultItemSize = Size.Empty; 32private Size _itemSize = s_defaultItemSize; 228protected override Size DefaultSize 500public Size ItemSize 1520Size size = Size;
System\Windows\Forms\Controls\TabControl\TabPage.cs (4)
347[DefaultValue(typeof(Size), "0, 0")] 350public override Size MaximumSize 358public override Size MinimumSize 366public new Size PreferredSize => base.PreferredSize;
System\Windows\Forms\Controls\TextBox\MaskedTextBox.cs (3)
1754internal override Size GetPreferredSizeCore(Size proposedConstraints) 1756Size size;
System\Windows\Forms\Controls\TextBox\TextBox.cs (5)
401internal override Size GetPreferredSizeCore(Size proposedConstraints) 403Size scrollBarPadding = Size.Empty; 418Size prefSize = base.GetPreferredSizeCore(proposedConstraints);
System\Windows\Forms\Controls\TextBox\TextBoxBase.cs (7)
482protected override Size DefaultSize 814internal override Size GetPreferredSizeCore(Size proposedConstraints) 821Size bordersAndPadding = SizeFromClientSize(Size.Empty) + Padding.Size; 850Size textSize = TextRenderer.MeasureText(Text, Font, proposedConstraints, format); 854Size preferredSize = textSize + bordersAndPadding;
System\Windows\Forms\Controls\TextBox\TextBoxBase.TextBoxBaseUiaTextProvider.cs (3)
345if (GetTextExtentPoint32(ch, out Size size)) 445private unsafe bool GetTextExtentPoint32(char item, out Size size) 449size = Size.Empty;
System\Windows\Forms\Controls\ToolStrips\CachedItemHdcInfo.cs (4)
15private Size _cachedHDCSize = Size.Empty; 22public HDC GetCachedItemDC(HDC toolStripHDC, Size bitmapSize) 64_cachedHDCSize = Size.Empty;
System\Windows\Forms\Controls\ToolStrips\StatusStrip.cs (4)
62protected override Size DefaultSize 209Size statusStripSize = Size; 295internal override Size GetPreferredSizeCore(Size proposedSize)
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (32)
27private static Size s_onePixel = new(1, 1); 55private Size _largestDisplayedItemSize = Size.Empty; 59private Size _imageScalingSize; 234public new Size AutoScrollMargin 243public new Size AutoScrollMinSize 540protected override Size DefaultSize => ScaleHelper.IsThreadPerMonitorV2Aware 906[DefaultValue(typeof(Size), "16,16")] 909public Size ImageScalingSize 921internal virtual Size ImageScalingSizeInternal 1292protected internal virtual Size MaxItemSize 2232internal override Size GetPreferredSizeCore(Size proposedSize) 2249Size prefSize = LayoutEngine.GetPreferredSize(this, proposedSize - padding.Size); 2267internal static Size GetPreferredSizeHorizontal(IArrangedElement container, Size proposedConstraints) 2269Size maxSize = Size.Empty; 2273Size defaultSize = toolStrip.DefaultSize - toolStrip.Padding.Size; 2289Size prefItemSize = GetPreferredItemSize(item); 2330internal static Size GetPreferredSizeVertical(IArrangedElement container) 2332Size maxSize = Size.Empty; 2347Size preferredSize = GetPreferredItemSize(item); 2394private static Size GetPreferredItemSize(ToolStripItem item) 2396return item.AutoSize ? item.GetPreferredSize(Size.Empty) : item.Size; 3449Size bitmapSize = _largestDisplayedItemSize; 3525Size itemSize = item.Size; 4214internal void SetLargestItemSize(Size size) 4239Size biggestItemSize = Size.Empty; // used in determining OnPaint caching. 4462Size invalidDefaultSize = new(-1, -1);
System\Windows\Forms\Controls\ToolStrips\ToolStripButton.cs (3)
159public override Size GetPreferredSize(Size constrainingSize) 161Size prefSize = base.GetPreferredSize(constrainingSize);
System\Windows\Forms\Controls\ToolStrips\ToolStripComboBox.cs (4)
105protected override Size DefaultSize => new(100, 22); 322public override Size GetPreferredSize(Size constrainingSize) 324Size preferredSize = base.GetPreferredSize(constrainingSize);
System\Windows\Forms\Controls\ToolStrips\ToolStripContainer.cs (3)
69public new Size AutoScrollMargin 78public new Size AutoScrollMinSize 230protected override Size DefaultSize
System\Windows\Forms\Controls\ToolStrips\ToolStripContentPanel.cs (4)
68public new Size AutoScrollMargin 77public new Size AutoScrollMinSize 183public override Size MinimumSize 192public override Size MaximumSize
System\Windows\Forms\Controls\ToolStrips\ToolStripControlHost.cs (5)
142protected override Size DefaultSize 352public override Size Size 473public override Size GetPreferredSize(Size constrainingSize) 650Size size = LayoutUtils.DeflateRect(Bounds, Padding).Size;
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDown.cs (10)
462internal override Size ImageScalingSizeInternal 548protected internal override Size MaxItemSize 880Size size = GetSuggestedSize(); 1052internal Size GetSuggestedSize() => AutoSize ? GetPreferredSize(Size.Empty) : Size; 1462Size clientSize = ClientSize; 1463Size minSize = MinimumSize; 1464Size maxSize = MaximumSize; 1498Size minSize = MinimumSize; 1499Size maxSize = MaximumSize;
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownButton.ToolStripDropDownButtonInternalLayout.cs (5)
13private static readonly Size s_logicalDropDownArrowSize = new(5, 3); 14private static Size s_dropDownArrowSize = s_logicalDropDownArrowSize; 31public override Size GetPreferredSize(Size constrainingSize) 33Size preferredSize = base.GetPreferredSize(constrainingSize);
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownMenu.cs (22)
14private Size _maxItemSize = Size.Empty; 34private Size _defaultImageSize; 150protected internal override Size MaxItemSize 275Size maxTextSize = Size.Empty; 276Size maxImageSize = Size.Empty; 277Size maxCheckSize = _defaultImageSize; 278Size maxArrowSize = Size.Empty; 279Size maxNonMenuItemSize = Size.Empty; 288Size menuItemTextSize = menuItem.GetTextSize(); 292Size shortcutTextSize = menuItem.GetShortcutTextSize(); 307Size imageSize = Size.Empty; 318Size checkedImageSize = menuItem.CheckedImage.Size; 794Size upSize = UpScrollButton.GetPreferredSize(Size.Empty); 800Size downSize = DownScrollButton.GetPreferredSize(Size.Empty);
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownMenu.ToolStripDropDownLayoutEngine.cs (3)
15internal override Size GetPreferredSize(IArrangedElement container, Size proposedConstraints) 17Size preferredSize = base.GetPreferredSize(container, proposedConstraints);
System\Windows\Forms\Controls\ToolStrips\ToolStripGrip.cs (5)
15private static Size s_dragSize = LayoutUtils.s_maxSize; 75public override Size GetPreferredSize(Size constrainingSize) 77Size preferredSize = Size.Empty;
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (15)
45private Size _cachedTextSize; 567content.Size = LayoutUtils.UnionSizes(Size.Empty, content.Size); 678protected virtual Size DefaultSize 1547internal Size PreferredImageSize 1553return Size.Empty; 1569? Owner?.ImageList?.ImageSize ?? Size.Empty 1570: (image is null) ? Size.Empty : image.Size; 1802public virtual Size Size 2336public virtual Size GetPreferredSize(Size constrainingSize) 2343internal Size GetTextSize() 2347return Size.Empty; 2349else if (_cachedTextSize == Size.Empty) 2811_cachedTextSize = Size.Empty; 2990_cachedTextSize = Size.Empty;
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.ToolStripItemInternalLayout.cs (6)
20private static readonly Size s_invalidSize = new(int.MinValue, int.MinValue); 22private Size _lastPreferredSize = s_invalidSize; 52public Size PreferredImageSize => Owner.PreferredImageSize; 157public virtual Size GetPreferredSize(Size constrainingSize) 175return Size.Empty;
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.ToolStripItemInternalLayout.ToolStripItemLayoutOptions.cs (4)
16private Size _cachedSize = LayoutUtils.s_invalidSize; 17private Size _cachedProposedConstraints = LayoutUtils.s_invalidSize; 20protected override Size GetTextSize(Size proposedConstraints)
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.ToolStripItemInternalLayout.ToolStripLayoutData.cs (1)
16private Size _size;
System\Windows\Forms\Controls\ToolStrips\ToolStripMenuItem.cs (9)
49private Size _cachedShortcutSize = Size.Empty; 53private static readonly Size s_checkMarkBitmapSize = new(16, 16); 176_cachedShortcutSize = Size.Empty; 214protected override Size DefaultSize => ScaleHelper.IsThreadPerMonitorV2Aware 719internal Size GetShortcutTextSize() 723return Size.Empty; 729return Size.Empty; 732if (_cachedShortcutSize == Size.Empty)
System\Windows\Forms\Controls\ToolStrips\ToolStripMenuItem.ToolStripMenuItemInternalLayout.cs (2)
163public override Size GetPreferredSize(Size constrainingSize)
System\Windows\Forms\Controls\ToolStrips\ToolStripOverflow.cs (4)
93public override Size GetPreferredSize(Size constrainingSize) 134Size biggestItemSize = Size.Empty;
System\Windows\Forms\Controls\ToolStrips\ToolStripOverflowButton.cs (3)
71public override Size GetPreferredSize(Size constrainingSize) 73Size preferredSize = constrainingSize;
System\Windows\Forms\Controls\ToolStrips\ToolStripPanel.cs (3)
44MinimumSize = Size.Empty; // consider 1,1 83public new Size AutoScrollMargin 92public new Size AutoScrollMinSize
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelCell.cs (5)
20private Size _maxSize = LayoutUtils.s_maxSize; 128public Size MaximumSize 263public override Size GetPreferredSize(Size constrainingSize) 266Size preferredSize;
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelRow.cs (7)
339internal Size GetMinimumSize(ToolStrip toolStrip) 341if (toolStrip.MinimumSize == Size.Empty) 460Size minSize = GetMinimumSize((ToolStrip)currentCell.Control); 557Size minSize = GetMinimumSize((ToolStrip)currentCell.Control); 670Size IArrangedElement.GetPreferredSize(Size constrainingSize) 672Size preferredSize = LayoutEngine.GetPreferredSize(this, constrainingSize - Padding.Size) + Padding.Size;
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelRow.HorizontalRowManager.cs (2)
84Size totalSize = Size.Empty;
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelRow.VerticalRowManager.cs (2)
86Size totalSize = Size.Empty;
System\Windows\Forms\Controls\ToolStrips\ToolstripProfessionalRenderer.cs (2)
21private static readonly Size s_onePix = new(1, 1); 347Rectangle bounds = new(Point.Empty, item?.Size ?? Size.Empty);
System\Windows\Forms\Controls\ToolStrips\ToolStripProgressBar.cs (1)
71protected override Size DefaultSize
System\Windows\Forms\Controls\ToolStrips\ToolStripRenderer.cs (2)
877Size textSize = LayoutUtils.FlipSize(textRect.Size); 1035Size size = normalImage.Size;
System\Windows\Forms\Controls\ToolStrips\ToolStripScrollButton.cs (5)
15private static readonly Size s_defaultBitmapSize = new(16, 16); 123public override Size GetPreferredSize(Size constrainingSize) 125Size preferredSize = Size.Empty;
System\Windows\Forms\Controls\ToolStrips\ToolStripSeparator.cs (3)
54protected override Size DefaultSize => new(SeparatorThickness, SeparatorThickness); 257public override Size GetPreferredSize(Size constrainingSize)
System\Windows\Forms\Controls\ToolStrips\ToolStripSettings.cs (2)
72public Size Size 76return (Size)this[nameof(Size)];
System\Windows\Forms\Controls\ToolStrips\ToolStripSettingsManager.SettingsStub.cs (1)
18public Size Size;
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitButton.cs (3)
347public override Size GetPreferredSize(Size constrainingSize) 349Size preferredSize = SplitButtonButtonLayout.GetPreferredSize(constrainingSize);
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitStackLayout.cs (14)
29private Size OverflowButtonSize 36return Size.Empty; 40Size overflowButtonSize = toolStrip.OverflowButton.AutoSize ? toolStrip.OverflowButton.GetPreferredSize(_displayRectangle.Size) : toolStrip.OverflowButton.Size; 86Size itemSize = item.AutoSize ? item.GetPreferredSize(_displayRectangle.Size) : item.Size; 136Size itemSize = item.AutoSize ? item.GetPreferredSize(_displayRectangle.Size) : item.Size; 153internal override Size GetPreferredSize(IArrangedElement container, Size proposedConstraints) 216Size itemSize; 270itemSize = item.AutoSize ? item.GetPreferredSize(Size.Empty) : item.Size; 361Size itemSize; 365Size toolStripPreferredSize = _displayRectangle.Size; 412itemSize = item.AutoSize ? item.GetPreferredSize(Size.Empty) : item.Size; 487private void SetItemLocation(ToolStripItem item, Point itemLocation, Size itemSize) 584Size itemSize = item.AutoSize ? item.GetPreferredSize(_displayRectangle.Size) : item.Size;
System\Windows\Forms\Controls\ToolStrips\ToolStripStatusLabel.cs (2)
177public override Size GetPreferredSize(Size constrainingSize)
System\Windows\Forms\Controls\ToolStrips\ToolStripTextBox.cs (3)
77protected override Size DefaultSize => new Size(100, 22); 89public override Size GetPreferredSize(Size constrainingSize)
System\Windows\Forms\Controls\TrackBar\TrackBar.cs (1)
202protected override Size DefaultSize => new(104, PreferredDimension);
System\Windows\Forms\Controls\TrackBar\TrackBarRenderer.cs (4)
168public static Size GetLeftPointingThumbSize(Graphics g, TrackBarThumbState state) 178public static Size GetRightPointingThumbSize(Graphics g, TrackBarThumbState state) 188public static Size GetTopPointingThumbSize(Graphics g, TrackBarThumbState state) 198public static Size GetBottomPointingThumbSize(Graphics g, TrackBarThumbState state)
System\Windows\Forms\Controls\TreeView\TreeNode.cs (1)
631Size size = tv.ClientSize;
System\Windows\Forms\Controls\TreeView\TreeView.cs (6)
81private static Size? s_stateImageSize; 82private static Size? StateImageSize 415protected override Size DefaultSize => new(121, 97); 1794_internalStateImageList.ImageSize = (Size)StateImageSize; 1980newImageList.ImageSize = (Size)StateImageSize; 2828Size textSize = TextRenderer.MeasureText(node.Text, node.TreeView!.Font);
System\Windows\Forms\Controls\UpDown\DomainUpDown.cs (2)
513internal override Size GetPreferredSizeCore(Size proposedConstraints)
System\Windows\Forms\Controls\UpDown\NumericUpDown.cs (3)
766internal override Size GetPreferredSizeCore(Size proposedConstraints) 850Size digitSize = TextRenderer.MeasureText(charSpan, Font);
System\Windows\Forms\Controls\UpDown\UpDownBase.cs (5)
91public new Size AutoScrollMargin 100public new Size AutoScrollMinSize 246protected override Size DefaultSize => new(DefaultControlWidth, PreferredHeight); 283public override Size MaximumSize 289public override Size MinimumSize
System\Windows\Forms\Controls\WebBrowser\HtmlWindow.cs (2)
183public Size Size 389public void ResizeTo(Size size)
System\Windows\Forms\Controls\WebBrowser\WebBrowser.cs (1)
1126protected override Size DefaultSize => new(250, 250);
System\Windows\Forms\Controls\WebBrowser\WebBrowserBase.cs (10)
53private Size _webBrowserBaseChangingSize = Size.Empty; 787Size extent = Size; 1082private unsafe Size SetExtent(int width, int height) 1084Size sz = new(width, height); 1102private unsafe Size GetExtent() 1104Size size = default; 1110private unsafe void HiMetric2Pixel(ref Size sz) 1122private unsafe void Pixel2hiMetric(ref Size sz) 1191protected override Size DefaultSize => new(75, 23);
System\Windows\Forms\Controls\WebBrowser\WebBrowserBase.WebBrowserBaseNativeWindow.cs (1)
43Size s = _webBrowserBase._webBrowserBaseChangingSize;
System\Windows\Forms\Design\ComponentEditorForm.cs (4)
19private Size _maxSize = Size.Empty; 253Size size = new(bounds.Width + 3 * (BUTTON_PAD + xFrame) + selectorWidth, 351Size pageSize = page.Size;
System\Windows\Forms\Design\ComponentEditorForm.PageSelector.cs (1)
95Size size = default;
System\Windows\Forms\Dialogs\ThreadExceptionDialog.cs (3)
208Size textSize = new(_scaledMaxWidth - _scaledPaddingWidth, int.MaxValue); 213textSize = Size.Ceiling(TextRenderer.MeasureText(messageText, Font, textSize, TextFormatFlags.WordBreak)); 219textSize = Size.Ceiling(g.MeasureString(messageText, Font, textSize.Width));
System\Windows\Forms\ErrorProvider\ErrorProvider.ControlItem.cs (1)
206internal Rectangle GetIconBounds(Size size)
System\Windows\Forms\ErrorProvider\ErrorProvider.ErrorWindow.cs (1)
307Size size = iconRegion.Size;
System\Windows\Forms\ErrorProvider\ErrorProvider.IconRegion.cs (2)
42Size size = _icon.Size; 81public Size Size => _icon.Size;
System\Windows\Forms\Form.cs (53)
149private Size _autoScaleBaseSize = Size.Empty; 150private Size _minAutoSize = Size.Empty; 166private Dictionary<int, Size>? _dpiFormSizes; 440public virtual Size AutoScaleBaseSize 502_minAutoSize = Size.Empty; 669Size size = ClientSize; 731public new Size ClientSize 886protected override Size DefaultSize => new Size(300, 300); 1190[DefaultValue(typeof(Size), "0, 0")] 1191public override Size MaximumSize 1193get => Properties.TryGetValue(s_propMaxTrackSize, out Size maximumSize) ? maximumSize : Size.Empty; 1208private void UpdateMaximumSize(Size value, bool updateFormSize = true) 1215Size minimumSize = MinimumSize; 1240Size size = Size; 1304public override Size MinimumSize 1306get => Properties.TryGetValue(s_propMinTrackSize, out Size minimumSize) ? minimumSize : DefaultMinimumSize; 1325private void UpdateMinimumSize(Size value, bool updateFormSize = true) 1332Size maximumSize = MaximumSize; 1357Size size = Size; 1828public new Size Size 2982Size baseVar = AutoScaleBaseSize; 2984Size newVar = new((int)Math.Round(newVarF.Width), (int)Math.Round(newVarF.Height)); 3016Size correctClientSize = ClientSize; 3055Size correct = ComputeWindowSize(correctClientSize); 3205private Size ComputeWindowSize(Size clientSize) 3215private Size ComputeWindowSize(Size clientSize, WINDOW_STYLE style, WINDOW_EX_STYLE exStyle) 3620Size correct = ComputeWindowSize(ClientSize, (WINDOW_STYLE)maskedStyle, (WINDOW_EX_STYLE)cp.ExStyle); 3851Size s = Size; 4203Size prefSize = PreferredSize; 4208Size adjustedSize = AutoSizeMode == AutoSizeMode.GrowAndShrink ? prefSize : LayoutUtils.UnionSizes(prefSize, Size); 4403Size size = ClientSize; 4533protected virtual bool OnGetDpiScaledSize(int deviceDpiOld, int deviceDpiNew, ref Size desiredSize) 4573Size desiredSize = default; 5004Size restoredSize = _restoredWindowBounds.Size; 5082Size clientSize = ClientSize; 5112Size minSize = MinimumSize; 5113Size maxSize = MaximumSize; 5227Size max = SystemInformation.MaxWindowTrackSize; 5247Size min = SystemInformation.MinWindowTrackSize; 5933_autoScaleBaseSize = Size.Empty; 6140Size previousClientSize = ClientSize; 6759Size minTrack = (AutoSize && _formStateEx[s_formStateExInModalSizingLoop] == 1) ? LayoutUtils.UnionSizes(_minAutoSize, MinimumSize) : MinimumSize; 6761Size maxTrack = MaximumSize; 6775private unsafe void WmGetMinMaxInfoHelper(ref Message m, Size minTrack, Size maxTrack, Rectangle maximizedBounds) 6795Size virtualScreen = SystemInformation.VirtualScreen.Size; 6811Size minTrackWindowSize = SystemInformation.MinWindowTrackSize; 6904Size clientSize = ClientSize;
System\Windows\Forms\Input\Cursor.cs (7)
22private static Size s_cursorSize = Size.Empty; 193public Size Size 224Size sz = Size; 267Size cursorSize = Size; 375private Size GetIconSize(HICON iconHandle) 419Size picSize = ScaleHelper.ScaleToDpi(GetIconSize(cursorHandle), ScaleHelper.InitialSystemDpi);
System\Windows\Forms\Layout\ArrangedElement.cs (3)
152public virtual Size GetPreferredSize(Size constrainingSize) 154Size preferredSize = LayoutEngine.GetPreferredSize(this, constrainingSize - Padding.Size) + Padding.Size;
System\Windows\Forms\Layout\CommonProperties.cs (25)
32internal static Size DefaultMinimumSize { get; } = new(0, 0); 33internal static Size DefaultMaximumSize { get; } = new(0, 0); 97internal static Size GetMaximumSize(IArrangedElement element, Size defaultMaximumSize) 99if (element.Properties.TryGetValue(s_maximumSizeProperty, out Size size)) 110internal static Size GetMinimumSize(IArrangedElement element, Size defaultMinimumSize) 112if (element.Properties.TryGetValue(s_minimumSizeProperty, out Size size)) 126/// and/or the <see cref="Control.GetPreferredSize(Size)"/> calculation of a control. 198internal static void SetMaximumSize(IArrangedElement element, Size value) 220internal static void SetMinimumSize(IArrangedElement element, Size value) 342/// <see cref="Control.GetPreferredSizeCore(Size)"/> method. DO NOT CALL DIRECTLY 348Debug.Assert(xGetPreferredSizeCache(element) == Size.Empty, "Error detected in xClearPreferredSizeCache."); 372/// <see cref="Control.GetPreferredSizeCore(Size)"/> implementation when asked for a constraining 373/// value of <see cref="LayoutUtils.s_maxSize"/> (or <see cref="Size.Empty"/> too). 375internal static Size xGetPreferredSizeCache(IArrangedElement element) 377if (element.Properties.TryGetValue(s_preferredSizeCacheProperty, out Size size) && (size != LayoutUtils.s_invalidSize)) 382return Size.Empty; 388internal static void xSetPreferredSizeCache(IArrangedElement element, Size value) 391value == Size.Empty || value != xGetPreferredSizeCache(element), 674internal static Size GetLayoutBounds(IArrangedElement element) 676if (element.Properties.TryGetValue(s_layoutBoundsProperty, out Size size)) 681return Size.Empty; 689/// The <see cref="TableLayout"/> engine now calls <see cref="SetLayoutBounds(IArrangedElement, Size)"/> when it 697internal static void SetLayoutBounds(IArrangedElement element, Size value)
System\Windows\Forms\Layout\Containers\ContainerControl.cs (6)
681internal override Size GetPreferredSizeCore(Size proposedSize) 685Size borderSize = SizeFromClientSize(Size.Empty); 686Size totalPadding = borderSize + Padding.Size; 736Size size = default;
System\Windows\Forms\Layout\Containers\SplitContainer.cs (3)
146public new Size AutoScrollMinSize 158public new Size AutoScrollMargin 324protected override Size DefaultSize
System\Windows\Forms\Layout\DefaultLayout.cs (35)
35Size proposedConstraints = LayoutUtils.s_maxSize; 47Size prefSize = element.GetPreferredSize(proposedConstraints); 60Size newSize = LayoutUtils.UnionSizes(bounds.Size, prefSize); 78private static Rectangle GetGrowthBounds(IArrangedElement element, Size newSize) 374private static Size LayoutDockedControls(IArrangedElement container, bool measureOnly) 381Size preferredSize = Size.Empty; 400Size elementSize = GetVerticalDockedSize(element, remainingBounds.Size, measureOnly); 413Size elementSize = GetVerticalDockedSize(element, remainingBounds.Size, measureOnly); 426Size elementSize = GetHorizontalDockedSize(element, remainingBounds.Size, measureOnly); 439Size elementSize = GetHorizontalDockedSize(element, remainingBounds.Size, measureOnly); 457Size elementSize = remainingBounds.Size; 484private static void TryCalculatePreferredSizeDockedControl(IArrangedElement element, Rectangle newElementBounds, bool measureOnly, ref Size preferredSize, ref Rectangle remainingBounds) 488Size neededSize = new( 510Size elementPrefSize = element.GetPreferredSize(neededSize); 537private static Size GetVerticalDockedSize(IArrangedElement element, Size remainingSize, bool measureOnly) 539Size newSize = xGetDockedSize(element, /* constraints = */ new Size(remainingSize.Width, 1)); 554private static Size GetHorizontalDockedSize(IArrangedElement element, Size remainingSize, bool measureOnly) 556Size newSize = xGetDockedSize(element, /* constraints = */ new Size(1, remainingSize.Height)); 571private static Size xGetDockedSize(IArrangedElement element, Size constraints) 573Size desiredSize; 592return TryCalculatePreferredSize(container, measureOnly: false, preferredSize: out Size _); 598private static bool TryCalculatePreferredSize(IArrangedElement container, bool measureOnly, out Size preferredSize) 635Size preferredSizeForDocking = Size.Empty; 636Size preferredSizeForAnchoring; 1103internal override Size GetPreferredSize(IArrangedElement container, Size proposedBounds) 1107TryCalculatePreferredSize(container, measureOnly: true, preferredSize: out Size prefSize); 1111private static Size GetAnchorPreferredSize(IArrangedElement container) 1113Size prefSize = Size.Empty;
System\Windows\Forms\Layout\FlowLayout.cs (14)
23internal override Size GetPreferredSize(IArrangedElement container, Size proposedConstraints) 26Size prefSize = TryCalculatePreferredSize(container, measureBounds, measureOnly: true); 53private static Size TryCalculatePreferredSize(IArrangedElement container, Rectangle displayRect, bool measureOnly) 65Size layoutSize = Size.Empty; 77Size rowSize = MeasureRow(containerProxy, elementProxy, i, measureBounds, out int breakIndex); 137private static Size MeasureRow( 156private static Size TryCalculatePreferredSizeRow( 167Size rowSize = Size.Empty; 184Size prefSize; 187Size elementConstraints = new(int.MaxValue, rowBounds.Height - elementProxy.Margin.Size.Height); 218Size requiredSize = prefSize + elementProxy.Margin.Size;
System\Windows\Forms\Layout\FlowLayout.ElementProxy.cs (5)
69public virtual Size MinimumSize => CommonProperties.GetMinimumSize(Element!, Size.Empty); 73public virtual Size SpecifiedSize => CommonProperties.GetSpecifiedBounds(_element!).Size; 84public virtual Size GetPreferredSize(Size proposedSize) => _element!.GetPreferredSize(proposedSize);
System\Windows\Forms\Layout\FlowLayout.VerticalElementProxy.cs (4)
51public override Size MinimumSize => LayoutUtils.FlipSize(base.MinimumSize); 53public override Size SpecifiedSize => LayoutUtils.FlipSize(base.SpecifiedSize); 55public override Size GetPreferredSize(Size proposedSize)
System\Windows\Forms\Layout\IArrangedElement.cs (2)
28Size GetPreferredSize(Size proposedSize);
System\Windows\Forms\Layout\LayoutEngine.cs (3)
20internal virtual Size GetPreferredSize(IArrangedElement container, Size proposedConstraints) 22return Size.Empty;
System\Windows\Forms\Layout\LayoutUtils.cs (45)
13public static readonly Size s_maxSize = new(int.MaxValue, int.MaxValue); 14public static readonly Size s_invalidSize = new(int.MinValue, int.MinValue); 43public static Size OldGetLargestStringSizeInCollection(Font? font, ICollection? objects) 45Size largestSize = Size.Empty; 50Size textSize = TextRenderer.MeasureText(obj.ToString(), font, new Size(short.MaxValue, short.MaxValue), TextFormatFlags.SingleLine); 124public static Size ConvertZeroToUnbounded(Size size) 205public static Size UnionSizes(Size a, Size b) 212public static Size IntersectSizes(Size a, Size b) 275public static Rectangle AlignAndStretch(Size fitThis, Rectangle withinThis, AnchorStyles anchorStyles) 280public static Rectangle Align(Size alignThis, Rectangle withinThis, AnchorStyles anchorStyles) 285public static Rectangle Align(Size alignThis, Rectangle withinThis, ContentAlignment align) 290public static Rectangle HAlign(Size alignThis, Rectangle withinThis, AnchorStyles anchorStyles) 306private static Rectangle HAlign(Size alignThis, Rectangle withinThis, ContentAlignment align) 322public static Rectangle VAlign(Size alignThis, Rectangle withinThis, AnchorStyles anchorStyles) 338public static Rectangle VAlign(Size alignThis, Rectangle withinThis, ContentAlignment align) 354public static Size Stretch(Size stretchThis, Size withinThis, AnchorStyles anchorStyles) 356Size stretchedSize = new( 390public static Size AddAlignedRegion(Size textSize, Size imageSize, TextImageRelation relation) 395public static Size AddAlignedRegionCore(Size currentSize, Size contentSize, bool vertical) 453public static Size FlipSize(Size size) 460public static Size FlipSizeIf(bool condition, Size size) 493public static bool IsZeroWidthOrHeight(Size size) 498public static bool AreWidthAndHeightLarger(Size size1, Size size2) 503public static void SplitRegion(Rectangle bounds, Size specifiedContent, AnchorStyles region1Align, out Rectangle region1, out Rectangle region2) 570public static Size SubAlignedRegion(Size currentSize, Size contentSize, TextImageRelation relation) 575public static Size SubAlignedRegionCore(Size currentSize, Size contentSize, bool vertical)
System\Windows\Forms\Layout\LayoutUtils.MeasureTextCache.cs (6)
22private Size _unconstrainedPreferredSize = s_invalidSize; 29public Size GetTextSize(string? text, Font? font, Size proposedConstraints, TextFormatFlags flags) 78Size prefSize = TextRenderer.MeasureText(text, font, proposedConstraints, flags); 99public bool TextRequiresWordBreak(string? text, Font? font, Size size, TextFormatFlags flags) 108private Size GetUnconstrainedSize(string? text, Font? font, TextFormatFlags flags)
System\Windows\Forms\Layout\LayoutUtils.MeasureTextCache.PreferredSizeCache.cs (4)
12public Size ConstrainingSize; 14public Size PreferredSize; 16public PreferredSizeCache(Size constrainingSize, Size preferredSize)
System\Windows\Forms\Layout\TableLayout.ContainerInfo.cs (4)
371public Size GetCachedPreferredSize(Size proposedConstraints, out bool isValid) 376Size cachedSize = CommonProperties.xGetPreferredSizeCache(Container); 385return Size.Empty;
System\Windows\Forms\Layout\TableLayout.cs (18)
105Size containerSize = container.DisplayRectangle.Size - new Size(cellBorderWidth, cellBorderWidth); 111Size usedSpace = ApplyStyles(containerInfo, containerSize, measureOnly: false); 135internal override Size GetPreferredSize(IArrangedElement container, Size proposedConstraints) 145Size prefSize = containerInfo.GetCachedPreferredSize(proposedConstraints, out bool isCacheValid); 162Size containerSize = container.DisplayRectangle.Size - new Size(cellBorderWidth * 2, cellBorderWidth * 2); 176Size cellBorderSize = new(cellBorderWidth, cellBorderWidth); 222private static void ExpandLastElement(ContainerInfo containerInfo, Size usedSpace, Size totalSpace) 617private static Size ApplyStyles(ContainerInfo containerInfo, Size proposedConstraints, bool measureOnly) 619Size preferredSize = Size.Empty; 675private static int InflateColumns(ContainerInfo containerInfo, Size proposedConstraints, bool measureOnly) 732maxWidth = GetElementSize(element, Size.Empty).Width; 801private static int InflateRows(ContainerInfo containerInfo, Size proposedConstraints, int expandLastElementWidth, bool measureOnly) 866private static Size GetElementSize(IArrangedElement element, Size proposedConstraints) =>
System\Windows\Forms\OLE\DataObject.Composition.Binder.cs (2)
104typeof(Drawing.Size), 224|| typeof(T) == typeof(Drawing.Size)
System\Windows\Forms\Panels\Panel.cs (6)
149protected override Size DefaultSize => new(200, 100); 151internal override Size GetPreferredSizeCore(Size proposedSize) 155Size borderSize = SizeFromClientSize(Size.Empty); 156Size totalPadding = borderSize + Padding.Size;
System\Windows\Forms\Panels\SplitterPanel.cs (4)
161public new Size MinimumSize 173public new Size MaximumSize 221public new Size Size 223get => Collapsed ? Size.Empty : base.Size;
System\Windows\Forms\Printing\PrintPreviewControl.cs (16)
34private Size _virtualSize = new(1, 1); 47private Size _imageSize = Size.Empty; 387private Size VirtualSize 481Size pageSize = _pageInfo[StartPage].PhysicalSize; 482Size controlPhysicalSize = PixelsToPhysical(Size, _screenDPI); 556SetVirtualSizeNoInvalidate(Size.Empty); 622Size controlPhysicalSize = PixelsToPhysical(rect.Size, _screenDPI); 651Size pageSize = pages[imageIndex].PhysicalSize; 662Size imagePixels = PhysicalToPixels(_imageSize, _screenDPI); 751private static Size PixelsToPhysical(Size pixels, Point dpi) => 757private static Size PhysicalToPixels(Size physical, Point dpi) => 770internal void SetVirtualSizeNoInvalidate(Size value) 852(bool horizontal, bool vertical) IsScrollNeeded(Size displaySize)
System\Windows\Forms\Printing\PrintPreviewDialog.cs (7)
210public new Size MaximumSize 251public new Size MinimumSize 283public new Size Size 381protected override Size DefaultMinimumSize => new(375, 250); 499public new Size AutoScrollMargin 507public new Size AutoScrollMinSize 668public override Size AutoScaleBaseSize
System\Windows\Forms\Rendering\ControlPaint.cs (8)
51private static Size s_gridSize; // the dimensions of the grid dots 70internal static Rectangle CalculateBackgroundImageRectangle(Rectangle bounds, Size imageSize, ImageLayout imageLayout) 153Size size = bitmap.Size; 248Size size = bitmap.Size; 307Size size = bitmap.Size; 1037Size sz = SystemInformation.Border3DSize; 1510public static void DrawGrid(Graphics graphics, Rectangle area, Size pixelsBetweenDots, Color backColor) 1605Size imageSize = image.Size;
System\Windows\Forms\Rendering\TextExtensions.cs (6)
210public static unsafe Size MeasureText( 214Size proposedSize, 221return Size.Empty; 282public static unsafe Size GetTextExtent(this HDC hdc, string? text, HFONT hfont) 286return Size.Empty; 289Size size = default;
System\Windows\Forms\Rendering\TextRenderer.cs (38)
23internal static Size MaxSize { get; } = new(int.MaxValue, int.MaxValue); 381public static Size MeasureText(string? text, Font? font) 390/// The <see cref="Size"/>, in pixels, of text drawn on a single line with the specified font. You can 399/// <see cref="MeasureText(IDeviceContext, string?, Font?, Size, TextFormatFlags)"/>. 401public static Size MeasureText(ReadOnlySpan<char> text, Font? font) 404public static Size MeasureText(string? text, Font? font, Size proposedSize) 413/// <param name="proposedSize">The <see cref="Size"/> of the initial bounding rectangle.</param> 415/// The <see cref="Size"/>, in pixels, of <paramref name="text"/> drawn with the specified 418public static Size MeasureText(ReadOnlySpan<char> text, Font? font, Size proposedSize) 421public static Size MeasureText(string? text, Font? font, Size proposedSize, TextFormatFlags flags) 430/// <param name="proposedSize">The <see cref="Size"/> of the initial bounding rectangle.</param> 433/// The <see cref="Size"/>, in pixels, of <paramref name="text"/> drawn with the specified 439public static Size MeasureText(ReadOnlySpan<char> text, Font? font, Size proposedSize, TextFormatFlags flags) 442public static Size MeasureText(IDeviceContext dc, string? text, Font? font) 452/// The <see cref="Size"/>, in pixels, of <paramref name="text"/> drawn with the specified 456public static Size MeasureText(IDeviceContext dc, ReadOnlySpan<char> text, Font? font) 459public static Size MeasureText(IDeviceContext dc, string? text, Font? font, Size proposedSize) 469/// <param name="proposedSize">The <see cref="Size"/> of the initial bounding rectangle.</param> 471/// The <see cref="Size"/>, in pixels, of <paramref name="text"/> drawn with the specified 475public static Size MeasureText(IDeviceContext dc, ReadOnlySpan<char> text, Font? font, Size proposedSize) 478public static Size MeasureText( 482Size proposedSize, 493/// <param name="proposedSize">The <see cref="Size"/> of the initial bounding rectangle.</param> 496/// The <see cref="Size"/>, in pixels, of <paramref name="text"/> drawn with the specified 503public static Size MeasureText( 507Size proposedSize, 511private static Size MeasureTextInternal( 514Size proposedSize, 518return Size.Empty; 526private static Size MeasureTextInternal( 530Size proposedSize, 536return Size.Empty;
System\Windows\Forms\Scrolling\HScrollBar.cs (1)
23protected override Size DefaultSize
System\Windows\Forms\Scrolling\ScrollableControl.cs (13)
22private Size _userAutoScrollMinSize = Size.Empty; 32private Size _scrollMargin = Size.Empty; 37private Size _requestedScrollMargin = Size.Empty; 98public Size AutoScrollMargin 139public Size AutoScrollMinSize 386Size layoutBounds = CommonProperties.GetLayoutBounds(this); 935private void ResetAutoScrollMargin() => AutoScrollMargin = Size.Empty; 937private void ResetAutoScrollMinSize() => AutoScrollMinSize = Size.Empty; 1131private bool ShouldSerializeAutoScrollMargin() => !AutoScrollMargin.Equals(Size.Empty); 1137private bool ShouldSerializeAutoScrollMinSize() => !AutoScrollMinSize.Equals(Size.Empty);
System\Windows\Forms\Scrolling\ScrollBarRenderer.cs (2)
127public static Size GetThumbGripSize(Graphics g, ScrollBarState state) 137public static Size GetSizeBoxSize(Graphics g, ScrollBarState state)
System\Windows\Forms\Scrolling\VScrollBar.cs (1)
27protected override Size DefaultSize
System\Windows\Forms\SystemInformation.cs (32)
57public static Size PrimaryMonitorSize => GetSize(SM_CXSCREEN, SM_CYSCREEN); 93public static Size BorderSize => GetSize(SM_CXBORDER, SM_CYBORDER); 98public static Size GetBorderSizeForDpi(int dpi) 109public static Size FixedFrameBorderSize => GetSize(SM_CXFIXEDFRAME, SM_CYFIXEDFRAME); 124public static Size IconSize => GetSize(SM_CXICON, SM_CYICON); 129public static Size CursorSize => GetSize(SM_CXCURSOR, SM_CYCURSOR); 241public static Size MinimumWindowSize => GetSize(SM_CXMIN, SM_CYMIN); 246public static Size CaptionButtonSize => GetSize(SM_CXSIZE, SM_CYSIZE); 251public static Size FrameBorderSize => GetSize(SM_CXFRAME, SM_CYFRAME); 256public static Size MinWindowTrackSize => GetSize(SM_CXMINTRACK, SM_CYMINTRACK); 263public static Size DoubleClickSize => GetSize(SM_CXDOUBLECLK, SM_CYDOUBLECLK); 273public static Size IconSpacingSize => GetSize(SM_CXICONSPACING, SM_CYICONSPACING); 305public static Size Border3DSize => GetSize(SM_CXEDGE, SM_CYEDGE); 310public static Size MinimizedWindowSpacingSize => GetSize(SM_CXMINSPACING, SM_CYMINSPACING); 315public static Size SmallIconSize => GetSize(SM_CXSMICON, SM_CYSMICON); 325public static Size ToolWindowCaptionButtonSize => GetSize(SM_CXSMSIZE, SM_CYSMSIZE); 330public static Size MenuButtonSize => GetSize(SM_CXMENUSIZE, SM_CYMENUSIZE); 366public static Size MinimizedWindowSize => GetSize(SM_CXMINIMIZED, SM_CYMINIMIZED); 372public static Size MaxWindowTrackSize => GetSize(SM_CXMAXTRACK, SM_CYMAXTRACK); 378public static Size PrimaryMonitorMaximizedWindowSize => GetSize(SM_CXMAXIMIZED, SM_CYMAXIMIZED); 396public static Size DragSize => GetSize(SM_CXDRAG, SM_CYDRAG); 408public static Size MenuCheckSize => GetSize(SM_CXMENUCHECK, SM_CYMENUCHECK); 461Size size = PrimaryMonitorSize; 591/// Gets the <see cref="Size"/> in pixels of the rectangle within which the mouse 594public static Size MouseHoverSize 761/// The <see cref="Size"/>, in pixels, of the small caption buttons. 763public static unsafe Size SmallCaptionButtonSize 771: Size.Empty; 776/// The <see cref="Size"/>, in pixels, of the menu bar buttons. 778public static unsafe Size MenuBarButtonSize 786: Size.Empty; 814private static Size GetSize(SYSTEM_METRICS_INDEX x, SYSTEM_METRICS_INDEX y)
System\Windows\Forms\ToolTip\PopupEventArgs.cs (2)
17public PopupEventArgs(IWin32Window? associatedWindow, Control? associatedControl, bool isBalloon, Size size) 38public Size ToolTipSize { get; set; }
System\Windows\Forms\ToolTip\ToolTip.cs (5)
1493if (TryGetBubbleSize(ownerWindow, out Size bubbleSize)) 1522private bool TryGetBubbleSize(IWin32Window ownerWindow, out Size bubbleSize) 1538bubbleSize = Size.Empty; 1927private void Reposition(Point tipPosition, Size tipSize) 2045Size currentTooltipSize = rect.Size;
System\Windows\Forms\UserControl.cs (1)
180protected override Size DefaultSize
System\Windows\Forms\VisualStyles\VisualStyleRenderer.cs (3)
571public Size GetPartSize(IDeviceContext dc, ThemeSizeType type) 579internal unsafe Size GetPartSize(HDC dc, ThemeSizeType type, HWND hwnd = default) 598public unsafe Size GetPartSize(IDeviceContext dc, Rectangle bounds, ThemeSizeType type)
System.Windows.Forms.Design (213)
Resources\MaskDesignerDialog.Designer.cs (24)
96internal static System.Drawing.Size btnCancel_Size { 99return ((System.Drawing.Size)(obj)); 155internal static System.Drawing.Size btnOK_Size { 158return ((System.Drawing.Size)(obj)); 214internal static System.Drawing.Size checkBoxUseValidatingType_Size { 217return ((System.Drawing.Size)(obj)); 283internal static System.Drawing.Size lblHeader_Size { 286return ((System.Drawing.Size)(obj)); 343internal static System.Drawing.Size lblMask_Size { 346return ((System.Drawing.Size)(obj)); 402internal static System.Drawing.Size lblTryIt_Size { 405return ((System.Drawing.Size)(obj)); 488internal static System.Drawing.Size listViewCannedMasks_Size { 491return ((System.Drawing.Size)(obj)); 538internal static System.Drawing.Size maskedTextBox_Size { 541return ((System.Drawing.Size)(obj)); 626internal static System.Drawing.Size maskTryItTable_Size { 629return ((System.Drawing.Size)(obj)); 710internal static System.Drawing.Size okCancelTableLayoutPanel_Size { 713return ((System.Drawing.Size)(obj)); 787internal static System.Drawing.Size overarchingTableLayoutPanel_Size { 790return ((System.Drawing.Size)(obj)); 827internal static System.Drawing.Size txtBoxMask_Size { 830return ((System.Drawing.Size)(obj));
System\ComponentModel\Design\CollectionEditor.SplitButton.cs (3)
59public override Size GetPreferredSize(Size proposedSize) 61Size preferredSize = base.GetPreferredSize(proposedSize);
System\ComponentModel\Design\DesignerActionPanel.CheckBoxPropertyLine.cs (2)
34public override Size LayoutControls(int top, int width, bool measureOnly) 36Size checkBoxPreferredSize = _checkBox.GetPreferredSize(new Size(int.MaxValue, int.MaxValue));
System\ComponentModel\Design\DesignerActionPanel.cs (7)
232public static Point ComputePreferredDesktopLocation(Rectangle rectangleAnchor, Size sizePanel, out DockStyle edgeToDock) 358private Size DoLayout(Size proposedSize, bool measureOnly) 363return Size.Empty; 380Size size = line.LayoutControls(yPos, proposedSize.Width, measureOnly); 394public override Size GetPreferredSize(Size proposedSize)
System\ComponentModel\Design\DesignerActionPanel.EditorPropertyLine.cs (5)
93Size textSize = default; 170public override Size LayoutControls(int top, int width, bool measureOnly) 172Size size = base.LayoutControls(top, width, measureOnly); 345Size dropDownSize = _dropDownHolder.Size; 369Size dropDownSize = _dropDownHolder.Size;
System\ComponentModel\Design\DesignerActionPanel.Line.cs (1)
43public abstract Size LayoutControls(int top, int width, bool measureOnly);
System\ComponentModel\Design\DesignerActionPanel.MethodLine.cs (2)
43public override Size LayoutControls(int top, int width, bool measureOnly) 45Size linkLabelSize = _linkLabel.GetPreferredSize(new Size(int.MaxValue, int.MaxValue));
System\ComponentModel\Design\DesignerActionPanel.PanelHeaderLine.cs (4)
54public override Size LayoutControls(int top, int width, bool measureOnly) 56Size titleSize = _titleLabel.GetPreferredSize(new Size(int.MaxValue, int.MaxValue)); 57Size subtitleSize = Size.Empty;
System\ComponentModel\Design\DesignerActionPanel.SeparatorLine.cs (1)
24public override Size LayoutControls(int top, int width, bool measureOnly) => new(MinimumWidth, 1);
System\ComponentModel\Design\DesignerActionPanel.TextBoxPropertyLine.cs (3)
19private Size _editRegionSize; 69protected Size EditRegionSize => _editRegionSize; 90public override Size LayoutControls(int top, int width, bool measureOnly)
System\ComponentModel\Design\DesignerActionPanel.TextLine.cs (2)
38public override Size LayoutControls(int top, int width, bool measureOnly) 40Size labelSize = _label.GetPreferredSize(new Size(int.MaxValue, int.MaxValue));
System\ComponentModel\Design\DesignerActionUI.DesignerActionToolStripDropDown.cs (1)
35Size panelSize = CurrentPanel.GetPreferredSize(new Size(150, int.MaxValue));
System\ComponentModel\Design\MultilineStringEditor.MultilineStringEditorUI.cs (12)
21private Size _watermarkSize = Size.Empty; 128_minimumSize = Size.Empty; 129_watermarkSize = Size.Empty; 155Size requestedSize = ContentSize; 176private unsafe Size ContentSize 231private Size _minimumSize = Size.Empty; 233public override Size MinimumSize 237if (_minimumSize == Size.Empty) 352private Size WatermarkSize 356if (_watermarkSize == Size.Empty)
System\Drawing\Design\ColorEditor.ColorUI.cs (1)
86Size size = _pal.Size;
System\Windows\Forms\Design\Behavior\ContainerSelectorBehavior.cs (1)
177Size delta = new(Math.Abs(mouseLoc.X - InitialDragPoint.X), Math.Abs(mouseLoc.Y - InitialDragPoint.Y));
System\Windows\Forms\Design\Behavior\DropSourceBehavior.cs (4)
62private Size _parentGridSize; // used to snap around to grid dots if layoutmode == SnapToGrid 110_parentGridSize = Size.Empty; 874_parentGridSize = Size.Empty; 886_parentGridSize = (Size)gridProp.GetValue(parentControl);
System\Windows\Forms\Design\Behavior\ResizeBehavior.cs (2)
40private Size _parentGridSize; // used to snap resize ops to the grid 273_parentGridSize = (Size)gridProp.GetValue(control.Parent);
System\Windows\Forms\Design\CommandSet.cs (44)
590private static Size GetSize(IComponent comp) 593return prop is not null ? (Size)prop.GetValue(comp)! : Size.Empty; 599protected virtual void GetSnapInformation(IDesignerHost host, IComponent component, out Size snapSize, out IComponent snapComponent, out PropertyDescriptor? snapProperty) 613if (gridSizeProp is not null && gridSizeProp.PropertyType != typeof(Size)) 623snapSize = gridSizeProp is not null ? (Size)gridSizeProp.GetValue(snapComponent)! : Size.Empty; 845GetSnapInformation(host, comp, out Size snapSize, out IComponent snapComponent, out PropertyDescriptor? snapProperty); 970Size primarySize = GetSize(primarySelection!); 1036Size size = (Size)sizeProp.GetValue(comp)!; 1117Size gridSize = Size.Empty; 1145gridSize = (Size)prop.GetValue(baseComponent)!; 1295Size size = (Size)sizeProp.GetValue(comp)!; 2296Size primarySize = Size.Empty; 2306primarySize = (Size)sizeProp.GetValue(component)!; 2343Size itemSize = (Size)sizeProp.GetValue(obj)!; 2395Size grid = Size.Empty; 2407grid = (Size)prop.GetValue(baseComponent)!; 2427Size size = (Size)sizeProp.GetValue(comp)!; 2529Size grid = Size.Empty; 2544grid = (Size)prop.GetValue(baseComponent)!; 2557Size curSize = Size.Empty, lastSize = Size.Empty; 2598curSize = Size.Empty; 2607curSize = (Size)curSizeDesc.GetValue(component)!; 2622curSize = Size.Empty; 2649curSize = (Size)curSizeDesc.GetValue(curComp)!; 2688lastSize = (Size)curSizeDesc.GetValue(curComp)!; 2759curSize = (Size)curSizeDesc.GetValue(curComp)!; 2790lastSize = (Size)lastSizeDesc.GetValue(lastComp)!; 3250Size size = c.Size; 3289Size parentSize = parentControl.ClientSize; 3290Size gridSize = Size.Empty; 3349gridSize = (Size)gs.GetValue(baseComponent)!;
System\Windows\Forms\Design\ComponentTray.cs (12)
30private Size _grabHandle = Size.Empty; // Size of the grab handles. 1712internal Size ParentGridSize 1990Size sz = Size.Ceiling(gr.MeasureString(Text, Font)); 2189Size minDrag = SystemInformation.DragSize; 2190Size minDblClick = SystemInformation.DoubleClickSize; 2421Size parentGridSize = _tray.ParentGridSize; 2456Size sz = _toolboxBitmap.Size; 2803private Size _snapSize = Size.Empty; 2860protected override Size GetCurrentSnapSize()
System\Windows\Forms\Design\ControlCommandSet.cs (9)
367protected override void GetSnapInformation(IDesignerHost host, IComponent component, out Size snapSize, out IComponent snapComponent, out PropertyDescriptor snapProperty) 418if (gridSizeProp is not null && gridSizeProp.PropertyType != typeof(Size)) 431snapSize = (Size)gridSizeProp.GetValue(snapComponent); 435snapSize = Size.Empty; 643Size primaryControlsize = primaryControl.Size; 683Size snapSize = Size.Empty; 788Size size = (Size)propSize.GetValue(component);
System\Windows\Forms\Design\ControlDesigner.cs (4)
1378Size minDrag = SystemInformation.DragSize; 1379Size minDblClick = SystemInformation.DoubleClickSize; 2240Size glyphSize = SystemInformation.IconSize; 2337Size dblClick = SystemInformation.DoubleClickSize;
System\Windows\Forms\Design\DataGridViewColumnCollectionDialog.cs (1)
1004int textWidth = Size.Ceiling(e.Graphics.MeasureString(columnName, e.Font!, new SizeF(bounds.Width, bounds.Height))).Width;
System\Windows\Forms\Design\DataGridViewColumnTypeEditor.Picker.cs (1)
50width = Math.Max(width, Size.Ceiling(g.MeasureString(item.ToString(), _typesListBox.Font)).Width);
System\Windows\Forms\Design\DesignBindingPicker.cs (2)
125private Size _initialSize; 1940Size scaledSize = ScaleHelper.ScaleToDpi(imageList.ImageSize, dpi);
System\Windows\Forms\Design\DesignerFrame.cs (1)
164Size selectionSize = DesignerUtils.GetAdornmentDimensions(AdornmentType.Maximum);
System\Windows\Forms\Design\DesignerOptions.cs (2)
16private Size _gridSize = new(8, 8); 24public virtual Size GridSize
System\Windows\Forms\Design\DesignerToolStripControlHost.cs (1)
30protected override Size DefaultSize
System\Windows\Forms\Design\DesignerUtils.cs (8)
20private static Size s_minDragSize = Size.Empty; 138public static Size MinDragSize 142if (s_minDragSize == Size.Empty) 144Size minDrag = SystemInformation.DragSize; 145Size minDblClick = SystemInformation.DoubleClickSize; 188private static void DrawDragBorder(Graphics g, Size imageSize, int borderSize, Color backColor) 341public static Size GetAdornmentDimensions(AdornmentType adornmentType) => adornmentType switch
System\Windows\Forms\Design\DockEditor.DockUI.cs (1)
197Size scaledButtonSize = ScaleHelper.ScaleToDpi(new Size(LogicalButtonSize, LogicalButtonSize), dpi);
System\Windows\Forms\Design\FormDocumentDesigner.cs (7)
21private Size _autoScaleBaseSize = Size.Empty; 59private Size AutoScaleBaseSize 96private Size ClientSize 106Size size = new(-1, -1); 230private Size Size 269Size newVar = new((int)Math.Round(newVarF.Width), (int)Math.Round(newVarF.Height));
System\Windows\Forms\Design\ImageListActionList.cs (1)
34public Size ImageSize
System\Windows\Forms\Design\ImageListDesigner.cs (1)
57private Size ImageSize
System\Windows\Forms\Design\ImageListImage.cs (1)
46public Size Size => Image.Size;
System\Windows\Forms\Design\InheritanceUI.cs (1)
36Size size = InheritanceGlyph.Size;
System\Windows\Forms\Design\ISelectionUIService.cs (1)
72Size GetAdornmentDimensions(AdornmentType adornmentType);
System\Windows\Forms\Design\ParentControlDesigner.cs (23)
50private Size _gridSize = Size.Empty; 105private Size CurrentGridSize => GridSize; 207internal Size ParentGridSize => GridSize; 212protected Size GridSize 231if (value is Size size) 435Size size = Size.Empty; 436Size offset = new(0, 0); 443size = (Size)defaultValues["Size"]; 446offset = (Size)defaultValues["Offset"]; 728private void GridSizeOfParentChanged(Size gridSize) 935private static Size GetDefaultSize(IComponent component) 940Size size; 951size = (Size)prop.GetValue(component); 952if (size != Size.Empty) 966size = (Size)prop.GetValue(component); 974return ((Size)sizeAttr.Value); 1138Size gridSize = GridSize; 1238Rectangle bounds = new((Point)defaultValues["Location"], (Size)defaultValues["Size"]); 1861Size minControlSize = new(DesignerUtils.MinDragSize.Width * 2, DesignerUtils.MinDragSize.Height * 2); 2113properties["GridSize"] = TypeDescriptor.CreateProperty(typeof(ParentControlDesigner), "GridSize", typeof(Size), 2121properties["CurrentGridSize"] = TypeDescriptor.CreateProperty(typeof(ParentControlDesigner), "CurrentGridSize", typeof(Size),
System\Windows\Forms\Design\SelectionUIHandler.cs (6)
70Size snapSize = GetCurrentSnapSize(); 176protected abstract Size GetCurrentSnapSize(); 309Size minSize; 484Size size = new(Math.Max(MinControlWidth, newBounds.Width), Math.Max(MinControlHeight, newBounds.Height)); 626Size sz; 631sz = (Size)sizeProp.GetValue(control)!;
System\Windows\Forms\Design\SelectionUIService.cs (2)
629Size minDragSize = SystemInformation.DragSize; 1203Size ISelectionUIService.GetAdornmentDimensions(AdornmentType adornmentType) => adornmentType switch
System\Windows\Forms\Design\ShortcutKeysEditor.ShortcutKeysUI.cs (2)
231Size resetButtonSize = (Size)resources.GetObject("btnReset.Size")!;
System\Windows\Forms\Design\TabOrder.cs (2)
256var sz = Size.Ceiling(graphics.MeasureString(str, font));
System\Windows\Forms\Design\ToolStripItemBehavior.cs (1)
972Size dragSize = new(1, 1);
System\Windows\Forms\Design\ToolStripTemplateNode.cs (2)
1679public override Size GetPreferredSize(Size proposedSize)
System\Windows\Forms\Design\UserControlDocumentDesigner.cs (1)
26private Size Size
System\Windows\Forms\Design\VsPropertyGrid.cs (1)
10private static readonly Size s_defaultIconSize = new(16, 16);
System.Windows.Forms.Design.Tests (18)
System\ComponentModel\Design\ByteViewerTests.cs (10)
7using Size = System.Drawing.Size; 24Assert.Equal(Size.Empty, control.AutoScrollMargin); 25Assert.Equal(Size.Empty, control.AutoScrollMinSize); 60Assert.Equal(Size.Empty, control.DefaultMaximumSize); 61Assert.Equal(Size.Empty, control.DefaultMinimumSize); 98Assert.Equal(Size.Empty, control.MaximumSize); 99Assert.Equal(Size.Empty, control.MinimumSize); 1022public new Size DefaultMaximumSize => base.DefaultMaximumSize; 1024public new Size DefaultMinimumSize => base.DefaultMinimumSize; 1028public new Size DefaultSize => base.DefaultSize;
System\Drawing\Design\ToolboxItemTests.cs (1)
1335public void ToolboxItem_Initialize_TypeWithAttributes_Success(Type type, Size expectedOriginalBitmapSize)
System\Windows\Forms\Design\DesignerOptionsTests.cs (2)
56public void DesignerOptions_GridSize_Set_GetReturnsExpected(Size value, Size expected)
System\Windows\Forms\Design\ImageListActionListTests.cs (2)
54Size size = new(16, 16); 61Size size = new(32, 32);
System\Windows\Forms\Design\InheritedPropertyDescriptorTests.cs (3)
17Size size = (Size)inheritedPropertyDescriptor.GetValue(control); 21size = (Size)inheritedPropertyDescriptor.GetValue(control);
System.Windows.Forms.Primitives (19)
System\Windows\Forms\Internals\ScaleHelper.cs (15)
31private static Size? s_logicalSmallSystemIconSize; 127/// <inheritdoc cref="ScaleToSize(Bitmap, Size, bool, bool)"/> 128internal static Bitmap CopyAndScaleToSize(Bitmap bitmap, Size desiredSize) 140private static Bitmap ScaleToSize(Bitmap bitmap, Size desiredSize, bool disposeBitmap = false, bool alwaysCopy = false) 142Size originalSize = bitmap.Size; 298/// Scales a logical (100%) <see cref="Size"/> value to the specified DPI. 300/// <param name="logicalSize"><see cref="Size"/> in logical units (pixels at 100%).</param> 301internal static Size ScaleToDpi(Size logicalSize, int dpi) => dpi == OneHundredPercentLogicalDpi 305internal static Size SystemIconSize => new( 309internal static Size LogicalSmallSystemIconSize => s_logicalSmallSystemIconSize ??= OsVersion.IsWindows10_1607OrGreater() 319GetIconResourceAsBestMatchBitmap(type, resource, Size.Empty); 330internal static Bitmap GetIconResourceAsBitmap(Type type, string resource, Size size) 346internal static Bitmap GetIconResourceAsBestMatchBitmap(Stream resourceStream, Size size) 357internal static Bitmap GetIconResourceAsBestMatchBitmap(Type type, string resource, Size size)
System\Windows\Forms\Padding.cs (3)
128public readonly Size Size => new(Horizontal, Vertical); 151/// Contracts a <see cref="Drawing.Size"/> by another <see cref="Drawing.Size"/>.
Windows\Win32\PInvoke.GetTextExtentPoint32.cs (1)
11public static unsafe BOOL GetTextExtentPoint32W<T>(T hdc, string lpString, int c, Size size) where T : IHandle<HDC>
System.Windows.Forms.Primitives.Tests (1)
Interop\Mocks\MockCursor.cs (1)
39public Size Size => SystemInformation.CursorSize;
System.Windows.Forms.Primitives.TestUtilities (3)
Metafiles\RecordTypes\ENHMETAHEADER.cs (3)
31public Size szlDevice; // Size of the reference device in pixels 32public Size szlMillimeters; // Size of the reference device in millimeters 43public Size szlMicrometers; // Size of the reference device in micrometers
System.Windows.Forms.Tests (1496)
DpiHelperTests.cs (2)
22public void DpiHelper_LogicalToDeviceUnitsSize(Size value) 24Size expected = new(
System\Windows\Forms\AccessibleObjects\MenuStrip.MenuStripAccessibleObjectTests.cs (65)
182Size horizontalSize = new(300, 30); 183Size verticalSize = new(30, 300); 198Size horizontalSize = new(300, 30); 199Size verticalSize = new(30, 300); 228public void MenuStripAccessibleObject_FragmentNavigate_FirstChild_ReturnsExpected(ToolStripGripStyle grip, ToolStripLayoutStyle layout, DockStyle? dock, Size size, bool canOverflow) 240public void MenuStripAccessibleObject_FragmentNavigate_FirstChild_ReturnsExpected_IfToolStripIsEmpty(ToolStripGripStyle grip, ToolStripLayoutStyle layout, DockStyle? dock, Size size, bool canOverflow) 251Size horizontalSize = new(300, 30); 252Size verticalSize = new(30, 300); 267public void MenuStripAccessibleObject_FragmentNavigate_FirstChild_ReturnsExpected_IfGripVisible(ToolStripGripStyle grip, ToolStripLayoutStyle layout, DockStyle? dock, Size size, bool canOverflow) 279public void MenuStripAccessibleObject_FragmentNavigate_FirstChild_ReturnsExpected_IfGripVisibleAndToolStripIsEmpty(ToolStripGripStyle grip, ToolStripLayoutStyle layout, DockStyle? dock, Size size, bool canOverflow) 291Size horizontalOverflowSize = new(10, 25); 292Size verticalOverflowSize = new(25, 10); 302public void MenuStripAccessibleObject_FragmentNavigate_FirstChild_ReturnsExpected_IfOverflow(ToolStripLayoutStyle layout, DockStyle? dock, Size size) 314Size horizontalOverflowSize = new(10, 25); 315Size verticalOverflowSize = new(25, 10); 325public void MenuStripAccessibleObject_FragmentNavigate_FirstChild_ReturnsExpected_IfCanNotOverflowAndStackLayout(ToolStripLayoutStyle layout, DockStyle? dock, Size size) 336Size overflowSize = new(10, 10); 346public void MenuStripAccessibleObject_FragmentNavigate_FirstChild_ReturnsExpected_IfCanNotOverflowAndNonStackLayout(ToolStripGripStyle grip, ToolStripLayoutStyle layout, Size size) 358public void MenuStripAccessibleObject_FragmentNavigate_FirstChild_ReturnsExpected_IfFirstItemSkipped(ToolStripGripStyle grip, ToolStripLayoutStyle layout, DockStyle? dock, Size size, bool canOverflow) 374public void MenuStripAccessibleObject_FragmentNavigate_FirstChild_ReturnsExpected_IfAllItemsSkipped(ToolStripGripStyle grip, ToolStripLayoutStyle layout, DockStyle? dock, Size size, bool canOverflow) 390public void MenuStripAccessibleObject_FragmentNavigate_FirstChild_ReturnsExpected_IfFirstItemAlignedAndStackLayout(ToolStripGripStyle grip, ToolStripLayoutStyle layout, DockStyle? dock, Size size, bool canOverflow) 406public void MenuStripAccessibleObject_FragmentNavigate_FirstChild_ReturnsExpected_IfFirstItemAlignedAndNonStackLayout(ToolStripGripStyle grip, ToolStripLayoutStyle layout, DockStyle? dock, Size size, bool canOverflow) 422public void MenuStripAccessibleObject_FragmentNavigate_FirstChild_ReturnsExpected_IfFirstItemSkippedAndSecondAlignedAndStackLayout(ToolStripGripStyle grip, ToolStripLayoutStyle layout, DockStyle? dock, Size size, bool canOverflow) 440public void MenuStripAccessibleObject_FragmentNavigate_FirstChild_ReturnsExpected_IfFirstItemSkippedAndSecondAlignedAndNonStackLayout(ToolStripGripStyle grip, ToolStripLayoutStyle layout, DockStyle? dock, Size size, bool canOverflow) 458public void MenuStripAccessibleObject_FragmentNavigate_FirstChild_ReturnsExpected_IfAllItemsAlignedAndStackLayout(ToolStripGripStyle grip, ToolStripLayoutStyle layout, DockStyle? dock, Size size, bool canOverflow) 475public void MenuStripAccessibleObject_FragmentNavigate_FirstChild_ReturnsExpected_IfAllItemsAlignedAndNonStackLayout(ToolStripGripStyle grip, ToolStripLayoutStyle layout, DockStyle? dock, Size size, bool canOverflow) 492Size horizontalSize = new(300, 30); 493Size verticalSize = new(30, 300); 509Size horizontalSize = new(300, 30); 510Size verticalSize = new(30, 300); 537public void MenuStripAccessibleObject_FragmentNavigate_LastChild_ReturnsExpected(ToolStripGripStyle grip, ToolStripLayoutStyle layout, DockStyle? dock, Size size, bool canOverflow) 549public void MenuStripAccessibleObject_FragmentNavigate_LastChild_ReturnsExpected_IfToolStripIsEmpty(ToolStripGripStyle grip, ToolStripLayoutStyle layout, DockStyle? dock, Size size, bool canOverflow) 560public void MenuStripAccessibleObject_FragmentNavigate_LastChild_ReturnsExpected_IfToolStripIsEmptyAndGripVisible(ToolStripGripStyle grip, ToolStripLayoutStyle layout, DockStyle? dock, Size size, bool canOverflow) 572public void MenuStripAccessibleObject_FragmentNavigate_LastChild_ReturnsExpected_IfLastItemSkipped(ToolStripGripStyle grip, ToolStripLayoutStyle layout, DockStyle? dock, Size size, bool canOverflow) 588public void MenuStripAccessibleObject_FragmentNavigate_LastChild_ReturnsExpected_IfAllItemsSkipped(ToolStripGripStyle grip, ToolStripLayoutStyle layout, DockStyle? dock, Size size, bool canOverflow) 604public void MenuStripAccessibleObject_FragmentNavigate_LastChild_ReturnsExpected_IfAllItemsSkippedAndGripVisible(ToolStripGripStyle grip, ToolStripLayoutStyle layout, DockStyle? dock, Size size, bool canOverflow) 621public void MenuStripAccessibleObject_FragmentNavigate_LastChild_ReturnsExpected_IfFirstItemAlignedAndStackLayout(ToolStripGripStyle grip, ToolStripLayoutStyle layout, DockStyle? dock, Size size, bool canOverflow) 637public void MenuStripAccessibleObject_FragmentNavigate_LastChild_ReturnsExpected_IfFirstItemAlignedAndNonStackLayout(ToolStripGripStyle grip, ToolStripLayoutStyle layout, DockStyle? dock, Size size, bool canOverflow) 653public void MenuStripAccessibleObject_FragmentNavigate_LastChild_ReturnsExpected_IfFirstItemSkippedAndAlignedAndLastSkippedAndStackLayout(ToolStripGripStyle grip, ToolStripLayoutStyle layout, DockStyle? dock, Size size, bool canOverflow) 675public void MenuStripAccessibleObject_FragmentNavigate_LastChild_ReturnsExpected_IfFirstItemSkippedAndAlignedAndLastSkippedAndNonStackLayout(ToolStripGripStyle grip, ToolStripLayoutStyle layout, DockStyle? dock, Size size, bool canOverflow) 697public void MenuStripAccessibleObject_FragmentNavigate_LastChild_ReturnsExpected_IfAllItemsAlignedAndStackLayout(ToolStripGripStyle grip, ToolStripLayoutStyle layout, DockStyle? dock, Size size, bool canOverflow) 714public void MenuStripAccessibleObject_FragmentNavigate_LastChild_ReturnsExpected_IfAllItemsAlignedAndNonStackLayout(ToolStripGripStyle grip, ToolStripLayoutStyle layout, DockStyle? dock, Size size, bool canOverflow) 731Size horizontalOverflowSize = new(10, 25); 732Size verticalOverflowSize = new(25, 10); 745public void MenuStripAccessibleObject_FragmentNavigate_LastChild_ReturnsExpected_IfOverflow(ToolStripGripStyle grip, ToolStripLayoutStyle layout, DockStyle? dock, Size size) 757Size horizontalOverflowSize = new(60, 30); 758Size horizontalOverflowGripSize = new(70, 30); 759Size verticalOverflowSize = new(30, 30); 760Size verticalOverflowGripSize = new(30, 40); 761Size bothOverflowSize = new(25, 25); 784public void MenuStripAccessibleObject_FragmentNavigate_LastChild_ReturnsExpected_IfCannotOverflow(ToolStripGripStyle grip, ToolStripLayoutStyle layout, DockStyle? dock, Size size) 796Size horizontalOverflowSize = new(60, 30); 797Size horizontalOverflowGripSize = new(70, 30); 798Size verticalOverflowSize = new(30, 55); 799Size verticalOverflowGripSize = new(30, 65); 800Size bothOverflowSize = new(28, 28); 823public void MenuStripAccessibleObject_FragmentNavigate_LastChild_ReturnsExpected_IfCannotOverflowAndItemSkipped(ToolStripGripStyle grip, ToolStripLayoutStyle layout, DockStyle? dock, Size size) 839Size horizontalOverflowSize = new(60, 30); 840Size horizontalOverflowGripSize = new(70, 30); 841Size verticalOverflowSize = new(30, 70); 842Size verticalOverflowGripSize = new(30, 60); 859public void MenuStripAccessibleObject_FragmentNavigate_LastChild_ReturnsExpected_IfCannotOverflowAndFirstItemAlignedAndStackLayout(ToolStripGripStyle grip, ToolStripLayoutStyle layout, DockStyle? dock, Size size) 873Size overflowSize = new(30, 40); 884public void MenuStripAccessibleObject_FragmentNavigate_LastChild_ReturnsExpected_IfCannotOverflowAndFirstItemAlignedAndNonStackLayout(ToolStripGripStyle grip, ToolStripLayoutStyle layout, DockStyle? dock, Size size) 900Size? size = null,
System\Windows\Forms\AccessibleObjects\StatusStrip.StatusStripAccessibleObjectTests.cs (66)
162Size horizontalSize = new(300, 30); 163Size verticalSize = new(70, 300); 178Size horizontalSize = new(300, 30); 179Size verticalSize = new(70, 300); 208public void StatusStripAccessibleObject_FragmentNavigate_FirstChild_ReturnsExpected(ToolStripGripStyle grip, ToolStripLayoutStyle layout, DockStyle? dock, Size size, bool canOverflow) 220public void StatusStripAccessibleObject_FragmentNavigate_FirstChild_ReturnsExpected_IfToolStripIsEmpty(ToolStripGripStyle grip, ToolStripLayoutStyle layout, DockStyle? dock, Size size, bool canOverflow) 231Size horizontalSize = new(300, 30); 232Size verticalSize = new(70, 300); 247public void StatusStripAccessibleObject_FragmentNavigate_FirstChild_ReturnsExpected_IfGripVisible(ToolStripGripStyle grip, ToolStripLayoutStyle layout, DockStyle? dock, Size size, bool canOverflow) 259public void StatusStripAccessibleObject_FragmentNavigate_FirstChild_ReturnsExpected_IfGripVisibleAndToolStripIsEmpty(ToolStripGripStyle grip, ToolStripLayoutStyle layout, DockStyle? dock, Size size, bool canOverflow) 271Size horizontalOverflowSize = new(10, 25); 272Size verticalOverflowSize = new(25, 10); 282public void StatusStripAccessibleObject_FragmentNavigate_FirstChild_ReturnsExpected_IfOverflow(ToolStripLayoutStyle layout, DockStyle? dock, Size size) 294Size horizontalOverflowSize = new(10, 25); 295Size verticalOverflowSize = new(25, 10); 305public void StatusStripAccessibleObject_FragmentNavigate_FirstChild_ReturnsExpected_IfCanNotOverflowAndStackLayout(ToolStripLayoutStyle layout, DockStyle? dock, Size size) 316Size overflowSize = new(70, 10); 326public void StatusStripAccessibleObject_FragmentNavigate_FirstChild_ReturnsExpected_IfCanNotOverflowAndNonStackLayout(ToolStripGripStyle grip, ToolStripLayoutStyle layout, Size size) 338public void StatusStripAccessibleObject_FragmentNavigate_FirstChild_ReturnsExpected_IfFirstItemSkipped(ToolStripGripStyle grip, ToolStripLayoutStyle layout, DockStyle? dock, Size size, bool canOverflow) 354public void StatusStripAccessibleObject_FragmentNavigate_FirstChild_ReturnsExpected_IfAllItemsSkipped(ToolStripGripStyle grip, ToolStripLayoutStyle layout, DockStyle? dock, Size size, bool canOverflow) 370public void StatusStripAccessibleObject_FragmentNavigate_FirstChild_ReturnsExpected_IfFirstItemAlignedAndStackLayout(ToolStripGripStyle grip, ToolStripLayoutStyle layout, DockStyle? dock, Size size, bool canOverflow) 386public void StatusStripAccessibleObject_FragmentNavigate_FirstChild_ReturnsExpected_IfFirstItemAlignedAndNonStackLayout(ToolStripGripStyle grip, ToolStripLayoutStyle layout, DockStyle? dock, Size size, bool canOverflow) 402public void StatusStripAccessibleObject_FragmentNavigate_FirstChild_ReturnsExpected_IfFirstItemSkippedAndSecondAlignedAndStackLayout(ToolStripGripStyle grip, ToolStripLayoutStyle layout, DockStyle? dock, Size size, bool canOverflow) 420public void StatusStripAccessibleObject_FragmentNavigate_FirstChild_ReturnsExpected_IfFirstItemSkippedAndSecondAlignedAndNonStackLayout(ToolStripGripStyle grip, ToolStripLayoutStyle layout, DockStyle? dock, Size size, bool canOverflow) 438public void StatusStripAccessibleObject_FragmentNavigate_FirstChild_ReturnsExpected_IfAllItemsAlignedAndStackLayout(ToolStripGripStyle grip, ToolStripLayoutStyle layout, DockStyle? dock, Size size, bool canOverflow) 455public void StatusStripAccessibleObject_FragmentNavigate_FirstChild_ReturnsExpected_IfAllItemsAlignedAndNonStackLayout(ToolStripGripStyle grip, ToolStripLayoutStyle layout, DockStyle? dock, Size size, bool canOverflow) 472Size horizontalSize = new(300, 30); 473Size verticalSize = new(70, 300); 489Size horizontalSize = new(300, 30); 490Size verticalSize = new(140, 300); 517public void StatusStripAccessibleObject_FragmentNavigate_LastChild_ReturnsExpected(ToolStripGripStyle grip, ToolStripLayoutStyle layout, DockStyle? dock, Size size, bool canOverflow) 529public void StatusStripAccessibleObject_FragmentNavigate_LastChild_ReturnsExpected_IfToolStripIsEmpty(ToolStripGripStyle grip, ToolStripLayoutStyle layout, DockStyle? dock, Size size, bool canOverflow) 540public void StatusStripAccessibleObject_FragmentNavigate_LastChild_ReturnsExpected_IfToolStripIsEmptyAndGripVisible(ToolStripGripStyle grip, ToolStripLayoutStyle layout, DockStyle? dock, Size size, bool canOverflow) 552public void StatusStripAccessibleObject_FragmentNavigate_LastChild_ReturnsExpected_IfLastItemSkipped(ToolStripGripStyle grip, ToolStripLayoutStyle layout, DockStyle? dock, Size size, bool canOverflow) 568public void StatusStripAccessibleObject_FragmentNavigate_LastChild_ReturnsExpected_IfAllItemsSkipped(ToolStripGripStyle grip, ToolStripLayoutStyle layout, DockStyle? dock, Size size, bool canOverflow) 584public void StatusStripAccessibleObject_FragmentNavigate_LastChild_ReturnsExpected_IfAllItemsSkippedAndGripVisible(ToolStripGripStyle grip, ToolStripLayoutStyle layout, DockStyle? dock, Size size, bool canOverflow) 601public void StatusStripAccessibleObject_FragmentNavigate_LastChild_ReturnsExpected_IfFirstItemAlignedAndStackLayout(ToolStripGripStyle grip, ToolStripLayoutStyle layout, DockStyle? dock, Size size, bool canOverflow) 617public void StatusStripAccessibleObject_FragmentNavigate_LastChild_ReturnsExpected_IfFirstItemAlignedAndNonStackLayout(ToolStripGripStyle grip, ToolStripLayoutStyle layout, DockStyle? dock, Size size, bool canOverflow) 633public void StatusStripAccessibleObject_FragmentNavigate_LastChild_ReturnsExpected_IfFirstItemSkippedAndAlignedAndLastSkippedAndStackLayout(ToolStripGripStyle grip, ToolStripLayoutStyle layout, DockStyle? dock, Size size, bool canOverflow) 655public void StatusStripAccessibleObject_FragmentNavigate_LastChild_ReturnsExpected_IfFirstItemSkippedAndAlignedAndLastSkippedAndNonStackLayout(ToolStripGripStyle grip, ToolStripLayoutStyle layout, DockStyle? dock, Size size, bool canOverflow) 677public void StatusStripAccessibleObject_FragmentNavigate_LastChild_ReturnsExpected_IfAllItemsAlignedAndStackLayout(ToolStripGripStyle grip, ToolStripLayoutStyle layout, DockStyle? dock, Size size, bool canOverflow) 694public void StatusStripAccessibleObject_FragmentNavigate_LastChild_ReturnsExpected_IfAllItemsAlignedAndNonStackLayout(ToolStripGripStyle grip, ToolStripLayoutStyle layout, DockStyle? dock, Size size, bool canOverflow) 711Size horizontalOverflowSize = new(10, 25); 712Size verticalOverflowSize = new(25, 10); 725public void StatusStripAccessibleObject_FragmentNavigate_LastChild_ReturnsExpected_IfOverflow(ToolStripGripStyle grip, ToolStripLayoutStyle layout, DockStyle? dock, Size size) 737Size horizontalOverflowSize = new(70, 30); 738Size horizontalOverflowGripSize = new(80, 30); 739Size verticalOverflowSize = new(80, 55); 740Size verticalOverflowGripSize = new(80, 65); 741Size bothOverflowSize = new(70, 25); 764public void StatusStripAccessibleObject_FragmentNavigate_LastChild_ReturnsExpected_IfCannotOverflow(ToolStripGripStyle grip, ToolStripLayoutStyle layout, DockStyle? dock, Size size) 776Size horizontalOverflowSize = new(70, 30); 777Size horizontalOverflowGripSize = new(80, 30); 778Size verticalOverflowSize = new(30, 55); 779Size verticalOverflowGripSize = new(30, 65); 780Size bothOverflowSize = new(70, 30); 803public void StatusStripAccessibleObject_FragmentNavigate_LastChild_ReturnsExpected_IfCannotOverflowAndItemSkipped(ToolStripGripStyle grip, ToolStripLayoutStyle layout, DockStyle? dock, Size size) 819Size horizontalOverflowSize = new(70, 30); 820Size horizontalOverflowGripSize = new(80, 30); 821Size verticalOverflowSize = new(60, 60); 822Size verticalOverflowGripSize = new(70, 70); 839public void StatusStripAccessibleObject_FragmentNavigate_LastChild_ReturnsExpected_IfCannotOverflowAndFirstItemAlignedAndStackLayout(ToolStripGripStyle grip, ToolStripLayoutStyle layout, DockStyle? dock, Size size) 853Size horizontalOverflowSize = new(115, 60); 854Size verticalOverflowSize = new(70, 60); 865public void StatusStripAccessibleObject_FragmentNavigate_LastChild_ReturnsExpected_IfCannotOverflowAndFirstItemAlignedAndNonStackLayout(ToolStripGripStyle grip, ToolStripLayoutStyle layout, DockStyle? dock, Size size) 881Size? size = null,
System\Windows\Forms\AccessibleObjects\ToolStripAccessibleObjectTests.cs (65)
175Size horizontalSize = new(300, 30); 176Size verticalSize = new(30, 300); 191Size horizontalSize = new(300, 30); 192Size verticalSize = new(30, 300); 221public void ToolStripAccessibleObject_FragmentNavigate_FirstChild_ReturnsExpected(ToolStripGripStyle grip, ToolStripLayoutStyle layout, DockStyle? dock, Size size, bool canOverflow) 233public void ToolStripAccessibleObject_FragmentNavigate_FirstChild_ReturnsExpected_IfToolStripIsEmpty(ToolStripGripStyle grip, ToolStripLayoutStyle layout, DockStyle? dock, Size size, bool canOverflow) 244Size horizontalSize = new(300, 30); 245Size verticalSize = new(30, 300); 260public void ToolStripAccessibleObject_FragmentNavigate_FirstChild_ReturnsExpected_IfGripVisible(ToolStripGripStyle grip, ToolStripLayoutStyle layout, DockStyle? dock, Size size, bool canOverflow) 272public void ToolStripAccessibleObject_FragmentNavigate_FirstChild_ReturnsExpected_IfGripVisibleAndToolStripIsEmpty(ToolStripGripStyle grip, ToolStripLayoutStyle layout, DockStyle? dock, Size size, bool canOverflow) 284Size horizontalOverflowSize = new(10, 25); 285Size verticalOverflowSize = new(25, 10); 295public void ToolStripAccessibleObject_FragmentNavigate_FirstChild_ReturnsExpected_IfOverflow(ToolStripLayoutStyle layout, DockStyle? dock, Size size) 307Size horizontalOverflowSize = new(10, 25); 308Size verticalOverflowSize = new(25, 10); 318public void ToolStripAccessibleObject_FragmentNavigate_FirstChild_ReturnsExpected_IfCanNotOverflowAndStackLayout(ToolStripLayoutStyle layout, DockStyle? dock, Size size) 329Size overflowSize = new(10, 10); 339public void ToolStripAccessibleObject_FragmentNavigate_FirstChild_ReturnsExpected_IfCanNotOverflowAndNonStackLayout(ToolStripGripStyle grip, ToolStripLayoutStyle layout, Size size) 351public void ToolStripAccessibleObject_FragmentNavigate_FirstChild_ReturnsExpected_IfFirstItemSkipped(ToolStripGripStyle grip, ToolStripLayoutStyle layout, DockStyle? dock, Size size, bool canOverflow) 367public void ToolStripAccessibleObject_FragmentNavigate_FirstChild_ReturnsExpected_IfAllItemsSkipped(ToolStripGripStyle grip, ToolStripLayoutStyle layout, DockStyle? dock, Size size, bool canOverflow) 383public void ToolStripAccessibleObject_FragmentNavigate_FirstChild_ReturnsExpected_IfFirstItemAlignedAndStackLayout(ToolStripGripStyle grip, ToolStripLayoutStyle layout, DockStyle? dock, Size size, bool canOverflow) 399public void ToolStripAccessibleObject_FragmentNavigate_FirstChild_ReturnsExpected_IfFirstItemAlignedAndNonStackLayout(ToolStripGripStyle grip, ToolStripLayoutStyle layout, DockStyle? dock, Size size, bool canOverflow) 415public void ToolStripAccessibleObject_FragmentNavigate_FirstChild_ReturnsExpected_IfFirstItemSkippedAndSecondAlignedAndStackLayout(ToolStripGripStyle grip, ToolStripLayoutStyle layout, DockStyle? dock, Size size, bool canOverflow) 433public void ToolStripAccessibleObject_FragmentNavigate_FirstChild_ReturnsExpected_IfFirstItemSkippedAndSecondAlignedAndNonStackLayout(ToolStripGripStyle grip, ToolStripLayoutStyle layout, DockStyle? dock, Size size, bool canOverflow) 451public void ToolStripAccessibleObject_FragmentNavigate_FirstChild_ReturnsExpected_IfAllItemsAlignedAndStackLayout(ToolStripGripStyle grip, ToolStripLayoutStyle layout, DockStyle? dock, Size size, bool canOverflow) 468public void ToolStripAccessibleObject_FragmentNavigate_FirstChild_ReturnsExpected_IfAllItemsAlignedAndNonStackLayout(ToolStripGripStyle grip, ToolStripLayoutStyle layout, DockStyle? dock, Size size, bool canOverflow) 485Size horizontalSize = new(300, 30); 486Size verticalSize = new(30, 300); 502Size horizontalSize = new(300, 30); 503Size verticalSize = new(30, 300); 530public void ToolStripAccessibleObject_FragmentNavigate_LastChild_ReturnsExpected(ToolStripGripStyle grip, ToolStripLayoutStyle layout, DockStyle? dock, Size size, bool canOverflow) 542public void ToolStripAccessibleObject_FragmentNavigate_LastChild_ReturnsExpected_IfToolStripIsEmpty(ToolStripGripStyle grip, ToolStripLayoutStyle layout, DockStyle? dock, Size size, bool canOverflow) 553public void ToolStripAccessibleObject_FragmentNavigate_LastChild_ReturnsExpected_IfToolStripIsEmptyAndGripVisible(ToolStripGripStyle grip, ToolStripLayoutStyle layout, DockStyle? dock, Size size, bool canOverflow) 565public void ToolStripAccessibleObject_FragmentNavigate_LastChild_ReturnsExpected_IfLastItemSkipped(ToolStripGripStyle grip, ToolStripLayoutStyle layout, DockStyle? dock, Size size, bool canOverflow) 581public void ToolStripAccessibleObject_FragmentNavigate_LastChild_ReturnsExpected_IfAllItemsSkipped(ToolStripGripStyle grip, ToolStripLayoutStyle layout, DockStyle? dock, Size size, bool canOverflow) 597public void ToolStripAccessibleObject_FragmentNavigate_LastChild_ReturnsExpected_IfAllItemsSkippedAndGripVisible(ToolStripGripStyle grip, ToolStripLayoutStyle layout, DockStyle? dock, Size size, bool canOverflow) 614public void ToolStripAccessibleObject_FragmentNavigate_LastChild_ReturnsExpected_IfFirstItemAlignedAndStackLayout(ToolStripGripStyle grip, ToolStripLayoutStyle layout, DockStyle? dock, Size size, bool canOverflow) 630public void ToolStripAccessibleObject_FragmentNavigate_LastChild_ReturnsExpected_IfFirstItemAlignedAndNonStackLayout(ToolStripGripStyle grip, ToolStripLayoutStyle layout, DockStyle? dock, Size size, bool canOverflow) 646public void ToolStripAccessibleObject_FragmentNavigate_LastChild_ReturnsExpected_IfFirstItemSkippedAndAlignedAndLastSkippedAndStackLayout(ToolStripGripStyle grip, ToolStripLayoutStyle layout, DockStyle? dock, Size size, bool canOverflow) 668public void ToolStripAccessibleObject_FragmentNavigate_LastChild_ReturnsExpected_IfFirstItemSkippedAndAlignedAndLastSkippedAndNonStackLayout(ToolStripGripStyle grip, ToolStripLayoutStyle layout, DockStyle? dock, Size size, bool canOverflow) 690public void ToolStripAccessibleObject_FragmentNavigate_LastChild_ReturnsExpected_IfAllItemsAlignedAndStackLayout(ToolStripGripStyle grip, ToolStripLayoutStyle layout, DockStyle? dock, Size size, bool canOverflow) 707public void ToolStripAccessibleObject_FragmentNavigate_LastChild_ReturnsExpected_IfAllItemsAlignedAndNonStackLayout(ToolStripGripStyle grip, ToolStripLayoutStyle layout, DockStyle? dock, Size size, bool canOverflow) 724Size horizontalOverflowSize = new(10, 25); 725Size verticalOverflowSize = new(25, 10); 738public void ToolStripAccessibleObject_FragmentNavigate_LastChild_ReturnsExpected_IfOverflow(ToolStripGripStyle grip, ToolStripLayoutStyle layout, DockStyle? dock, Size size) 750Size horizontalOverflowSize = new(30, 30); 751Size horizontalOverflowGripSize = new(40, 30); 752Size verticalOverflowSize = new(30, 30); 753Size verticalOverflowGripSize = new(30, 40); 754Size bothOverflowSize = new(25, 25); 777public void ToolStripAccessibleObject_FragmentNavigate_LastChild_ReturnsExpected_IfCannotOverflow(ToolStripGripStyle grip, ToolStripLayoutStyle layout, DockStyle? dock, Size size) 789Size horizontalOverflowSize = new(40, 30); 790Size horizontalOverflowGripSize = new(50, 30); 791Size verticalOverflowSize = new(30, 55); 792Size verticalOverflowGripSize = new(30, 65); 793Size bothOverflowSize = new(28, 28); 816public void ToolStripAccessibleObject_FragmentNavigate_LastChild_ReturnsExpected_IfCannotOverflowAndItemSkipped(ToolStripGripStyle grip, ToolStripLayoutStyle layout, DockStyle? dock, Size size) 832Size horizontalOverflowSize = new(60, 30); 833Size horizontalOverflowGripSize = new(70, 30); 834Size verticalOverflowSize = new(30, 70); 835Size verticalOverflowGripSize = new(30, 60); 852public void ToolStripAccessibleObject_FragmentNavigate_LastChild_ReturnsExpected_IfCannotOverflowAndFirstItemAlignedAndStackLayout(ToolStripGripStyle grip, ToolStripLayoutStyle layout, DockStyle? dock, Size size) 866Size overflowSize = new(30, 40); 877public void ToolStripAccessibleObject_FragmentNavigate_LastChild_ReturnsExpected_IfCannotOverflowAndFirstItemAlignedAndNonStackLayout(ToolStripGripStyle grip, ToolStripLayoutStyle layout, DockStyle? dock, Size size) 941Size? size = null,
System\Windows\Forms\AxHostTests.cs (12)
15using Size = System.Drawing.Size; 62Assert.Equal(Size.Empty, control.DefaultMaximumSize); 63Assert.Equal(Size.Empty, control.DefaultMinimumSize); 90Assert.Equal(Size.Empty, control.MaximumSize); 91Assert.Equal(Size.Empty, control.MinimumSize); 156Assert.Equal(Size.Empty, control.DefaultMaximumSize); 157Assert.Equal(Size.Empty, control.DefaultMinimumSize); 184Assert.Equal(Size.Empty, control.MaximumSize); 185Assert.Equal(Size.Empty, control.MinimumSize); 3180public new Size DefaultMaximumSize => base.DefaultMaximumSize; 3182public new Size DefaultMinimumSize => base.DefaultMinimumSize; 3186public new Size DefaultSize => base.DefaultSize;
System\Windows\Forms\BinaryFormatUtilitiesTests.cs (2)
905public Size? Size = new(1, 2); 931public void Equals(TestData other, Size bitmapSize)
System\Windows\Forms\ButtonBaseTests.cs (11)
11using Size = System.Drawing.Size; 53Assert.Equal(Size.Empty, control.DefaultMaximumSize); 54Assert.Equal(Size.Empty, control.DefaultMinimumSize); 88Assert.Equal(Size.Empty, control.MaximumSize); 89Assert.Equal(Size.Empty, control.MinimumSize); 4997yield return new object[] { flatStyle, Size.Empty }; 5010public void ButtonBase_GetPreferredSize_Invoke_ThrowsNullReferenceException(FlatStyle flatStyle, Size proposedSize) 5029public void ButtonBase_GetPreferredSize_InvokeWithHandle_ThrowsNullReferenceException(FlatStyle flatStyle, Size proposedSize) 9283public new Size DefaultMaximumSize => base.DefaultMaximumSize; 9285public new Size DefaultMinimumSize => base.DefaultMinimumSize; 9289public new Size DefaultSize => base.DefaultSize;
System\Windows\Forms\ButtonTests.cs (81)
12using Size = System.Drawing.Size; 55Assert.Equal(Size.Empty, control.DefaultMaximumSize); 56Assert.Equal(Size.Empty, control.DefaultMinimumSize); 91Assert.Equal(Size.Empty, control.MaximumSize); 92Assert.Equal(Size.Empty, control.MinimumSize); 596Assert.Equal(new Size(75, 24), control.GetPreferredSize(Size.Empty)); 599Size newSize = TextRenderer.MeasureText(control.Text, control.Font); 601Assert.Equal(new Size(75, 24), control.GetPreferredSize(Size.Empty)); 696Size oldSize = TextRenderer.MeasureText(control.Text, control.Font); 697Assert.Equal(oldSize + new Size(14, 9), control.GetPreferredSize(Size.Empty)); 700Size newSize = TextRenderer.MeasureText(control.Text, font); 702Assert.Equal(newSize + new Size(14, 9), control.GetPreferredSize(Size.Empty)); 951Size oldSize = TextRenderer.MeasureText(control.Text, control.Font); 952Assert.Equal(oldSize + new Size(14, 9), control.GetPreferredSize(Size.Empty)); 955Size newSize = TextRenderer.MeasureText("NewText", control.Font); 957Assert.Equal(newSize + new Size(14, 9), control.GetPreferredSize(Size.Empty)); 1167yield return new object[] { AutoSizeMode.GrowAndShrink, Size.Empty, new Size(14, 9) }; 1180yield return new object[] { AutoSizeMode.GrowOnly, Size.Empty, new Size(75, 23) }; 1197public void Button_GetPreferredSize_InvokeSystem_ReturnsExpected(AutoSizeMode autoSizeMode, Size proposedSize, Size expected) 1204Size size = control.GetPreferredSize(proposedSize); 1216yield return new object[] { AutoSizeMode.GrowAndShrink, Size.Empty, new Size(18, 15) }; 1229yield return new object[] { AutoSizeMode.GrowOnly, Size.Empty, new Size(75, 23) }; 1246public void Button_GetPreferredSize_InvokeSystemWithPadding_ReturnsExpected(AutoSizeMode autoSizeMode, Size proposedSize, Size expected) 1254Size size = control.GetPreferredSize(proposedSize); 1266yield return new object[] { AutoSizeMode.GrowAndShrink, Size.Empty, new Size(18, 15) }; 1279yield return new object[] { AutoSizeMode.GrowOnly, Size.Empty, new Size(18, 15) }; 1296public void Button_GetPreferredSize_InvokeSystemWithPaddingSmallSize_ReturnsExpected(AutoSizeMode autoSizeMode, Size proposedSize, Size expected) 1305Size size = control.GetPreferredSize(proposedSize); 1317yield return new object[] { Size.Empty }; 1329public void Button_GetPreferredSize_InvokeSystemGrowOnlyWithText_ReturnsExpected(Size proposedSize) 1338Size minSize = TextRenderer.MeasureText(control.Text, control.Font); 1340Size size = control.GetPreferredSize(proposedSize); 1353public void Button_GetPreferredSize_InvokeSystemGrowAndShrinkWithText_ReturnsExpected(Size proposedSize) 1362Size minSize = TextRenderer.MeasureText(control.Text, control.Font); 1364Size size = control.GetPreferredSize(proposedSize); 1376yield return new object[] { FlatStyle.Flat, AutoSizeMode.GrowAndShrink, Size.Empty, new Size(8, 8) }; 1389yield return new object[] { FlatStyle.Popup, AutoSizeMode.GrowAndShrink, Size.Empty, new Size(6, 6) }; 1402yield return new object[] { FlatStyle.Standard, AutoSizeMode.GrowAndShrink, Size.Empty, new Size(6, 6) }; 1417yield return new object[] { flatStyle, AutoSizeMode.GrowOnly, Size.Empty, new Size(75, 23) }; 1435public void Button_GetPreferredSize_InvokeFlat_ReturnsExpected(FlatStyle flatStyle, AutoSizeMode autoSizeMode, Size proposedSize, Size expected) 1442Size size = control.GetPreferredSize(proposedSize); 1454yield return new object[] { FlatStyle.Flat, AutoSizeMode.GrowAndShrink, Size.Empty, new Size(12, 14) }; 1467yield return new object[] { FlatStyle.Popup, AutoSizeMode.GrowAndShrink, Size.Empty, new Size(10, 12) }; 1480yield return new object[] { FlatStyle.Standard, AutoSizeMode.GrowAndShrink, Size.Empty, new Size(10, 12) }; 1495yield return new object[] { flatStyle, AutoSizeMode.GrowOnly, Size.Empty, new Size(75, 23) }; 1513public void Button_GetPreferredSize_InvokeFlatWithPadding_ReturnsExpected(FlatStyle flatStyle, AutoSizeMode autoSizeMode, Size proposedSize, Size expected) 1521Size size = control.GetPreferredSize(proposedSize); 1533yield return new object[] { FlatStyle.Flat, AutoSizeMode.GrowAndShrink, Size.Empty, new Size(12, 14) }; 1546yield return new object[] { FlatStyle.Flat, AutoSizeMode.GrowOnly, Size.Empty, new Size(12, 14) }; 1561yield return new object[] { flatStyle, AutoSizeMode.GrowAndShrink, Size.Empty, new Size(10, 12) }; 1574yield return new object[] { flatStyle, AutoSizeMode.GrowOnly, Size.Empty, new Size(10, 12) }; 1592public void Button_GetPreferredSize_InvokeFlatWithPaddingSmallSize_ReturnsExpected(FlatStyle flatStyle, AutoSizeMode autoSizeMode, Size proposedSize, Size expected) 1601Size size = control.GetPreferredSize(proposedSize); 1613yield return new object[] { Size.Empty }; 1625public void Button_GetPreferredSize_InvokeFlatGrowOnlyWithText_ReturnsExpected(Size proposedSize) 1634Size minSize = TextRenderer.MeasureText(control.Text, control.Font); 1636Size size = control.GetPreferredSize(proposedSize); 1649public void Button_GetPreferredSize_InvokeFlatGrowAndShrinkWithText_ReturnsExpected(Size proposedSize) 1658Size minSize = TextRenderer.MeasureText(control.Text, control.Font); 1660Size size = control.GetPreferredSize(proposedSize); 1673public void Button_GetPreferredSize_InvokePopupGrowOnlyWithText_ReturnsExpected(Size proposedSize) 1682Size minSize = TextRenderer.MeasureText(control.Text, control.Font); 1684Size size = control.GetPreferredSize(proposedSize); 1697public void Button_GetPreferredSize_InvokePopupGrowAndShrinkWithText_ReturnsExpected(Size proposedSize) 1706Size minSize = TextRenderer.MeasureText(control.Text, control.Font); 1708Size size = control.GetPreferredSize(proposedSize); 1721public void Button_GetPreferredSize_InvokeStandardGrowOnlyWithText_ReturnsExpected(Size proposedSize) 1730Size minSize = TextRenderer.MeasureText(control.Text, control.Font); 1732Size size = control.GetPreferredSize(proposedSize); 1745public void Button_GetPreferredSize_InvokeStandardGrowAndShrinkWithText_ReturnsExpected(Size proposedSize) 1754Size minSize = TextRenderer.MeasureText(control.Text, control.Font); 1756Size size = control.GetPreferredSize(proposedSize); 3691public new Size DefaultMaximumSize => base.DefaultMaximumSize; 3693public new Size DefaultMinimumSize => base.DefaultMinimumSize; 3697public new Size DefaultSize => base.DefaultSize;
System\Windows\Forms\CheckBoxTests.cs (8)
10using Size = System.Drawing.Size; 57Assert.Equal(Size.Empty, control.DefaultMaximumSize); 58Assert.Equal(Size.Empty, control.DefaultMinimumSize); 92Assert.Equal(Size.Empty, control.MaximumSize); 93Assert.Equal(Size.Empty, control.MinimumSize); 646public new Size DefaultMaximumSize => base.DefaultMaximumSize; 648public new Size DefaultMinimumSize => base.DefaultMinimumSize; 652public new Size DefaultSize => base.DefaultSize;
System\Windows\Forms\ComboBox.ComboBoxUiaTextProviderTests.cs (9)
432public void ComboBoxUiaTextProvider_GetPositionFromChar_ReturnsCorrectValue(ComboBoxStyle dropdownStyle, Size size, string text, int charIndex, Point expectedPoint) 459public void ComboBoxUiaTextProvider_GetPositionFromChar_ReturnsEmpty_WithoutHandle(ComboBoxStyle dropDownStyle, Size size, string text, int charIndex) 498public void ComboBoxUiaTextProvider_GetPositionFromCharForUpperRightCorner_ReturnsCorrectValue(ComboBoxStyle dropDownStyle, Size size, string text, int charIndex, Point expectedPoint) 536public void ComboBoxUiaTextProvider_GetPositionFromCharForUpperRightCorner_ReturnsMinusOne_WithoutHandle(ComboBoxStyle dropDownStyle, Size size, string text, int charIndex) 572public void ComboBoxUiaTextProvider_GetFormattingRectangle_ReturnsCorrectValue(ComboBoxStyle dropDownStyle, Size size, Rectangle expectedRectangle) 777public void ComboBoxUiaTextProvider_GetVisibleRangePoints_ForSinglelineComboBox_ReturnsCorrectValue(ComboBoxStyle dropDownStyle, Size size, int expectedStart, int expectedEnd) 817public void ComboBoxUiaTextProvider_GetVisibleRangePoints_ReturnsZeros_WithoutHandle(ComboBoxStyle dropDownStyle, Size size) 845public void ComboBoxUiaTextProvider_GetVisibleRanges_ReturnsCorrectValue(ComboBoxStyle dropDownStyle, Size size) 863public void ComboBoxUiaTextProvider_GetVisibleRanges_ReturnsNull_WithoutHandle(ComboBoxStyle dropDownStyle, Size size)
System\Windows\Forms\ComboBoxTests.cs (8)
12using Size = System.Drawing.Size; 60Assert.Equal(Size.Empty, control.DefaultMaximumSize); 61Assert.Equal(Size.Empty, control.DefaultMinimumSize); 102Assert.Equal(Size.Empty, control.MaximumSize); 103Assert.Equal(Size.Empty, control.MinimumSize); 2835public new Size DefaultMaximumSize => base.DefaultMaximumSize; 2837public new Size DefaultMinimumSize => base.DefaultMinimumSize; 2841public new Size DefaultSize => base.DefaultSize;
System\Windows\Forms\ContainerControlTests.cs (17)
9using Size = System.Drawing.Size; 29Assert.Equal(Size.Empty, control.AutoScrollMargin); 31Assert.Equal(Size.Empty, control.AutoScrollMinSize); 49Assert.Equal(Size.Empty, control.ClientSize); 61Assert.Equal(Size.Empty, control.DefaultMaximumSize); 62Assert.Equal(Size.Empty, control.DefaultMinimumSize); 64Assert.Equal(Size.Empty, control.DefaultSize); 96Assert.Equal(Size.Empty, control.MaximumSize); 97Assert.Equal(Size.Empty, control.MinimumSize); 100Assert.Equal(Size.Empty, control.PreferredSize); 110Assert.Equal(Size.Empty, control.Size); 181public void ContainerControl_AutoScaleDimensions_Set_GetReturnsExpected(Size value) 198public void ContainerControl_AutoScaleDimensions_SetWithChildren_GetReturnsExpected(Size value) 214public void ContainerControl_AutoScaleDimensions_SetInvalid_ThrowsArgumentOutOfRangeException(Size value) 1425public new Size DefaultMaximumSize => base.DefaultMaximumSize; 1427public new Size DefaultMinimumSize => base.DefaultMinimumSize; 1431public new Size DefaultSize => base.DefaultSize;
System\Windows\Forms\ControlPaintTests.cs (1)
1278public void ControlPaint_DrawGrid_Invoke_Success(Rectangle area, Size pixelsBetweenDots, Color backColor)
System\Windows\Forms\ControlTests.cs (40)
7using Size = System.Drawing.Size; 36Assert.Equal(Size.Empty, control.ClientSize); 48Assert.Equal(Size.Empty, control.DefaultMaximumSize); 49Assert.Equal(Size.Empty, control.DefaultMinimumSize); 51Assert.Equal(Size.Empty, control.DefaultSize); 74Assert.Equal(Size.Empty, control.MaximumSize); 75Assert.Equal(Size.Empty, control.MinimumSize); 78Assert.Equal(Size.Empty, control.PreferredSize); 88Assert.Equal(Size.Empty, control.Size); 125Assert.Equal(Size.Empty, control.ClientSize); 137Assert.Equal(Size.Empty, control.DefaultMaximumSize); 138Assert.Equal(Size.Empty, control.DefaultMinimumSize); 140Assert.Equal(Size.Empty, control.DefaultSize); 163Assert.Equal(Size.Empty, control.MaximumSize); 164Assert.Equal(Size.Empty, control.MinimumSize); 167Assert.Equal(Size.Empty, control.PreferredSize); 177Assert.Equal(Size.Empty, control.Size); 233Assert.Equal(Size.Empty, control.DefaultMaximumSize); 234Assert.Equal(Size.Empty, control.DefaultMinimumSize); 236Assert.Equal(Size.Empty, control.DefaultSize); 259Assert.Equal(Size.Empty, control.MaximumSize); 260Assert.Equal(Size.Empty, control.MinimumSize); 318Assert.Equal(Size.Empty, control.ClientSize); 329Assert.Equal(Size.Empty, control.DefaultMaximumSize); 330Assert.Equal(Size.Empty, control.DefaultMinimumSize); 332Assert.Equal(Size.Empty, control.DefaultSize); 355Assert.Equal(Size.Empty, control.MaximumSize); 356Assert.Equal(Size.Empty, control.MinimumSize); 359Assert.Equal(Size.Empty, control.PreferredSize); 369Assert.Equal(Size.Empty, control.Size); 425Assert.Equal(Size.Empty, control.DefaultMaximumSize); 426Assert.Equal(Size.Empty, control.DefaultMinimumSize); 428Assert.Equal(Size.Empty, control.DefaultSize); 451Assert.Equal(Size.Empty, control.MaximumSize); 452Assert.Equal(Size.Empty, control.MinimumSize); 1158public new Size DefaultMaximumSize => base.DefaultMaximumSize; 1160public new Size DefaultMinimumSize => base.DefaultMinimumSize; 1164public new Size DefaultSize => base.DefaultSize; 1434public new Size SizeFromClientSize(Size clientSize) => base.SizeFromClientSize(clientSize);
System\Windows\Forms\ControlTests.Internals.cs (4)
187Size expectedSize = new(expected, expected); 189Size actualSize = control.ApplySizeConstraints(expected, expected); 196public void Control_ApplySizeConstraintsSize_Invoke_ReturnsExpected(Size expectedSize) 199Size actualSize = control.ApplySizeConstraints(expectedSize);
System\Windows\Forms\ControlTests.Methods.cs (129)
2316yield return new object[] { Size.Empty }; 2325public void Control_GetPreferredSize_Invoke_ReturnsExpected(Size proposedSize) 2328Assert.Equal(Size.Empty, control.GetPreferredSize(proposedSize)); 2332Assert.Equal(Size.Empty, control.GetPreferredSize(proposedSize)); 2338public void Control_GetPreferredSize_InvokeWithBounds_ReturnsExpected(Size proposedSize) 2354yield return new object[] { Size.Empty, Size.Empty, new Size(30, 40), Size.Empty }; 2355yield return new object[] { new Size(10, 20), Size.Empty, new Size(30, 40), new Size(10, 20) }; 2356yield return new object[] { new Size(30, 40), Size.Empty, new Size(30, 40), new Size(30, 40) }; 2357yield return new object[] { new Size(31, 40), Size.Empty, new Size(30, 40), new Size(31, 40) }; 2358yield return new object[] { new Size(30, 41), Size.Empty, new Size(30, 40), new Size(30, 41) }; 2359yield return new object[] { new Size(40, 50), Size.Empty, new Size(30, 40), new Size(40, 50) }; 2360yield return new object[] { Size.Empty, new Size(20, 10), new Size(30, 40), Size.Empty }; 2361yield return new object[] { Size.Empty, new Size(30, 40), new Size(30, 40), Size.Empty }; 2362yield return new object[] { Size.Empty, new Size(31, 40), new Size(30, 40), Size.Empty }; 2363yield return new object[] { Size.Empty, new Size(30, 41), new Size(30, 40), Size.Empty }; 2364yield return new object[] { Size.Empty, new Size(40, 50), new Size(30, 40), Size.Empty }; 2377public void Control_GetPreferredSize_InvokeWithConstrainedSize_ReturnsExpected(Size minimumSize, Size maximumSize, Size proposedSize, Size expected) 7422yield return new object[] { Size.Empty, Size.Empty, 1, 2, 30, 40, 30, 40, 1 }; 7423yield return new object[] { new Size(10, 20), Size.Empty, 1, 2, 30, 40, 30, 40, 1 }; 7424yield return new object[] { new Size(30, 40), Size.Empty, 1, 2, 30, 40, 30, 40, 0 }; 7425yield return new object[] { new Size(31, 40), Size.Empty, 1, 2, 30, 40, 31, 40, 0 }; 7426yield return new object[] { new Size(30, 41), Size.Empty, 1, 2, 30, 40, 30, 41, 0 }; 7427yield return new object[] { new Size(40, 50), Size.Empty, 1, 2, 30, 40, 40, 50, 0 }; 7428yield return new object[] { Size.Empty, new Size(20, 10), 1, 2, 30, 40, 20, 10, 1 }; 7429yield return new object[] { Size.Empty, new Size(30, 40), 1, 2, 30, 40, 30, 40, 1 }; 7430yield return new object[] { Size.Empty, new Size(31, 40), 1, 2, 30, 40, 30, 40, 1 }; 7431yield return new object[] { Size.Empty, new Size(30, 41), 1, 2, 30, 40, 30, 40, 1 }; 7432yield return new object[] { Size.Empty, new Size(40, 50), 1, 2, 30, 40, 30, 40, 1 }; 7444public void Control_SetBounds_InvokeIntIntIntIntWithConstrainedSize_Success(Size minimumSize, Size maximumSize, int x, int y, int width, int height, int expectedWidth, int expectedHeight, int expectedLayoutCallCount) 8209yield return new object[] { Size.Empty, Size.Empty, 1, 2, 30, 40, BoundsSpecified.All, 1, 2, 30, 40, 1 }; 8210yield return new object[] { new Size(10, 20), Size.Empty, 1, 2, 30, 40, BoundsSpecified.All, 1, 2, 30, 40, 1 }; 8211yield return new object[] { new Size(30, 40), Size.Empty, 1, 2, 30, 40, BoundsSpecified.All, 1, 2, 30, 40, 0 }; 8212yield return new object[] { new Size(31, 40), Size.Empty, 1, 2, 30, 40, BoundsSpecified.All, 1, 2, 31, 40, 0 }; 8213yield return new object[] { new Size(30, 41), Size.Empty, 1, 2, 30, 40, BoundsSpecified.All, 1, 2, 30, 41, 0 }; 8214yield return new object[] { new Size(40, 50), Size.Empty, 1, 2, 30, 40, BoundsSpecified.All, 1, 2, 40, 50, 0 }; 8215yield return new object[] { Size.Empty, new Size(20, 10), 1, 2, 30, 40, BoundsSpecified.All, 1, 2, 20, 10, 1 }; 8216yield return new object[] { Size.Empty, new Size(30, 40), 1, 2, 30, 40, BoundsSpecified.All, 1, 2, 30, 40, 1 }; 8217yield return new object[] { Size.Empty, new Size(31, 40), 1, 2, 30, 40, BoundsSpecified.All, 1, 2, 30, 40, 1 }; 8218yield return new object[] { Size.Empty, new Size(30, 41), 1, 2, 30, 40, BoundsSpecified.All, 1, 2, 30, 40, 1 }; 8219yield return new object[] { Size.Empty, new Size(40, 50), 1, 2, 30, 40, BoundsSpecified.All, 1, 2, 30, 40, 1 }; 8231public void Control_SetBounds_InvokeIntIntIntIntBoundsSpecifiedWithConstrainedSize_Success(Size minimumSize, Size maximumSize, int x, int y, int width, int height, BoundsSpecified specified, int expectedX, int expectedY, int expectedWidth, int expectedHeight, int expectedLayoutCallCount) 9029yield return new object[] { Size.Empty, Size.Empty, 1, 2, 30, 40, specified, 30, 40, 1, 1 }; 9030yield return new object[] { new Size(10, 20), Size.Empty, 1, 2, 30, 40, specified, 30, 40, 1, 1 }; 9031yield return new object[] { new Size(30, 40), Size.Empty, 1, 2, 30, 40, specified, 30, 40, 1, 0 }; 9032yield return new object[] { new Size(31, 40), Size.Empty, 1, 2, 30, 40, specified, 31, 40, 1, 0 }; 9033yield return new object[] { new Size(30, 41), Size.Empty, 1, 2, 30, 40, specified, 30, 41, 1, 0 }; 9034yield return new object[] { new Size(40, 50), Size.Empty, 1, 2, 30, 40, specified, 40, 50, 1, 0 }; 9035yield return new object[] { Size.Empty, new Size(20, 10), 1, 2, 30, 40, specified, 20, 10, 1, 1 }; 9036yield return new object[] { Size.Empty, new Size(30, 40), 1, 2, 30, 40, specified, 30, 40, 1, 1 }; 9037yield return new object[] { Size.Empty, new Size(31, 40), 1, 2, 30, 40, specified, 30, 40, 1, 1 }; 9038yield return new object[] { Size.Empty, new Size(30, 41), 1, 2, 30, 40, specified, 30, 40, 1, 1 }; 9039yield return new object[] { Size.Empty, new Size(40, 50), 1, 2, 30, 40, specified, 30, 40, 1, 1 }; 9052public void Control_SetBoundsCore_InvokeWithConstrainedSize_Success(Size minimumSize, Size maximumSize, int x, int y, int width, int height, BoundsSpecified specified, int expectedWidth, int expectedHeight, int expectedLocationChangedCallCount, int expectedLayoutCallCount) 9769public void Control_SetClientSizeCore_Invoke_GetReturnsExpected(Size value, int expectedLayoutCallCount) 9803public void Control_SetClientSizeCore_InvokeWithCustomStyle_GetReturnsExpected(Size value, Size expectedSize) 9849public void Control_SetClientSizeCore_InvokeWithHandle_GetReturnsExpected(bool resizeRedraw, Size value, Size expectedSize, int expectedLayoutCallCount, int expectedInvalidatedCallCount) 10096yield return new object[] { Size.Empty }; 10103public void Control_SizeFromClientSize_Invoke_ReturnsExpected(Size clientSize) 10116public void Control_SizeFromClientSize_InvokeWithStyles_ReturnsExpected(Size clientSize) 10119Size expected = new(clientSize.Width + 4, clientSize.Height + 4); 10147public new Size SizeFromClientSize(Size clientSize) => base.SizeFromClientSize(clientSize); 10158public void Control_SizeFromClientSize_InvokeWithHandle_ReturnsExpected(Size clientSize) 10339Assert.Equal(Size.Empty, control.ClientSize); 10342Assert.Equal(Size.Empty, control.Size); 10358Assert.Equal(Size.Empty, control.ClientSize); 10361Assert.Equal(Size.Empty, control.Size); 10513Assert.Equal(Size.Empty, control.ClientSize); 10516Assert.Equal(Size.Empty, control.Size); 10532Assert.Equal(Size.Empty, control.ClientSize); 10535Assert.Equal(Size.Empty, control.Size); 10605Assert.Equal(Size.Empty, control.ClientSize); 10608Assert.Equal(Size.Empty, control.Size); 10624Assert.Equal(Size.Empty, control.ClientSize); 10627Assert.Equal(Size.Empty, control.Size); 10696Assert.Equal(Size.Empty, control.ClientSize); 10699Assert.Equal(Size.Empty, control.Size); 10718Assert.Equal(Size.Empty, control.ClientSize); 10721Assert.Equal(Size.Empty, control.Size); 10992yield return new object[] { Size.Empty, Size.Empty, 1, 2, 30, 40, 1 }; 10993yield return new object[] { new Size(10, 20), Size.Empty, 1, 2, 30, 40, 1 }; 10994yield return new object[] { new Size(30, 40), Size.Empty, 1, 2, 30, 40, 0 }; 10995yield return new object[] { new Size(31, 40), Size.Empty, 1, 2, 30, 40, 1 }; 10996yield return new object[] { new Size(30, 41), Size.Empty, 1, 2, 30, 40, 1 }; 10997yield return new object[] { new Size(40, 50), Size.Empty, 1, 2, 30, 40, 1 }; 10998yield return new object[] { Size.Empty, new Size(20, 10), 1, 2, 30, 40, 1 }; 10999yield return new object[] { Size.Empty, new Size(30, 40), 1, 2, 30, 40, 1 }; 11000yield return new object[] { Size.Empty, new Size(31, 40), 1, 2, 30, 40, 1 }; 11001yield return new object[] { Size.Empty, new Size(30, 41), 1, 2, 30, 40, 1 }; 11002yield return new object[] { Size.Empty, new Size(40, 50), 1, 2, 30, 40, 1 }; 11014public void Control_UpdateBounds_InvokeIntIntIntIntWithConstrainedSize_Success(Size minimumSize, Size maximumSize, int x, int y, int width, int height, int expectedLayoutCallCount) 12482yield return new object[] { Size.Empty, (IntPtr)(-1) }; 12483yield return new object[] { Size.Empty, PARAM.FromLowHigh(0, 0) }; 12484yield return new object[] { Size.Empty, PARAM.FromLowHigh(1, 2) }; 12485yield return new object[] { Size.Empty, PARAM.FromLowHigh(-1, -2) }; 12490public void Control_WndProc_InvokeContextMenuWithoutContextMenuStripWithoutHandle_Success(Size size, IntPtr lParam) 12521yield return new object[] { Size.Empty, (IntPtr)(-1), IntPtr.Zero, false }; 12522yield return new object[] { Size.Empty, PARAM.FromLowHigh(0, 0), IntPtr.Zero, true }; 12523yield return new object[] { Size.Empty, PARAM.FromLowHigh(1, 2), IntPtr.Zero, true }; 12524yield return new object[] { Size.Empty, PARAM.FromLowHigh(p.X, p.Y), IntPtr.Zero, true }; 12525yield return new object[] { Size.Empty, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, true }; 12530public void Control_WndProc_InvokeContextMenuWithContextMenuStripWithoutHandle_Success(Size size, IntPtr lParam, IntPtr expectedResult, bool expectedHandleCreated) 12556public void Control_WndProc_InvokeContextMenuWithoutContextMenuStripWithHandle_Success(Size size, IntPtr lParam) 12595yield return new object[] { Size.Empty, (IntPtr)(-1), IntPtr.Zero }; 12596yield return new object[] { Size.Empty, PARAM.FromLowHigh(0, 0), IntPtr.Zero }; 12597yield return new object[] { Size.Empty, PARAM.FromLowHigh(1, 2), IntPtr.Zero }; 12598yield return new object[] { Size.Empty, PARAM.FromLowHigh(p.X, p.Y), IntPtr.Zero }; 12599yield return new object[] { Size.Empty, PARAM.FromLowHigh(-1, -2), IntPtr.Zero }; 12604public void Control_WndProc_InvokeContextMenuWithContextMenuStripWithHandle_Success(Size size, IntPtr lParam, IntPtr expectedResult)
System\Windows\Forms\ControlTests.Properties.cs (161)
2517public void Control_Bounds_SetWithConstrainedSize_GetReturnsExpected(Size minimumSize, Size maximumSize, int x, int y, int width, int height, int expectedWidth, int expectedHeight, int expectedLayoutCallCount) 3284yield return new object[] { new Control(), Size.Empty }; 3285yield return new object[] { new NonZeroWidthBorderedControl(), Size.Empty }; 3286yield return new object[] { new NonZeroHeightBorderedControl(), Size.Empty }; 3292public void Control_ClientSize_Get_ReturnsExpected(Control control, Size expected) 3299protected override Size DefaultSize => new(10, 0); 3304protected override Size DefaultSize => new(0, 10); 3309protected override Size DefaultSize => new(10, 20); 3324public void Control_ClientSize_Set_GetReturnsExpected(Size value, int expectedLayoutCallCount) 3368public void Control_ClientSize_SetWithCustomStyle_GetReturnsExpected(Size value, Size expectedSize) 3429public void Control_ClientSize_SetWithHandle_GetReturnsExpected(bool resizeRedraw, Size value, Size expectedSize, int expectedLayoutCallCount, int expectedInvalidatedCallCount) 5767yield return new object[] { Size.Empty, Size.Empty, 40, 0, 40, 1 }; 5768yield return new object[] { new Size(10, 20), Size.Empty, 40, 10, 40, 1 }; 5769yield return new object[] { new Size(30, 40), Size.Empty, 40, 30, 40, 0 }; 5770yield return new object[] { new Size(31, 40), Size.Empty, 40, 31, 40, 0 }; 5771yield return new object[] { new Size(30, 41), Size.Empty, 40, 30, 41, 0 }; 5772yield return new object[] { new Size(40, 50), Size.Empty, 40, 40, 50, 0 }; 5773yield return new object[] { Size.Empty, new Size(20, 10), 40, 0, 10, 1 }; 5774yield return new object[] { Size.Empty, new Size(30, 40), 40, 0, 40, 1 }; 5775yield return new object[] { Size.Empty, new Size(31, 40), 40, 0, 40, 1 }; 5776yield return new object[] { Size.Empty, new Size(30, 41), 40, 0, 40, 1 }; 5777yield return new object[] { Size.Empty, new Size(40, 50), 40, 0, 40, 1 }; 5788public void Control_Height_SetWithConstrainedSize_GetReturnsExpected(Size minimumSize, Size maximumSize, int value, int expectedWidth, int expectedHeight, int expectedLayoutCallCount) 7881yield return new object[] { new Control(), Size.Empty }; 7889public void Control_MaximumSize_GetWithCustomDefaultMaximumSize_ReturnsExpected(Control control, Size expected) 7896protected override Size DefaultMaximumSize => new(10, 0); 7901protected override Size DefaultMaximumSize => new(0, 20); 7906protected override Size DefaultMaximumSize => new(10, 20); 7911yield return new object[] { Size.Empty }; 7927public void Control_MaximumSize_Set_GetReturnsExpected(Size value) 7935Assert.Equal(Size.Empty, control.Size); 7942Assert.Equal(Size.Empty, control.Size); 7949public void Control_MaximumSize_SetWithCustomOldValue_GetReturnsExpected(Size value) 7960Assert.Equal(Size.Empty, control.Size); 7967Assert.Equal(Size.Empty, control.Size); 7974yield return new object[] { new Size(2, 3), Size.Empty, new Size(2, 3), 0 }; 7995public void Control_MaximumSize_SetWithSize_GetReturnsExpected(Size size, Size value, Size expectedSize, int expectedLayoutCallCount) 8026public void Control_MaximumSize_SetWithMinimumSize_GetReturnsExpected(Size value) 8051public void Control_MaximumSize_SetWithCustomOldValueWithSize_GetReturnsExpected(Size size, Size value, Size expectedSize, int expectedLayoutCallCount) 8083yield return new object[] { Size.Empty, 0 }; 8098public void Control_MaximumSize_SetWithParent_GetReturnsExpected(Size value, int expectedParentLayoutCallCount) 8120Assert.Equal(Size.Empty, control.Size); 8128Assert.Equal(Size.Empty, control.Size); 8138yield return new object[] { Size.Empty, 0 }; 8153public void Control_MaximumSize_SetWithCustomOldValueWithParent_GetReturnsExpected(Size value, int expectedParentLayoutCallCount) 8176Assert.Equal(Size.Empty, control.Size); 8185Assert.Equal(Size.Empty, control.Size); 8196public void Control_MaximumSize_SetWithHandle_GetReturnsExpected(Size value) 8211Assert.Equal(Size.Empty, control.Size); 8221Assert.Equal(Size.Empty, control.Size); 8231public void Control_MaximumSize_SetWithCustomOldValueWithHandle_GetReturnsExpected(Size value) 8249Assert.Equal(Size.Empty, control.Size); 8259Assert.Equal(Size.Empty, control.Size); 8269public void Control_MaximumSize_SetWithSizeWithHandle_GetReturnsExpected(Size size, Size value, Size expectedSize, int expectedLayoutCallCount) 8307public void Control_MaximumSize_SetWithParentWithHandle_GetReturnsExpected(Size value, int expectedParentLayoutCallCount) 8342Assert.Equal(Size.Empty, control.Size); 8357Assert.Equal(Size.Empty, control.Size); 8374public void Control_MaximumSize_SetWithCustomOldValueWithParentWithHandle_GetReturnsExpected(Size value, int expectedParentLayoutCallCount) 8410Assert.Equal(Size.Empty, control.Size); 8425Assert.Equal(Size.Empty, control.Size); 8460Assert.Equal(Size.Empty, control.MaximumSize); 8484Assert.Equal(Size.Empty, control.MaximumSize); 8490yield return new object[] { new Control(), Size.Empty }; 8498public void Control_MinimumSize_GetWithCustomDefaultMinimumSize_ReturnsExpected(Control control, Size expected) 8505protected override Size DefaultMinimumSize => new(10, 0); 8510protected override Size DefaultMinimumSize => new(0, 20); 8515protected override Size DefaultMinimumSize => new(10, 20); 8520yield return new object[] { Size.Empty, Size.Empty, 0 }; 8525yield return new object[] { new Size(-1, -2), Size.Empty, 0 }; 8536public void Control_MinimumSize_Set_GetReturnsExpected(Size value, Size expectedSize, int expectedLayoutCallCount) 8564yield return new object[] { Size.Empty, new Size(1, 2), 0 }; 8580public void Control_MinimumSize_SetWithCustomOldValue_GetReturnsExpected(Size value, Size expectedSize, int expectedLayoutCallCount) 8611yield return new object[] { new Size(2, 3), Size.Empty, new Size(2, 3), 0 }; 8633public void Control_MinimumSize_SetWithSize_GetReturnsExpected(Size size, Size value, Size expectedSize, int expectedLayoutCallCount) 8664public void Control_MinimumSize_SetWithMaximumSize_GetReturnsExpected(Size value, Size expectedSize, int expectedLayoutCallCount) 8695public void Control_MinimumSize_SetWithCustomOldValueWithSize_GetReturnsExpected(Size size, Size value, Size expectedSize, int expectedLayoutCallCount) 8727yield return new object[] { Size.Empty, Size.Empty, 0, 0 }; 8732yield return new object[] { new Size(-1, -2), Size.Empty, 0, 1 }; 8742public void Control_MinimumSize_SetWithParent_GetReturnsExpected(Size value, Size expectedSize, int expectedLayoutCallCount, int expectedParentLayoutCallCount) 8788yield return new object[] { Size.Empty, new Size(1, 2), 0, 1 }; 8803public void Control_MinimumSize_SetWithCustomOldValueWithParent_GetReturnsExpected(Size value, Size expectedSize, int expectedLayoutCallCount, int expectedParentLayoutCallCount) 8852yield return new object[] { Size.Empty, Size.Empty, 0 }; 8857yield return new object[] { new Size(-1, -2), Size.Empty, 0 }; 8868public void Control_MinimumSize_SetWithHandle_GetReturnsExpected(Size value, Size expectedSize, int expectedLayoutCallCount) 8909yield return new object[] { Size.Empty, new Size(1, 2), 0 }; 8925public void Control_MinimumSize_SetWithCustomOldValueWithHandle_GetReturnsExpected(Size value, Size expectedSize, int expectedLayoutCallCount) 8969yield return new object[] { new Size(2, 3), Size.Empty, new Size(2, 3), 0 }; 8991public void Control_MinimumSize_SetWithSizeWithHandle_GetReturnsExpected(Size size, Size value, Size expectedSize, int expectedLayoutCallCount) 9035yield return new object[] { Size.Empty, Size.Empty, 0, 0 }; 9040yield return new object[] { new Size(-1, -2), Size.Empty, 0, 1 }; 9050public void Control_MinimumSize_SetWithParentWithHandle_GetReturnsExpected(Size value, Size expectedSize, int expectedLayoutCallCount, int expectedParentLayoutCallCount) 9123yield return new object[] { Size.Empty, new Size(1, 2), 0, 1 }; 9138public void Control_MinimumSize_SetWithCustomOldValueWithParentWithHandle_GetReturnsExpected(Size value, Size expectedSize, int expectedLayoutCallCount, int expectedParentLayoutCallCount) 9230Assert.Equal(Size.Empty, control.MinimumSize); 9254Assert.Equal(Size.Empty, control.MinimumSize); 11066public void Control_Size_Set_GetReturnsExpected(Size value, int expectedLayoutCallCount) 11151yield return new object[] { Size.Empty, Size.Empty, new Size(30, 40), 30, 40, 1 }; 11152yield return new object[] { new Size(10, 20), Size.Empty, new Size(30, 40), 30, 40, 1 }; 11153yield return new object[] { new Size(30, 40), Size.Empty, new Size(30, 40), 30, 40, 0 }; 11154yield return new object[] { new Size(31, 40), Size.Empty, new Size(30, 40), 31, 40, 0 }; 11155yield return new object[] { new Size(30, 41), Size.Empty, new Size(30, 40), 30, 41, 0 }; 11156yield return new object[] { new Size(40, 50), Size.Empty, new Size(30, 40), 40, 50, 0 }; 11157yield return new object[] { Size.Empty, new Size(20, 10), new Size(30, 40), 20, 10, 1 }; 11158yield return new object[] { Size.Empty, new Size(30, 40), new Size(30, 40), 30, 40, 1 }; 11159yield return new object[] { Size.Empty, new Size(31, 40), new Size(30, 40), 30, 40, 1 }; 11160yield return new object[] { Size.Empty, new Size(30, 41), new Size(30, 40), 30, 40, 1 }; 11161yield return new object[] { Size.Empty, new Size(40, 50), new Size(30, 40), 30, 40, 1 }; 11173public void Control_Size_SetWithConstrainedSize_GetReturnsExpected(Size minimumSize, Size maximumSize, Size value, int expectedWidth, int expectedHeight, int expectedLayoutCallCount) 11272public void Control_Size_SetWithCustomStyle_GetReturnsExpected(Size value, int expectedClientWidth, int expectedClientHeight, int expectedLayoutCallCount) 11367public void Control_Size_SetWithParent_GetReturnsExpected(Size value, int expectedLayoutCallCount, int expectedParentLayoutCallCount) 11496public void Control_Size_SetWithHandle_GetReturnsExpected(bool resizeRedraw, Size value, int expectedWidth, int expectedHeight, int expectedLayoutCallCount, int expectedInvalidatedCallCount) 11612public void Control_Size_SetWithParentWithHandle_GetReturnsExpected(bool resizeRedraw, Size value, int expectedWidth, int expectedHeight, int expectedLayoutCallCount, int expectedInvalidatedCallCount, int expectedParentLayoutCallCount1, int expectedParentLayoutCallCount2) 11770Assert.Equal(Size.Empty, control.Size); 11794Assert.Equal(Size.Empty, control.Size); 13186yield return new object[] { Size.Empty, Size.Empty, 30, 30, 0, 1 }; 13187yield return new object[] { new Size(10, 20), Size.Empty, 30, 30, 20, 1 }; 13188yield return new object[] { new Size(30, 40), Size.Empty, 30, 30, 40, 0 }; 13189yield return new object[] { new Size(31, 40), Size.Empty, 30, 31, 40, 0 }; 13190yield return new object[] { new Size(30, 41), Size.Empty, 30, 30, 41, 0 }; 13191yield return new object[] { new Size(40, 50), Size.Empty, 30, 40, 50, 0 }; 13192yield return new object[] { Size.Empty, new Size(20, 10), 30, 20, 0, 1 }; 13193yield return new object[] { Size.Empty, new Size(30, 40), 30, 30, 0, 1 }; 13194yield return new object[] { Size.Empty, new Size(31, 40), 30, 30, 0, 1 }; 13195yield return new object[] { Size.Empty, new Size(30, 41), 30, 30, 0, 1 }; 13196yield return new object[] { Size.Empty, new Size(40, 50), 30, 30, 0, 1 }; 13207public void Control_Width_SetWithConstrainedSize_GetReturnsExpected(Size minimumSize, Size maximumSize, int value, int expectedWidth, int expectedHeight, int expectedLayoutCallCount)
System\Windows\Forms\DataGridViewCellTests.cs (10)
10using Size = System.Drawing.Size; 4830Assert.Equal(new Size(-1, -1), cell.GetPreferredSize(null, null, -1, Size.Empty)); 5328Assert.Equal(Size.Empty, DataGridViewCell.MeasureTextPreferredSize(graphics, text, SystemFonts.DefaultFont, 0.2f, TextFormatFlags.Default)); 5342Assert.NotEqual(Size.Empty, DataGridViewCell.MeasureTextPreferredSize(graphics, text, SystemFonts.DefaultFont, 0.2f, flags)); 5384Assert.Equal(Size.Empty, DataGridViewCell.MeasureTextSize(graphics, text, SystemFonts.DefaultFont, TextFormatFlags.Default)); 5398Assert.NotEqual(Size.Empty, DataGridViewCell.MeasureTextSize(graphics, text, SystemFonts.DefaultFont, flags)); 6537public new Size GetSize(int rowIndex) => base.GetSize(rowIndex); 6585public new Size GetPreferredSize(Graphics graphics, DataGridViewCellStyle cellStyle, int rowIndex, Size constraintSize) => base.GetPreferredSize(graphics, cellStyle, rowIndex, constraintSize); 6587public new Size GetSize(int rowIndex) => base.GetSize(rowIndex);
System\Windows\Forms\DataGridViewHeaderCellTests.cs (4)
8using Size = System.Drawing.Size; 4664public new Size GetSize(int rowIndex) => base.GetSize(rowIndex); 4671public new Size GetSize(int rowIndex) => base.GetSize(rowIndex); 4689public new Size GetSize(int rowIndex) => base.GetSize(rowIndex);
System\Windows\Forms\DataGridViewTextBoxEditingControlTests.cs (8)
8using Size = System.Drawing.Size; 59Assert.Equal(Size.Empty, control.DefaultMaximumSize); 60Assert.Equal(Size.Empty, control.DefaultMinimumSize); 90Assert.Equal(Size.Empty, control.MaximumSize); 92Assert.Equal(Size.Empty, control.MinimumSize); 2118public new Size DefaultMaximumSize => base.DefaultMaximumSize; 2120public new Size DefaultMinimumSize => base.DefaultMinimumSize; 2124public new Size DefaultSize => base.DefaultSize;
System\Windows\Forms\DateTimePickerTests.cs (8)
8using Size = System.Drawing.Size; 63Assert.Equal(Size.Empty, control.DefaultMaximumSize); 64Assert.Equal(Size.Empty, control.DefaultMinimumSize); 92Assert.Equal(Size.Empty, control.MaximumSize); 94Assert.Equal(Size.Empty, control.MinimumSize); 1020public new Size DefaultMaximumSize => base.DefaultMaximumSize; 1022public new Size DefaultMinimumSize => base.DefaultMinimumSize; 1026public new Size DefaultSize => base.DefaultSize;
System\Windows\Forms\Design\ComponentEditorFormTests.cs (10)
7using Size = System.Drawing.Size; 37Assert.Equal(Size.Empty, control.AutoScrollMargin); 38Assert.Equal(Size.Empty, control.AutoScrollMinSize); 71Assert.Equal(Size.Empty, control.DefaultMaximumSize); 72Assert.Equal(Size.Empty, control.DefaultMinimumSize); 121Assert.Equal(Size.Empty, control.MaximumSize); 123Assert.Equal(Size.Empty, control.MinimumSize); 394public new Size DefaultMaximumSize => base.DefaultMaximumSize; 396public new Size DefaultMinimumSize => base.DefaultMinimumSize; 400public new Size DefaultSize => base.DefaultSize;
System\Windows\Forms\Design\ComponentEditorPageTests.cs (11)
8using Size = System.Drawing.Size; 25Assert.Equal(Size.Empty, control.AutoScrollMargin); 26Assert.Equal(Size.Empty, control.AutoScrollMinSize); 57Assert.Equal(Size.Empty, control.DefaultMaximumSize); 58Assert.Equal(Size.Empty, control.DefaultMinimumSize); 97Assert.Equal(Size.Empty, control.MaximumSize); 98Assert.Equal(Size.Empty, control.MinimumSize); 102Assert.Equal(Size.Empty, control.PreferredSize); 897public new Size DefaultMaximumSize => base.DefaultMaximumSize; 899public new Size DefaultMinimumSize => base.DefaultMinimumSize; 903public new Size DefaultSize => base.DefaultSize;
System\Windows\Forms\Design\PropertyTabTests.cs (1)
7using Size = System.Drawing.Size;
System\Windows\Forms\DomainUpDownTests.cs (9)
38_sub.AutoScrollMargin.Should().Be(Size.Empty); 40_sub.AutoScrollMinSize.Should().Be(Size.Empty); 81_sub.DefaultMaximumSize.Should().Be(Size.Empty); 82_sub.DefaultMinimumSize.Should().Be(Size.Empty); 119_sub.MaximumSize.Should().Be(Size.Empty); 120_sub.MinimumSize.Should().Be(Size.Empty); 1484public new Size DefaultMaximumSize => base.DefaultMaximumSize; 1486public new Size DefaultMinimumSize => base.DefaultMinimumSize; 1490public new Size DefaultSize => base.DefaultSize;
System\Windows\Forms\DragDropHelperTests.cs (2)
117Size dragImageSize = pDragImage->sizeDragImage; 143Size dragImageSize = pDragImage->sizeDragImage;
System\Windows\Forms\FlowLayoutPanelTests.cs (11)
7using Size = System.Drawing.Size; 24Assert.Equal(Size.Empty, control.AutoScrollMargin); 25Assert.Equal(Size.Empty, control.AutoScrollMinSize); 54Assert.Equal(Size.Empty, control.DefaultMaximumSize); 55Assert.Equal(Size.Empty, control.DefaultMinimumSize); 90Assert.Equal(Size.Empty, control.MaximumSize); 91Assert.Equal(Size.Empty, control.MinimumSize); 94Assert.Equal(Size.Empty, control.PreferredSize); 444public new Size DefaultMaximumSize => base.DefaultMaximumSize; 446public new Size DefaultMinimumSize => base.DefaultMinimumSize; 450public new Size DefaultSize => base.DefaultSize;
System\Windows\Forms\FormTests.cs (9)
35Assert.Equal(Size.Empty, control.AutoScrollMargin); 36Assert.Equal(Size.Empty, control.AutoScrollMinSize); 70Assert.Equal(Size.Empty, control.DefaultMaximumSize); 71Assert.Equal(Size.Empty, control.DefaultMinimumSize); 123Assert.Equal(Size.Empty, control.MaximumSize); 125Assert.Equal(Size.Empty, control.MinimumSize); 2704public new Size DefaultMaximumSize => base.DefaultMaximumSize; 2706public new Size DefaultMinimumSize => base.DefaultMinimumSize; 2710public new Size DefaultSize => base.DefaultSize;
System\Windows\Forms\GroupBoxTests.cs (12)
9using Size = System.Drawing.Size; 51Assert.Equal(Size.Empty, control.DefaultMaximumSize); 52Assert.Equal(Size.Empty, control.DefaultMinimumSize); 78Assert.Equal(Size.Empty, control.MaximumSize); 79Assert.Equal(Size.Empty, control.MinimumSize); 1847public void GroupBox_OnPaint_Invoke_CallsPaint(Size size, bool enabled, bool useCompatibleTextRendering, RightToLeft rightToLeft, Color foreColor, string text) 1885public void GroupBox_OnPaint_InvokeWithHandle_CallsPaint(Size size, bool enabled, bool useCompatibleTextRendering, RightToLeft rightToLeft, Color foreColor, string text) 2309public new Size DefaultMaximumSize => base.DefaultMaximumSize; 2311public new Size DefaultMinimumSize => base.DefaultMinimumSize; 2315public new Size DefaultSize => base.DefaultSize; 2389public new Size SizeFromClientSize(Size clientSize) => base.SizeFromClientSize(clientSize);
System\Windows\Forms\HScrollBarTests.cs (8)
7using Size = System.Drawing.Size; 55Assert.Equal(Size.Empty, control.DefaultMaximumSize); 56Assert.Equal(Size.Empty, control.DefaultMinimumSize); 87Assert.Equal(Size.Empty, control.MaximumSize); 89Assert.Equal(Size.Empty, control.MinimumSize); 258public new Size DefaultMaximumSize => base.DefaultMaximumSize; 260public new Size DefaultMinimumSize => base.DefaultMinimumSize; 264public new Size DefaultSize => base.DefaultSize;
System\Windows\Forms\ImageList.ImageCollectionTests.cs (1)
7using Size = System.Drawing.Size;
System\Windows\Forms\ImageListTests.cs (3)
237public void ImageList_ImageSize_SetWithoutHandle_GetReturnsExpected(Size value) 287public void ImageList_ImageSize_SetWithHandle_GetReturnsExpected(Size value) 402Assert.Throws<ArgumentException>("value", () => list.ImageSize = Size.Empty);
System\Windows\Forms\LabelTests.cs (11)
8using Size = System.Drawing.Size; 51Assert.Equal(Size.Empty, control.DefaultMaximumSize); 52Assert.Equal(Size.Empty, control.DefaultMinimumSize); 83Assert.Equal(Size.Empty, control.MaximumSize); 84Assert.Equal(Size.Empty, control.MinimumSize); 295Size oldSize = label.Size; 299Size newSize = label.Size; 873Size defaultSize = label.PreferredSize; 893public new Size DefaultMaximumSize => base.DefaultMaximumSize; 895public new Size DefaultMinimumSize => base.DefaultMinimumSize; 899public new Size DefaultSize => base.DefaultSize;
System\Windows\Forms\Layout\FlowLayoutTests.cs (9)
5using Size = System.Drawing.Size; 57Size = Size.Empty 62Size = Size.Empty 118Size = Size.Empty 123Size = Size.Empty 179Size = Size.Empty 184Size = Size.Empty 240Size = Size.Empty 245Size = Size.Empty
System\Windows\Forms\ListBoxTests.cs (14)
57Assert.Equal(Size.Empty, control.DefaultMaximumSize); 58Assert.Equal(Size.Empty, control.DefaultMinimumSize); 94Assert.Equal(Size.Empty, control.MaximumSize); 95Assert.Equal(Size.Empty, control.MinimumSize); 4790yield return new object[] { borderStyle, Size.Empty }; 4800public void ListBox_GetPreferredSize_Invoke_ReturnsExpected(BorderStyle borderStyle, Size proposedSize) 4816public void ListBox_GetPreferredSize_InvokeWithPadding_ReturnsExpected(BorderStyle borderStyle, Size proposedSize) 4833public void ListBox_GetPreferredSize_InvokeWithHandle_ReturnsExpected(BorderStyle borderStyle, Size proposedSize) 4847Size result = control.GetPreferredSize(proposedSize); 4865public void ListBox_GetPreferredSize_InvokeWithHandleWithPadding_ReturnsExpected(BorderStyle borderStyle, Size proposedSize) 4880Size result = control.GetPreferredSize(proposedSize); 6416public new Size DefaultMaximumSize => base.DefaultMaximumSize; 6418public new Size DefaultMinimumSize => base.DefaultMinimumSize; 6422public new Size DefaultSize => base.DefaultSize;
System\Windows\Forms\ListControlTests.cs (12)
10using Size = System.Drawing.Size; 40Assert.Equal(Size.Empty, control.ClientSize); 54Assert.Equal(Size.Empty, control.DefaultMaximumSize); 55Assert.Equal(Size.Empty, control.DefaultMinimumSize); 57Assert.Equal(Size.Empty, control.DefaultSize); 84Assert.Equal(Size.Empty, control.MaximumSize); 85Assert.Equal(Size.Empty, control.MinimumSize); 89Assert.Equal(Size.Empty, control.PreferredSize); 100Assert.Equal(Size.Empty, control.Size); 2924public new Size DefaultMaximumSize => base.DefaultMaximumSize; 2926public new Size DefaultMinimumSize => base.DefaultMinimumSize; 2930public new Size DefaultSize => base.DefaultSize;
System\Windows\Forms\ListViewItem.IKeyboardToolTipTests.cs (1)
809Size? size = null,
System\Windows\Forms\ListViewTests.cs (9)
12using Size = System.Drawing.Size; 66Assert.Equal(Size.Empty, control.DefaultMaximumSize); 67Assert.Equal(Size.Empty, control.DefaultMinimumSize); 110Assert.Equal(Size.Empty, control.MaximumSize); 111Assert.Equal(Size.Empty, control.MinimumSize); 141Assert.Equal(Size.Empty, control.TileSize); 6111public new Size DefaultMaximumSize => base.DefaultMaximumSize; 6113public new Size DefaultMinimumSize => base.DefaultMinimumSize; 6117public new Size DefaultSize => base.DefaultSize;
System\Windows\Forms\MdiClientTests.cs (21)
9using Size = System.Drawing.Size; 36Assert.Equal(Size.Empty, control.ClientSize); 62Assert.Equal(Size.Empty, control.MaximumSize); 65Assert.Equal(Size.Empty, control.MinimumSize); 68Assert.Equal(Size.Empty, control.PreferredSize); 77Assert.Equal(Size.Empty, control.Size); 491public void MdiClient_Size_Set_GetReturnsExpected(Size value, int expectedWidth, int expectedHeight, int expectedLayoutCallCount) 586public void MdiClient_Size_SetWithHandle_GetReturnsExpected(Size value, int expectedWidth, int expectedHeight, int expectedClientWidth, int expectedClientHeight, int expectedLayoutCallCount, int expectedInvalidatedCallCount) 694public void MdiClient_Size_SetWithParentWithHandle_GetReturnsExpected(Size value, int expectedLayoutCallCount, int expectedInvalidatedCallCount, int expectedParentLayoutCallCount) 773Assert.Equal(Size.Empty, control.ClientSize); 776Assert.Equal(Size.Empty, control.Size); 800Assert.Equal(Size.Empty, control.ClientSize); 803Assert.Equal(Size.Empty, control.Size); 833public void MdiClient_Size_SetWithNonDesignModeParentWithHandle_GetReturnsExpected(Size value, int expectedLayoutCallCount, int expectedInvalidatedCallCount, int expectedParentLayoutCallCount) 925Assert.Equal(Size.Empty, control.ClientSize); 928Assert.Equal(Size.Empty, control.Size); 952Assert.Equal(Size.Empty, control.ClientSize); 955Assert.Equal(Size.Empty, control.Size); 995public void MdiClient_Size_SetWithDesignModeParentWithHandle_GetReturnsExpected(Size value, int expectedWidth, int expectedHeight, int expectedClientWidth, int expectedClientHeight, int expectedLayoutCallCount1, int expectedLayoutCallCount2, int expectedInvalidatedCallCount, int expectedParentLayoutCallCount1, int expectedParentLayoutCallCount2) 1165Assert.Equal(Size.Empty, control.Size); 1189Assert.Equal(Size.Empty, control.Size);
System\Windows\Forms\MdiControlStripTests.cs (11)
8using Size = System.Drawing.Size; 28Assert.Equal(Size.Empty, mdiControlStrip.AutoScrollMargin); 29Assert.Equal(Size.Empty, mdiControlStrip.AutoScrollMinSize); 60Assert.Equal(Size.Empty, mdiControlStrip.DefaultMaximumSize); 61Assert.Equal(Size.Empty, mdiControlStrip.DefaultMinimumSize); 110Assert.Equal(Size.Empty, mdiControlStrip.MaximumSize); 113Assert.Equal(Size.Empty, mdiControlStrip.MinimumSize); 370public new Size DefaultMaximumSize => base.DefaultMaximumSize; 372public new Size DefaultMinimumSize => base.DefaultMinimumSize; 376public new Size DefaultSize => base.DefaultSize; 410public new Size MaxItemSize => base.MaxItemSize;
System\Windows\Forms\MenuStripTests.cs (11)
7using Size = System.Drawing.Size; 26Assert.Equal(Size.Empty, control.AutoScrollMargin); 27Assert.Equal(Size.Empty, control.AutoScrollMinSize); 58Assert.Equal(Size.Empty, control.DefaultMaximumSize); 59Assert.Equal(Size.Empty, control.DefaultMinimumSize); 108Assert.Equal(Size.Empty, control.MaximumSize); 111Assert.Equal(Size.Empty, control.MinimumSize); 866public new Size DefaultMaximumSize => base.DefaultMaximumSize; 868public new Size DefaultMinimumSize => base.DefaultMinimumSize; 872public new Size DefaultSize => base.DefaultSize; 906public new Size MaxItemSize => base.MaxItemSize;
System\Windows\Forms\MonthCalendarTests.cs (24)
10using Size = System.Drawing.Size; 64Assert.Equal(Size.Empty, control.DefaultMaximumSize); 65Assert.Equal(Size.Empty, control.DefaultMinimumSize); 96Assert.Equal(Size.Empty, control.MaximumSize); 99Assert.Equal(Size.Empty, control.MinimumSize); 622public void MonthCalendar_CalendarDimensions_Set_GetReturnsExpected(Size value, Size expected) 642Size value = new(width, height); 652var previousCalendarDimensions = calendar.CalendarDimensions; 662public void MonthCalendar_CalendarDimensions_SetWithHandle_GetReturnsExpected(Size value, Size expected) 694Size value = new(width, height); 713var previousCalendarDimensions = calendar.CalendarDimensions; 2432Size size = control.SingleMonthSize; 2444yield return new object[] { new RECT(0, 0, 0, 0), Size.Empty }; 2454public void MonthCalendar_SingleMonthSize_GetCustomGetMinReqRect_ReturnsExpected(object getMinReqRectResult, Size expected) 2520public void MonthCalendar_Size_Set_GetReturnsExpected(Size value) 2523Size size = control.ClientSize; 2545public void MonthCalendar_Size_SetWithHandle_GetReturnsExpected(Size value) 2549Size size = control.Size; 2586Size size = control.Size; 4740public new Size DefaultMaximumSize => base.DefaultMaximumSize; 4742public new Size DefaultMinimumSize => base.DefaultMinimumSize; 4746public new Size DefaultSize => base.DefaultSize;
System\Windows\Forms\PaddingTests.cs (2)
23Assert.Equal(Size.Empty, padding.Size); 74Assert.Equal(Size.Empty, padding.Size);
System\Windows\Forms\PanelTests.cs (12)
25Assert.Equal(Size.Empty, control.AutoScrollMargin); 26Assert.Equal(Size.Empty, control.AutoScrollMinSize); 55Assert.Equal(Size.Empty, control.DefaultMaximumSize); 56Assert.Equal(Size.Empty, control.DefaultMinimumSize); 90Assert.Equal(Size.Empty, control.MaximumSize); 91Assert.Equal(Size.Empty, control.MinimumSize); 94Assert.Equal(Size.Empty, control.PreferredSize); 648public new Size SizeFromClientSize(Size clientSize) => base.SizeFromClientSize(clientSize); 1166public new Size DefaultMaximumSize => base.DefaultMaximumSize; 1168public new Size DefaultMinimumSize => base.DefaultMinimumSize; 1172public new Size DefaultSize => base.DefaultSize;
System\Windows\Forms\PictureBoxTests.cs (11)
9using Size = System.Drawing.Size; 54Assert.Equal(Size.Empty, control.DefaultMaximumSize); 55Assert.Equal(Size.Empty, control.DefaultMinimumSize); 85Assert.Equal(Size.Empty, control.MaximumSize); 86Assert.Equal(Size.Empty, control.MinimumSize); 722Size expectedImageSize = new(110, 100); 747Size expectedImageSize = new(110, 100); 2012Size expectedImageSize = new(110, 100); 2852public new Size DefaultMaximumSize => base.DefaultMaximumSize; 2854public new Size DefaultMinimumSize => base.DefaultMinimumSize; 2858public new Size DefaultSize => base.DefaultSize;
System\Windows\Forms\PopupEventArgsTests.cs (4)
12yield return new object[] { null, null, false, Size.Empty }; 19public void Ctor_IWin32Window_Control_Bool_Size(IWin32Window associatedWindow, Control associatedControl, bool isBalloon, Size size) 31yield return new object[] { Size.Empty }; 38public void ToolTipSize_Set_GetReturnsExpected(Size value)
System\Windows\Forms\ProgressBarTests.cs (8)
9using Size = System.Drawing.Size; 50Assert.Equal(Size.Empty, control.DefaultMaximumSize); 51Assert.Equal(Size.Empty, control.DefaultMinimumSize); 76Assert.Equal(Size.Empty, control.MaximumSize); 78Assert.Equal(Size.Empty, control.MinimumSize); 2596public new Size DefaultMaximumSize => base.DefaultMaximumSize; 2598public new Size DefaultMinimumSize => base.DefaultMinimumSize; 2602public new Size DefaultSize => base.DefaultSize;
System\Windows\Forms\PropertyGridInternal\AccessibleObjects\PropertyDescriptorGridEntry.PropertyDescriptorGridEntryAccessibleObjectTests.cs (2)
65SizeProperty = Size.Empty 199public Size SizeProperty
System\Windows\Forms\PropertyGridInternal\PropertyGridView.GridViewListBoxTests.cs (1)
16SelectedObject = Size.Empty
System\Windows\Forms\PropertyGridTests.cs (11)
13using Size = System.Drawing.Size; 34Assert.Equal(Size.Empty, control.AutoScrollMargin); 36Assert.Equal(Size.Empty, control.AutoScrollMinSize); 81Assert.Equal(Size.Empty, control.DefaultMaximumSize); 82Assert.Equal(Size.Empty, control.DefaultMinimumSize); 125Assert.Equal(Size.Empty, control.MaximumSize); 126Assert.Equal(Size.Empty, control.MinimumSize); 129Assert.NotEqual(Size.Empty, control.PreferredSize); 4155public new Size DefaultMaximumSize => base.DefaultMaximumSize; 4157public new Size DefaultMinimumSize => base.DefaultMinimumSize; 4161public new Size DefaultSize => base.DefaultSize;
System\Windows\Forms\RadioButtonTests.cs (8)
10using Size = System.Drawing.Size; 56Assert.Equal(Size.Empty, control.DefaultMaximumSize); 57Assert.Equal(Size.Empty, control.DefaultMinimumSize); 91Assert.Equal(Size.Empty, control.MaximumSize); 92Assert.Equal(Size.Empty, control.MinimumSize); 1539public new Size DefaultMaximumSize => base.DefaultMaximumSize; 1541public new Size DefaultMinimumSize => base.DefaultMinimumSize; 1545public new Size DefaultSize => base.DefaultSize;
System\Windows\Forms\RichTextBoxTests.cs (8)
16using Size = System.Drawing.Size; 65Assert.Equal(Size.Empty, control.DefaultMaximumSize); 66Assert.Equal(Size.Empty, control.DefaultMinimumSize); 97Assert.Equal(Size.Empty, control.MaximumSize); 99Assert.Equal(Size.Empty, control.MinimumSize); 10936public new Size DefaultMaximumSize => base.DefaultMaximumSize; 10938public new Size DefaultMinimumSize => base.DefaultMinimumSize; 10942public new Size DefaultSize => base.DefaultSize;
System\Windows\Forms\ScrollableControlTests.cs (33)
9using Size = System.Drawing.Size; 26Assert.Equal(Size.Empty, control.AutoScrollMargin); 27Assert.Equal(Size.Empty, control.AutoScrollMinSize); 43Assert.Equal(Size.Empty, control.ClientSize); 54Assert.Equal(Size.Empty, control.DefaultMaximumSize); 55Assert.Equal(Size.Empty, control.DefaultMinimumSize); 57Assert.Equal(Size.Empty, control.DefaultSize); 89Assert.Equal(Size.Empty, control.MaximumSize); 90Assert.Equal(Size.Empty, control.MinimumSize); 93Assert.Equal(Size.Empty, control.PreferredSize); 103Assert.Equal(Size.Empty, control.Size); 340public void ScrollableControl_AutoScrollMargin_Set_GetReturnsExpected(bool autoScroll, Size value, int expectedLayoutCallCount) 371public void ScrollableControl_AutoScrollMargin_SetWithHandle_GetReturnsExpected(bool autoScroll, Size value, int expectedLayoutCallCount) 433Assert.Equal(Size.Empty, control.AutoScrollMargin); 457Assert.Equal(Size.Empty, control.AutoScrollMargin); 570public void ScrollableControl_AutoScrollMinSize_Set_GetReturnsExpected(bool autoScroll, Size value, bool expectedAutoScroll, int expectedLayoutCallCount) 614public void ScrollableControl_AutoScrollMinSize_SetWithHandle_GetReturnsExpected(bool autoScroll, Size value, bool expectedAutoScroll, int expectedLayoutCallCount, int expectedStyleChangedCallCount) 674Assert.Equal(Size.Empty, control.AutoScrollMinSize); 698Assert.Equal(Size.Empty, control.AutoScrollMinSize); 2233public void ScrollableControl_SetAutoScrollMargin_Invoke_Success(bool autoScroll, int width, int height, Size expectedAutoScrollMargin, int expectedLayoutCallCount) 2257public void ScrollableControl_SetAutoScrollMargin_InvokeWithHandle_Success(bool autoScroll, int width, int height, Size expectedAutoScrollMargin, int expectedLayoutCallCount) 2293Size scrollableSize = new(100, 150); 2294Size nonScrollableSize = new(width, height); 2325public void ScrollableControl_SetDisplayRectLocation_Invoke_Success(bool autoScroll, int width, int height, int scrollX, int scrollY, Point expectedDisplayRectangleLocation, Size expectedDisplayRectangleSize) 2354Size scrollableSize = new(100, 150); 2355Size nonScrollableSize = new(width, height); 2386public void ScrollableControl_SetDisplayRectLocation_InvokeWithHandle_Success(bool autoScroll, int width, int height, int scrollX, int scrollY, Point expectedDisplayRectangleLocation, Size expectedDisplayRectangleSize, int expectedInvalidatedCallCount) 2528public void ScrollableControl_ScrollControlIntoView_Invoke_Success(bool autoScroll, bool hScroll, bool vScroll, Size clientSize, Control activeControl, Rectangle expectedDisplayRectangle) 2550protected override Size DefaultSize => new(100, 150); 2557protected override Size DefaultSize => new(50, 60); 2584public new Size DefaultMaximumSize => base.DefaultMaximumSize; 2586public new Size DefaultMinimumSize => base.DefaultMinimumSize; 2590public new Size DefaultSize => base.DefaultSize;
System\Windows\Forms\ScrollBarTests.cs (14)
8using Size = System.Drawing.Size; 38Assert.Equal(Size.Empty, control.ClientSize); 49Assert.Equal(Size.Empty, control.DefaultMaximumSize); 50Assert.Equal(Size.Empty, control.DefaultMinimumSize); 52Assert.Equal(Size.Empty, control.DefaultSize); 77Assert.Equal(Size.Empty, control.MaximumSize); 79Assert.Equal(Size.Empty, control.MinimumSize); 82Assert.Equal(Size.Empty, control.PreferredSize); 93Assert.Equal(Size.Empty, control.Size); 2587public void ScrollBar_ScaleScrollBarForDpi_InvokeWithSize_Nop(bool scaleScrollBarForDpiChange, int deviceDpiOld, int deviceDpiNew, ScrollOrientation orientation, Size controlSize, Size expected) 3172public new Size DefaultMaximumSize => base.DefaultMaximumSize; 3174public new Size DefaultMinimumSize => base.DefaultMinimumSize; 3178public new Size DefaultSize => base.DefaultSize;
System\Windows\Forms\SplitterPanelTests.cs (14)
7using Size = System.Drawing.Size; 31Assert.Equal(Size.Empty, control.AutoScrollMargin); 32Assert.Equal(Size.Empty, control.AutoScrollMinSize); 80Assert.Equal(Size.Empty, control.MaximumSize); 81Assert.Equal(Size.Empty, control.MinimumSize); 84Assert.Equal(Size.Empty, control.PreferredSize); 639public void SplitterPanel_MaximumSize_Set_GetReturnsExpected(Size value) 643Size = Size.Empty 650Assert.Equal(Size.Empty, control.Size); 657Assert.Equal(Size.Empty, control.Size); 664public void SplitterPanel_MinimumSize_Set_GetReturnsExpected(Size value, Size expectedSize, int expectedLayoutCallCount) 668Size = Size.Empty 782public void SplitterPanel_Size_Set_GetReturnsExpected(Size value, int expectedLayoutCallCount)
System\Windows\Forms\SplitterTests.cs (8)
8using Size = System.Drawing.Size; 50Assert.Equal(Size.Empty, control.DefaultMaximumSize); 51Assert.Equal(Size.Empty, control.DefaultMinimumSize); 76Assert.Equal(Size.Empty, control.MaximumSize); 77Assert.Equal(Size.Empty, control.MinimumSize); 2317public new Size DefaultMaximumSize => base.DefaultMaximumSize; 2319public new Size DefaultMinimumSize => base.DefaultMinimumSize; 2323public new Size DefaultSize => base.DefaultSize;
System\Windows\Forms\StatusStripTests.cs (11)
7using Size = System.Drawing.Size; 26Assert.Equal(Size.Empty, control.AutoScrollMargin); 27Assert.Equal(Size.Empty, control.AutoScrollMinSize); 58Assert.Equal(Size.Empty, control.DefaultMaximumSize); 59Assert.Equal(Size.Empty, control.DefaultMinimumSize); 108Assert.Equal(Size.Empty, control.MaximumSize); 110Assert.Equal(Size.Empty, control.MinimumSize); 1288public new Size DefaultMaximumSize => base.DefaultMaximumSize; 1290public new Size DefaultMinimumSize => base.DefaultMinimumSize; 1294public new Size DefaultSize => base.DefaultSize; 1328public new Size MaxItemSize => base.MaxItemSize;
System\Windows\Forms\SystemInformationTests.cs (26)
48Size size = SystemInformation.Border3DSize; 65Size size = SystemInformation.BorderSize; 74Size size = SystemInformation.CaptionButtonSize; 116Size size = SystemInformation.CursorSize; 117Assert.Contains(size, new Size[] { new(32, 32), new(48, 48), new(64, 64) }); 136Size size = SystemInformation.DoubleClickSize; 159Size size = SystemInformation.DragSize; 168Size size = SystemInformation.FixedFrameBorderSize; 193Size size = SystemInformation.FrameBorderSize; 257Size size = SystemInformation.IconSize; 266Size size = SystemInformation.IconSpacingSize; 403Size size = SystemInformation.MaxWindowTrackSize; 418Size size = SystemInformation.MenuBarButtonSize; 427Size size = SystemInformation.MenuButtonSize; 436Size size = SystemInformation.MenuCheckSize; 475Size size = SystemInformation.MinimizedWindowSize; 484Size size = SystemInformation.MinimizedWindowSize; 493Size size = SystemInformation.MinimumWindowSize; 502Size size = SystemInformation.MinWindowTrackSize; 540Size size = SystemInformation.MouseHoverSize; 627Size size = SystemInformation.PrimaryMonitorMaximizedWindowSize; 636Size size = SystemInformation.PrimaryMonitorSize; 679Size size = SystemInformation.SmallCaptionButtonSize; 688Size size = SystemInformation.SmallIconSize; 703Size size = SystemInformation.ToolWindowCaptionButtonSize; 820Size size = SystemInformation.GetBorderSizeForDpi(dpi);
System\Windows\Forms\TabControl.ControlCollectionTests.cs (6)
7using Size = System.Drawing.Size; 149yield return new object[] { TabAppearance.Buttons, Size.Empty, 0 }; 150yield return new object[] { TabAppearance.FlatButtons, Size.Empty, 1 }; 151yield return new object[] { TabAppearance.Normal, Size.Empty, 0 }; 160public void TabControlControlCollection_Add_InvokeValueWithoutHandleOwnerWithHandle_Success(TabAppearance appearance, Size itemSize, int expectedParentInvalidatedCallCount) 461public void TabControlControlCollection_Add_InvokeValueWithHandleOwnerWithHandle_Success(TabAppearance appearance, Size itemSize, int expectedParentInvalidatedCallCount)
System\Windows\Forms\TabControl.TabPageCollectionTests.cs (8)
8using Size = System.Drawing.Size; 137yield return new object[] { TabAppearance.Buttons, Size.Empty, 0 }; 138yield return new object[] { TabAppearance.FlatButtons, Size.Empty, 1 }; 139yield return new object[] { TabAppearance.Normal, Size.Empty, 0 }; 148public void TabPageCollection_Add_InvokeValueWithoutHandleOwnerWithHandle_Success(TabAppearance appearance, Size itemSize, int expectedParentInvalidatedCallCount) 455public void TabPageCollection_Add_InvokeValueWithHandleOwnerWithHandle_Success(TabAppearance appearance, Size itemSize, int expectedParentInvalidatedCallCount) 2085public void TabPageCollection_Insert_InvokeValueWithoutHandleOwnerWithHandle_Success(TabAppearance appearance, Size itemSize, int expectedParentInvalidatedCallCount) 2404public void TabPageCollection_Insert_InvokeValueWithHandleOwnerWithHandle_Success(TabAppearance appearance, Size itemSize, int expectedParentInvalidatedCallCount)
System\Windows\Forms\TabControlTests.cs (17)
9using Size = System.Drawing.Size; 52Assert.Equal(Size.Empty, control.DefaultMaximumSize); 53Assert.Equal(Size.Empty, control.DefaultMinimumSize); 75Assert.Equal(Size.Empty, control.ItemSize); 81Assert.Equal(Size.Empty, control.MaximumSize); 82Assert.Equal(Size.Empty, control.MinimumSize); 1445Size size = control.ItemSize; 1461Size size = control.ItemSize; 1477public void TabControl_ItemSize_Set_GetReturnsExpected(Size value) 1501public void TabControl_ItemSize_SetWithHandle_GetReturnsExpected(Size value) 1543control.ItemSize = Size.Empty; 1544Size size = control.ItemSize; 1574Assert.Equal(Size.Empty, control.ItemSize); 1598Assert.Equal(Size.Empty, control.ItemSize); 5733public new Size DefaultMaximumSize => base.DefaultMaximumSize; 5735public new Size DefaultMinimumSize => base.DefaultMinimumSize; 5739public new Size DefaultSize => base.DefaultSize;
System\Windows\Forms\TableLayoutPanelTests.cs (11)
9using Size = System.Drawing.Size; 26Assert.Equal(Size.Empty, control.AutoScrollMargin); 27Assert.Equal(Size.Empty, control.AutoScrollMinSize); 60Assert.Equal(Size.Empty, control.DefaultMaximumSize); 61Assert.Equal(Size.Empty, control.DefaultMinimumSize); 98Assert.Equal(Size.Empty, control.MaximumSize); 99Assert.Equal(Size.Empty, control.MinimumSize); 102Assert.Equal(Size.Empty, control.PreferredSize); 2183public new Size DefaultMaximumSize => base.DefaultMaximumSize; 2185public new Size DefaultMinimumSize => base.DefaultMinimumSize; 2189public new Size DefaultSize => base.DefaultSize;
System\Windows\Forms\TabPageTests.cs (25)
12using Size = System.Drawing.Size; 29Assert.Equal(Size.Empty, control.AutoScrollMargin); 30Assert.Equal(Size.Empty, control.AutoScrollMinSize); 60Assert.Equal(Size.Empty, control.DefaultMaximumSize); 61Assert.Equal(Size.Empty, control.DefaultMinimumSize); 95Assert.Equal(Size.Empty, control.MaximumSize); 96Assert.Equal(Size.Empty, control.MinimumSize); 99Assert.Equal(Size.Empty, control.PreferredSize); 138Assert.Equal(Size.Empty, control.AutoScrollMargin); 139Assert.Equal(Size.Empty, control.AutoScrollMinSize); 169Assert.Equal(Size.Empty, control.DefaultMaximumSize); 170Assert.Equal(Size.Empty, control.DefaultMinimumSize); 204Assert.Equal(Size.Empty, control.MaximumSize); 205Assert.Equal(Size.Empty, control.MinimumSize); 208Assert.Equal(Size.Empty, control.PreferredSize); 2419public void TabPage_MaximumSize_Set_GetReturnsExpected(Size value) 2423Size = Size.Empty 2430Assert.Equal(Size.Empty, control.Size); 2437Assert.Equal(Size.Empty, control.Size); 2444public void TabPage_MinimumSize_Set_GetReturnsExpected(Size value, Size expectedSize, int expectedLayoutCallCount) 2448Size = Size.Empty 5247public new Size DefaultMaximumSize => base.DefaultMaximumSize; 5249public new Size DefaultMinimumSize => base.DefaultMinimumSize; 5253public new Size DefaultSize => base.DefaultSize;
System\Windows\Forms\TextBoxBase.TextBoxBaseUiaTextProviderTests.cs (15)
277public void TextBoxBaseUiaTextProvider_GetLineFromCharIndex_ReturnsCorrectValue(Size size, bool multiline, int charIndex, int expectedLine) 291public void TextBoxBaseUiaTextProvider_GetLineFromCharIndex_ReturnsMinusOne_WithoutHandle(Size size, bool multiline, int charIndex, int expectedLine) 319public void TextBoxBaseUiaTextProvider_GetLineIndex_ReturnsCorrectValue(Size size, bool multiline, int lineIndex, int expectedIndex) 339public void TextBoxBaseUiaTextProvider_GetLineIndex_ReturnsMinusOne_WithoutHandle(Size size, bool multiline, int lineIndex, int expectedIndex) 398public void TextBoxBaseUiaTextProvider_GetPositionFromChar_ReturnsCorrectValue(Size size, string text, bool multiline, int charIndex, Point expectedPoint) 414public void TextBoxBaseUiaTextProvider_GetPositionFromChar_ReturnsEmpty_WithoutHandle(Size size, string text, bool multiline, int charIndex, Point expectedPoint) 444public void TextBoxBaseUiaTextProvider_GetPositionFromCharForUpperRightCorner_ReturnsCorrectValue(Size size, string text, bool multiline, int charIndex, Point expectedPoint) 458public void TextBoxBaseUiaTextProvider_GetPositionFromCharForUpperRightCorner_ReturnsMinusOne_WithoutHandle(Size size, string text, bool multiline, int charIndex, Point expectedPoint) 489public void TextBoxBaseUiaTextProvider_GetFormattingRectangle_ReturnsCorrectValue(bool multiline, Size size, Rectangle expectedRectangle) 504public void TextBoxBaseUiaTextProvider_GetFormattingRectangle_ReturnsEmpty_WithoutHandle(bool multiline, Size size, Rectangle expectedRectangle) 620public void TextBoxBaseUiaTextProvider_GetVisibleRangePoints_ForSinglelineTextBox_ReturnsCorrectValue(Size size, int expectedStart, int expectedEnd) 668Size size, int expectedStart, int expectedEnd) 695public void TextBoxBaseUiaTextProvider_GetVisibleRangePoints_ReturnsZeros_WithoutHandle(Size size, int expectedStart, int expectedEnd) 717public void TextBoxBaseUiaTextProvider_GetVisibleRanges_ReturnsCorrectValue(Size size) 735public void TextBoxBaseUiaTextProvider_GetVisibleRanges_ReturnsNull_WithoutHandle(Size size)
System\Windows\Forms\TextRendererTests.cs (32)
404Size result = TextRenderer.MeasureText(text, font); 414yield return new object[] { "string", null, Size.Empty }; 418yield return new object[] { "string", SystemFonts.MenuFont, Size.Empty }; 426public void TextRenderer_MeasureText_InvokeStringFontSize_ReturnsExpected(string text, Font font, Size proposedSize) 428Size result = TextRenderer.MeasureText(text, font, proposedSize); 438yield return new object[] { "string", null, Size.Empty, TextFormatFlags.Default }; 442yield return new object[] { "string", SystemFonts.MenuFont, Size.Empty, TextFormatFlags.Default }; 458public void TextRenderer_MeasureText_InvokeStringFontSizeTextFormatFlags_ReturnsExpected(string text, Font font, Size proposedSize, TextFormatFlags flags) 460Size result = TextRenderer.MeasureText(text, font, proposedSize, flags); 475Size result = TextRenderer.MeasureText(graphics, text, font); 485public void TextRenderer_MeasureText_InvokeIDeviceContextStringFontSize_ReturnsExpected(string text, Font font, Size proposedSize) 490Size result = TextRenderer.MeasureText(graphics, text, font, proposedSize); 500public void TextRenderer_MeasureText_InvokeIDeviceContextStringFontSizeTextFormatFlags_ReturnsExpected(string text, Font font, Size proposedSize, TextFormatFlags flags) 505Size result = TextRenderer.MeasureText(graphics, text, font, proposedSize, flags); 519Assert.Equal(Size.Empty, TextRenderer.MeasureText(text, SystemFonts.MenuFont)); 520Assert.Equal(Size.Empty, TextRenderer.MeasureText(text, SystemFonts.MenuFont, new Size(300, 400))); 521Assert.Equal(Size.Empty, TextRenderer.MeasureText(text, SystemFonts.MenuFont, new Size(300, 400), TextFormatFlags.Default)); 522Assert.Equal(Size.Empty, TextRenderer.MeasureText(graphics, text, SystemFonts.MenuFont)); 523Assert.Equal(Size.Empty, TextRenderer.MeasureText(graphics, text, SystemFonts.MenuFont, new Size(300, 400))); 524Assert.Equal(Size.Empty, TextRenderer.MeasureText(graphics, text, SystemFonts.MenuFont, new Size(300, 400), TextFormatFlags.Default)); 525Assert.Equal(Size.Empty, TextRenderer.MeasureText(text.AsSpan(), SystemFonts.MenuFont)); 526Assert.Equal(Size.Empty, TextRenderer.MeasureText(text.AsSpan(), SystemFonts.MenuFont, new Size(300, 400))); 527Assert.Equal(Size.Empty, TextRenderer.MeasureText(text.AsSpan(), SystemFonts.MenuFont, new Size(300, 400), TextFormatFlags.Default)); 528Assert.Equal(Size.Empty, TextRenderer.MeasureText(graphics, text.AsSpan(), SystemFonts.MenuFont)); 529Assert.Equal(Size.Empty, TextRenderer.MeasureText(graphics, text.AsSpan(), SystemFonts.MenuFont, new Size(300, 400))); 530Assert.Equal(Size.Empty, TextRenderer.MeasureText(graphics, text.AsSpan(), SystemFonts.MenuFont, new Size(300, 400), TextFormatFlags.Default)); 723public void TextRenderer_MeasureText_Padding(TextFormatFlags flags, Size expectedSize) 727Size size = TextRenderer.MeasureText( 737public static TheoryData<TextFormatFlags, Size> TextRenderer_MeasureText_Padding_TestData 800public void TextRenderer_MeasureText_ApplyState(TextFormatFlags flags, Size expectedSize) 814Size size = TextRenderer.MeasureText( 824public static TheoryData<TextFormatFlags, Size> TextRenderer_MeasureText_ApplyState_TestData
System\Windows\Forms\ToolStripButtonTests.cs (4)
8using Size = System.Drawing.Size; 1078yield return new object[] { Size.Empty }; 1087public void ToolStripButton_GetPreferredSize_Invoke_ReturnsExpected(Size proposedSize) 1730public new Size DefaultSize => base.DefaultSize;
System\Windows\Forms\ToolStripComboBoxTests.cs (5)
385Size constrainingSize = new(50, 50); 386Size preferredSize = _toolStripComboBox.GetPreferredSize(constrainingSize); 395Size constrainingSize = new(50, 50); 396Size basePreferredSize = new(100, 23); 397Size preferredSize = _toolStripComboBox.GetPreferredSize(constrainingSize);
System\Windows\Forms\ToolStripContentPanelTests.cs (22)
10using Size = System.Drawing.Size; 27Assert.Equal(Size.Empty, control.AutoScrollMargin); 28Assert.Equal(Size.Empty, control.AutoScrollMinSize); 57Assert.Equal(Size.Empty, control.DefaultMaximumSize); 58Assert.Equal(Size.Empty, control.DefaultMinimumSize); 92Assert.Equal(Size.Empty, control.MaximumSize); 93Assert.Equal(Size.Empty, control.MinimumSize); 96Assert.Equal(Size.Empty, control.PreferredSize); 245public void ToolStripContentPanel_AutoScrollMargin_Set_GetReturnsExpected(bool autoScroll, Size value, int expectedLayoutCallCount) 276public void ToolStripContentPanel_AutoScrollMargin_SetWithHandle_GetReturnsExpected(bool autoScroll, Size value, int expectedLayoutCallCount) 335public void ToolStripContentPanel_AutoScrollMinSize_Set_GetReturnsExpected(bool autoScroll, Size value, bool expectedAutoScroll, int expectedLayoutCallCount) 364public void ToolStripContentPanel_AutoScrollMinSize_SetWithHandle_GetReturnsExpected(bool autoScroll, Size value, bool expectedAutoScroll, int expectedLayoutCallCount) 1038public void ToolStripContentPanel_MaximumSize_Set_GetReturnsExpected(Size value) 1042Size = Size.Empty 1049Assert.Equal(Size.Empty, control.Size); 1056Assert.Equal(Size.Empty, control.Size); 1063public void ToolStripContentPanel_MinimumSize_Set_GetReturnsExpected(Size value, Size expectedSize, int expectedLayoutCallCount) 1067Size = Size.Empty 2028public new Size DefaultMaximumSize => base.DefaultMaximumSize; 2030public new Size DefaultMinimumSize => base.DefaultMinimumSize; 2034public new Size DefaultSize => base.DefaultSize;
System\Windows\Forms\ToolStripControlHostTests.cs (9)
10using Size = System.Drawing.Size; 2202public void ToolStripControlHost_Size_Set_GetReturnsExpected(Size value) 2226public void ToolStripControlHost_Size_SetDisposed_GetReturnsExpected(Size value) 2710yield return new object[] { Size.Empty }; 2719public void ToolStripControlHost_GetPreferredSize_Invoke_ReturnsExpected(Size proposedSize) 2734public void ToolStripControlHost_GetPreferredSize_InvokeWithPadding_ReturnsExpected(Size proposedSize) 2752public void ToolStripControlHost_GetPreferredSize_InvokeDisposed_ThrowsObjectDisposedException(Size proposedSize) 4115Assert.Equal(Size.Empty, c.Size); 4649public new Size DefaultSize => base.DefaultSize;
System\Windows\Forms\ToolStripDropDownItemTests.cs (2)
7using Size = System.Drawing.Size; 519public new Size DefaultSize => base.DefaultSize;
System\Windows\Forms\ToolStripDropDownTests.cs (12)
9using Size = System.Drawing.Size; 30Assert.Equal(Size.Empty, control.AutoScrollMargin); 31Assert.Equal(Size.Empty, control.AutoScrollMinSize); 62Assert.Equal(Size.Empty, control.DefaultMaximumSize); 63Assert.Equal(Size.Empty, control.DefaultMinimumSize); 115Assert.Equal(Size.Empty, control.MaximumSize); 117Assert.Equal(Size.Empty, control.MinimumSize); 5005var nonClientSize = SystemInformation.BorderSize; 5106public new Size DefaultMaximumSize => base.DefaultMaximumSize; 5108public new Size DefaultMinimumSize => base.DefaultMinimumSize; 5112public new Size DefaultSize => base.DefaultSize; 5146public new Size MaxItemSize => base.MaxItemSize;
System\Windows\Forms\ToolStripItemTests.cs (12)
10using Size = System.Drawing.Size; 7822protected override Size DefaultSize => new(10, 11); 7837public void ToolStripItem_Size_Set_GetReturnsExpected(Size value) 7855public void ToolStripItem_Size_SetWithOwner_GetReturnsExpected(Size value) 7891public void ToolStripItem_Size_SetWithOwnerWithHandle_GetReturnsExpected(Size value) 7950public void ToolStripItem_Size_SetWithParent_GetReturnsExpected(Size value, int expectedParentLayoutCallCount) 7993public void ToolStripItem_Size_SetWithParentWithHandle_GetReturnsExpected(Size value, int expectedParentLayoutCallCount) 10298yield return new object[] { Size.Empty }; 10307public void ToolStripItem_GetPreferredSize_Invoke_ReturnsExpected(Size proposedSize) 10318public void ToolStripItem_GetPreferredSize_InvokeWithOwner_ReturnsExpected(Size proposedSize) 10333public void ToolStripItem_GetPreferredSize_InvokeWithParent_ReturnsExpected(Size proposedSize) 15507public new Size DefaultSize => base.DefaultSize;
System\Windows\Forms\ToolStripMenuItemTests.cs (1)
439public new Size DefaultSize => base.DefaultSize;
System\Windows\Forms\ToolStripPanelTests.cs (18)
26Assert.Equal(Size.Empty, control.AutoScrollMargin); 28Assert.Equal(Size.Empty, control.AutoScrollMinSize); 45Assert.Equal(Size.Empty, control.ClientSize); 57Assert.Equal(Size.Empty, control.DefaultMaximumSize); 58Assert.Equal(Size.Empty, control.DefaultMinimumSize); 60Assert.Equal(Size.Empty, control.DefaultSize); 92Assert.Equal(Size.Empty, control.MaximumSize); 93Assert.Equal(Size.Empty, control.MinimumSize); 96Assert.Equal(Size.Empty, control.PreferredSize); 107Assert.Equal(Size.Empty, control.Size); 181public void AutoScrollMargin_Set_GetReturnsExpected(Size value) 196public void AutoScrollMargin_SetInvalid_ThrowsArgumentOutOfRangeException(Size value) 204public void AutoScrollMinSize_Set_GetReturnsExpected(Size value) 211Assert.Equal(value != Size.Empty, panel.AutoScroll); 216Assert.Equal(value != Size.Empty, panel.AutoScroll); 371public new Size DefaultMaximumSize => base.DefaultMaximumSize; 373public new Size DefaultMinimumSize => base.DefaultMinimumSize; 377public new Size DefaultSize => base.DefaultSize;
System\Windows\Forms\ToolStripRendererTests.cs (1)
5using Size = System.Drawing.Size;
System\Windows\Forms\ToolStripSeparatorTests.cs (22)
8using Size = System.Drawing.Size; 745yield return new object[] { Size.Empty }; 754public void ToolStripSeparator_GetPreferredSize_Invoke_ReturnsExpected(Size proposedSize) 765yield return new object[] { ToolStripLayoutStyle.Flow, Size.Empty, new Size(6, 23) }; 771yield return new object[] { ToolStripLayoutStyle.HorizontalStackWithOverflow, Size.Empty, new Size(6, 23) }; 777yield return new object[] { ToolStripLayoutStyle.StackWithOverflow, Size.Empty, new Size(6, 23) }; 783yield return new object[] { ToolStripLayoutStyle.Table, Size.Empty, new Size(6, 23) }; 789yield return new object[] { ToolStripLayoutStyle.VerticalStackWithOverflow, Size.Empty, new Size(23, 6) }; 798public void ToolStripSeparator_GetPreferredSize_InvokeWithOwner_ReturnsExpected(ToolStripLayoutStyle ownerLayoutStyle, Size proposedSize, Size expected) 818yield return new object[] { layoutStyle, Size.Empty }; 828public void ToolStripSeparator_GetPreferredSize_InvokeWithToolStripDropDownMenuOwner_ReturnsExpected(ToolStripLayoutStyle ownerLayoutStyle, Size proposedSize) 846public void ToolStripSeparator_GetPreferredSize_InvokeWithParent_ReturnsExpected(ToolStripLayoutStyle parentLayoutStyle, Size proposedSize, Size expected) 864yield return new object[] { ToolStripLayoutStyle.Flow, Size.Empty, new Size(91, 6) }; 870yield return new object[] { ToolStripLayoutStyle.HorizontalStackWithOverflow, Size.Empty, new Size(91, 6) }; 876yield return new object[] { ToolStripLayoutStyle.StackWithOverflow, Size.Empty, new Size(52, 6) }; 882yield return new object[] { ToolStripLayoutStyle.Table, Size.Empty, new Size(91, 6) }; 888yield return new object[] { ToolStripLayoutStyle.VerticalStackWithOverflow, Size.Empty, new Size(52, 6) }; 897public void ToolStripSeparator_GetPreferredSize_InvokeWithToolStripDropDownMenuParent_ReturnsExpected(ToolStripLayoutStyle ownerLayoutStyle, Size proposedSize, Size expected) 1641public new Size DefaultSize => base.DefaultSize;
System\Windows\Forms\ToolStripTests.cs (20)
11using Size = System.Drawing.Size; 30Assert.Equal(Size.Empty, control.AutoScrollMargin); 31Assert.Equal(Size.Empty, control.AutoScrollMinSize); 62Assert.Equal(Size.Empty, control.DefaultMaximumSize); 63Assert.Equal(Size.Empty, control.DefaultMinimumSize); 126Assert.Equal(Size.Empty, control.MaximumSize); 127Assert.Equal(Size.Empty, control.MinimumSize); 188Assert.Equal(Size.Empty, control.AutoScrollMargin); 189Assert.Equal(Size.Empty, control.AutoScrollMinSize); 219Assert.Equal(Size.Empty, control.DefaultMaximumSize); 220Assert.Equal(Size.Empty, control.DefaultMinimumSize); 281Assert.Equal(Size.Empty, control.MaximumSize); 282Assert.Equal(Size.Empty, control.MinimumSize); 817public void ToolStrip_AutoScrollMargin_Set_GetReturnsExpected(Size value, int expectedLayoutCallCount) 7264Size defaultSize = new(16, 16); 7400Size oldSize = toolStrip.MinimumSize; 7542public new Size DefaultMaximumSize => base.DefaultMaximumSize; 7544public new Size DefaultMinimumSize => base.DefaultMinimumSize; 7548public new Size DefaultSize => base.DefaultSize; 7582public new Size MaxItemSize => base.MaxItemSize;
System\Windows\Forms\TrackBarRendererTests.cs (3)
91void TestGetThumbSize(Func<Graphics, TrackBarThumbState, Size> getThumbSize) 93Size size = getThumbSize(_graphics, TrackBarThumbState.Normal); 94size.Should().NotBe(Size.Empty);
System\Windows\Forms\TreeViewTests.cs (7)
52Assert.Equal(Size.Empty, control.DefaultMaximumSize); 53Assert.Equal(Size.Empty, control.DefaultMinimumSize); 89Assert.Equal(Size.Empty, control.MaximumSize); 90Assert.Equal(Size.Empty, control.MinimumSize); 7584public new Size DefaultMaximumSize => base.DefaultMaximumSize; 7586public new Size DefaultMinimumSize => base.DefaultMinimumSize; 7590public new Size DefaultSize => base.DefaultSize;
System\Windows\Forms\UpDownBaseTests.cs (41)
8using Size = System.Drawing.Size; 24Assert.Equal(Size.Empty, control.AutoScrollMargin); 26Assert.Equal(Size.Empty, control.AutoScrollMinSize); 68Assert.Equal(Size.Empty, control.DefaultMaximumSize); 69Assert.Equal(Size.Empty, control.DefaultMinimumSize); 104Assert.Equal(Size.Empty, control.MaximumSize); 105Assert.Equal(Size.Empty, control.MinimumSize); 287public void UpDownBase_AutoScrollMargin_Set_GetReturnsExpected(bool autoScroll, Size value) 318public void UpDownBase_AutoScrollMargin_SetWithHandle_GetReturnsExpected(bool autoScroll, Size value) 374public void UpDownBase_AutoScrollMinSize_Set_GetReturnsExpected(bool autoScroll, Size value, int expectedLayoutCallCount) 403public void UpDownBase_AutoScrollMinSize_SetWithHandle_GetReturnsExpected(bool autoScroll, Size value, int expectedLayoutCallCount) 733public void UpDownBase_BorderStyle_Set_GetReturnsExpected(BorderStyle value, Size expectedPreferredSize) 770public void UpDownBase_BorderStyle_SetWithHandle_GetReturnsExpected(BorderStyle value, int expectedInvalidatedCallCount, int expectedCreatedCallCount, Size expectedPreferredSize) 1084yield return new object[] { Size.Empty, 120, 0 }; 1100public void UpDownBase_MaximumSize_Set_GetReturnsExpected(Size value, int expectedWidth, int expectedLayoutCallCount) 1128yield return new object[] { Size.Empty, 120, 0 }; 1144public void UpDownBase_MinimumSize_Set_GetReturnsExpected(Size value, int expectedWidth, int expectedLayoutCallCount) 1579yield return new object[] { Size.Empty }; 1588public void UpDownBase_GetPreferredSize_Invoke_ReturnsExpected(Size proposedSize) 1593Size preferredSize = control.GetPreferredSize(proposedSize); 1605public void UpDownBase_GetPreferredSize_InvokeWithBounds_ReturnsExpected(Size proposedSize) 1626yield return new object[] { Size.Empty, Size.Empty, new Size(30, 40), expectedWidth }; 1627yield return new object[] { new Size(10, 20), Size.Empty, new Size(30, 40), expectedWidth }; 1628yield return new object[] { new Size(30, 40), Size.Empty, new Size(30, 40), expectedWidth }; 1629yield return new object[] { new Size(31, 40), Size.Empty, new Size(30, 40), expectedWidth }; 1630yield return new object[] { new Size(30, 41), Size.Empty, new Size(30, 40), expectedWidth }; 1631yield return new object[] { new Size(40, 50), Size.Empty, new Size(30, 40), expectedWidth }; 1633yield return new object[] { Size.Empty, new Size(20, 10), new Size(30, 40), 20 }; 1634yield return new object[] { Size.Empty, new Size(30, 40), new Size(30, 40), 30 }; 1635yield return new object[] { Size.Empty, new Size(31, 40), new Size(30, 40), 31 }; 1636yield return new object[] { Size.Empty, new Size(30, 41), new Size(30, 40), 30 }; 1637yield return new object[] { Size.Empty, new Size(40, 50), new Size(30, 40), 40 }; 1650public void UpDownBase_GetPreferredSize_InvokeWithConstrainedSize_ReturnsExpected(Size minimumSize, Size maximumSize, Size proposedSize, int expectedWidth) 2243public void UpDownBase_OnPaint_Invoke_CallsPaint(Size size, bool enabled, BorderStyle borderStyle, Color backColor) 2279public void UpDownBase_OnPaint_InvokeWithHandle_CallsPaint(Size size, bool enabled, BorderStyle borderStyle, Color backColor) 3117public new Size DefaultMaximumSize => base.DefaultMaximumSize; 3119public new Size DefaultMinimumSize => base.DefaultMinimumSize; 3123public new Size DefaultSize => base.DefaultSize;
System\Windows\Forms\UserControlTests.cs (11)
10using Size = System.Drawing.Size; 30Assert.Equal(Size.Empty, control.AutoScrollMargin); 32Assert.Equal(Size.Empty, control.AutoScrollMinSize); 61Assert.Equal(Size.Empty, control.DefaultMaximumSize); 62Assert.Equal(Size.Empty, control.DefaultMinimumSize); 96Assert.Equal(Size.Empty, control.MaximumSize); 97Assert.Equal(Size.Empty, control.MinimumSize); 100Assert.Equal(Size.Empty, control.PreferredSize); 1809public new Size DefaultMaximumSize => base.DefaultMaximumSize; 1811public new Size DefaultMinimumSize => base.DefaultMinimumSize; 1815public new Size DefaultSize => base.DefaultSize;
System\Windows\Forms\VScrollBarTests.cs (8)
6using Size = System.Drawing.Size; 54Assert.Equal(Size.Empty, control.DefaultMaximumSize); 55Assert.Equal(Size.Empty, control.DefaultMinimumSize); 86Assert.Equal(Size.Empty, control.MaximumSize); 88Assert.Equal(Size.Empty, control.MinimumSize); 248public new Size DefaultMaximumSize => base.DefaultMaximumSize; 250public new Size DefaultMinimumSize => base.DefaultMinimumSize; 254public new Size DefaultSize => base.DefaultSize;
System\Windows\Forms\WebBrowserTests.cs (26)
10using Size = System.Drawing.Size; 49Assert.Equal(Size.Empty, control.DefaultMaximumSize); 50Assert.Equal(Size.Empty, control.DefaultMinimumSize); 73Assert.Equal(Size.Empty, control.MaximumSize); 74Assert.Equal(Size.Empty, control.MinimumSize); 4493yield return new object[] { Size.Empty, (IntPtr)(-1) }; 4494yield return new object[] { Size.Empty, PARAM.FromLowHigh(0, 0) }; 4495yield return new object[] { Size.Empty, PARAM.FromLowHigh(1, 2) }; 4496yield return new object[] { Size.Empty, PARAM.FromLowHigh(-1, -2) }; 4501public void WebBrowser_WndProc_InvokeContextMenuWithoutContextMenuStripWithoutHandle_Success(Size size, IntPtr lParam) 4532yield return new object[] { Size.Empty, (IntPtr)(-1), IntPtr.Zero, false }; 4533yield return new object[] { Size.Empty, PARAM.FromLowHigh(0, 0), IntPtr.Zero, true }; 4534yield return new object[] { Size.Empty, PARAM.FromLowHigh(1, 2), IntPtr.Zero, true }; 4535yield return new object[] { Size.Empty, PARAM.FromLowHigh(p.X, p.Y), IntPtr.Zero, true }; 4536yield return new object[] { Size.Empty, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, false }; 4541public void WebBrowser_WndProc_InvokeContextMenuWithContextMenuStripWithoutHandle_Success(Size size, IntPtr lParam, IntPtr expectedResult, bool expectedHandleCreated) 4567public void WebBrowser_WndProc_InvokeContextMenuWithoutContextMenuStripWithHandle_Success(Size size, IntPtr lParam) 4606yield return new object[] { Size.Empty, (IntPtr)(-1), IntPtr.Zero }; 4607yield return new object[] { Size.Empty, PARAM.FromLowHigh(0, 0), IntPtr.Zero }; 4608yield return new object[] { Size.Empty, PARAM.FromLowHigh(1, 2), IntPtr.Zero }; 4609yield return new object[] { Size.Empty, PARAM.FromLowHigh(p.X, p.Y), IntPtr.Zero }; 4610yield return new object[] { Size.Empty, PARAM.FromLowHigh(-1, -2), IntPtr.Zero }; 4615public void WebBrowser_WndProc_InvokeContextMenuWithContextMenuStripWithHandle_Success(Size size, IntPtr lParam, IntPtr expectedResult) 4678public new Size DefaultMaximumSize => base.DefaultMaximumSize; 4680public new Size DefaultMinimumSize => base.DefaultMinimumSize; 4684public new Size DefaultSize => base.DefaultSize;
Text\FontMetrics.cs (6)
67Size extent = screen.HDC.GetTextExtent("Whizzo Butter", hfont); 74public void Font_MeasureText(string family, float size, Size proposedSize, uint dt, Size expected) 85Size measure = screen.HDC.MeasureText("Windows Foundation Classes", hfont, proposedSize, (TextFormatFlags)dt); 89public static TheoryData<string, float, Size, uint, Size> MeasureTextData =>
TextBoxBaseTests.cs (40)
10using Size = System.Drawing.Size; 4996yield return new object[] { multiline, wordWrap, BorderStyle.Fixed3D, Size.Empty, new Size(4, s_preferredHeight) }; 5002yield return new object[] { multiline, wordWrap, BorderStyle.FixedSingle, Size.Empty, new Size(4, s_preferredHeight) }; 5008yield return new object[] { multiline, wordWrap, BorderStyle.None, Size.Empty, new Size(0, Control.DefaultFont.Height) }; 5019public void TextBox_GetPreferredSize_Invoke_ReturnsExpected(bool multiline, bool wordWrap, BorderStyle borderStyle, Size proposedSize, Size expected) 5037public void TextBox_GetPreferredSize_InvokeWithPadding_ReturnsExpected(bool multiline, bool wordWrap, BorderStyle borderStyle, Size proposedSize, Size expected) 5057yield return new object[] { BorderStyle.Fixed3D, Size.Empty, 4, s_preferredHeight }; 5063yield return new object[] { BorderStyle.FixedSingle, Size.Empty, 4, s_preferredHeight }; 5069yield return new object[] { BorderStyle.None, Size.Empty, 0, Control.DefaultFont.Height }; 5078public void TextBox_GetPreferredSize_InvokeWithText_ReturnsExpected(BorderStyle borderStyle, Size proposedSize, int expectedAdditionalWidth, int expectedHeight) 5097public void TextBox_GetPreferredSize_InvokeWithNewLineMultiline_ReturnsExpected(BorderStyle borderStyle, Size proposedSize, int expectedAdditionalWidth, int expectedMinimumHeight) 5107Size result = control.GetPreferredSize(proposedSize); 5121public void TextBox_GetPreferredSize_InvokeWithNewLineNotMultiline_ReturnsExpected(BorderStyle borderStyle, Size proposedSize, int expectedAdditionalWidth, int expectedHeight) 5128int width = TextRenderer.MeasureText(control.Text, control.Font, Size.Empty, TextFormatFlags.SingleLine).Width; 5130Size result = control.GetPreferredSize(proposedSize); 6940yield return new object[] { Size.Empty, shortcutsEnabled, (IntPtr)(-1), expectedResult }; 6941yield return new object[] { Size.Empty, shortcutsEnabled, PARAM.FromLowHigh(0, 0), expectedResult }; 6942yield return new object[] { Size.Empty, shortcutsEnabled, PARAM.FromLowHigh(1, 2), expectedResult }; 6943yield return new object[] { Size.Empty, shortcutsEnabled, PARAM.FromLowHigh(-1, -2), expectedResult }; 6949public void TextBoxBase_WndProc_InvokeContextMenuWithoutContextMenuStripWithoutHandle_Success(Size size, bool shortcutsEnabled, IntPtr lParam, IntPtr expectedResult) 6985yield return new object[] { Size.Empty, shortcutsEnabled, (IntPtr)(-1), expectedResult, false, false }; 6986yield return new object[] { Size.Empty, shortcutsEnabled, PARAM.FromLowHigh(0, 0), expectedResult, false, true }; 6987yield return new object[] { Size.Empty, shortcutsEnabled, PARAM.FromLowHigh(1, 2), expectedResult, false, true }; 6988yield return new object[] { Size.Empty, shortcutsEnabled, PARAM.FromLowHigh(p.X, p.Y), expectedResult, false, true }; 6989yield return new object[] { Size.Empty, shortcutsEnabled, PARAM.FromLowHigh(-1, -2), expectedResult, false, true }; 6995public void TextBoxBase_WndProc_InvokeContextMenuWithContextMenuStripWithoutHandle_Success(Size size, bool shortcutsEnabled, IntPtr lParam, IntPtr expectedResult, bool expectedHasSourceControl, bool expectedHandleCreated) 7022public void TextBoxBase_WndProc_InvokeContextMenuWithoutContextMenuStripWithHandle_Success(Size size, bool shortcutsEnabled, IntPtr lParam, IntPtr expectedResult) 7066yield return new object[] { Size.Empty, shortcutsEnabled, (IntPtr)(-1), expectedResult, false }; 7067yield return new object[] { Size.Empty, shortcutsEnabled, PARAM.FromLowHigh(0, 0), expectedResult, false }; 7068yield return new object[] { Size.Empty, shortcutsEnabled, PARAM.FromLowHigh(1, 2), expectedResult, false }; 7069yield return new object[] { Size.Empty, shortcutsEnabled, PARAM.FromLowHigh(p.X, p.Y), expectedResult, false }; 7070yield return new object[] { Size.Empty, shortcutsEnabled, PARAM.FromLowHigh(-1, -2), expectedResult, false }; 7076public void TextBoxBase_WndProc_InvokeContextMenuWithContextMenuStripWithHandle_Success(Size size, bool shortcutsEnabled, IntPtr lParam, IntPtr expectedResult, bool expectedHasSourceControl) 7695public new Size DefaultMaximumSize => base.DefaultMaximumSize; 7697public new Size DefaultMinimumSize => base.DefaultMinimumSize; 7701public new Size DefaultSize => base.DefaultSize; 7802public void TextBoxBase_GetLineFromCharIndex_ReturnsCorrectValue(Size size, bool multiline, int charIndex, int expectedLine) 7822public void TextBoxBase_GetPositionFromCharIndex_ReturnsCorrectValue(Size size, bool multiline, int charIndex, Point expectedPoint)
TextBoxTests.cs (8)
7using Size = System.Drawing.Size; 58Assert.Equal(Size.Empty, control.DefaultMaximumSize); 59Assert.Equal(Size.Empty, control.DefaultMinimumSize); 84Assert.Equal(Size.Empty, control.MaximumSize); 86Assert.Equal(Size.Empty, control.MinimumSize); 693public new Size DefaultMaximumSize => base.DefaultMaximumSize; 695public new Size DefaultMinimumSize => base.DefaultMinimumSize; 699public new Size DefaultSize => base.DefaultSize;
ToolStripContainerTests.cs (3)
45Size value = new(10, 10); 48Size result = (Size)propertyInfo.GetValue(_toolStripContainer);
TrackBarTests.cs (13)
8using Size = System.Drawing.Size; 51Assert.Equal(Size.Empty, control.DefaultMaximumSize); 52Assert.Equal(Size.Empty, control.DefaultMinimumSize); 79Assert.Equal(Size.Empty, control.MaximumSize); 81Assert.Equal(Size.Empty, control.MinimumSize); 857public void TrackBar_Handle_GetSize_Success(bool autoSize, Orientation orientation, Size expected) 1307public void TrackBar_Orientation_Set_GetReturnsExpected(bool autoSize, Orientation value, Size expectedSize, bool expectedFixedWidth) 1339public void TrackBar_Orientation_SetWithCustomOldValue_GetReturnsExpected(bool autoSize, Orientation value, Size expectedSize, bool expectedFixedWidth, bool expectedFixedHeight) 1373public void TrackBar_Orientation_SetWithHandle_GetReturnsExpected(bool autoSize, Orientation value, Size expectedSize, bool expectedFixedWidth, bool expectedFixedHeight, int expectedCreatedCallCount) 1419public void TrackBar_Orientation_SetWithCustomOldValueWithHandle_GetReturnsExpected(bool autoSize, Orientation value, Size expectedSize, bool expectedFixedWidth, bool expectedFixedHeight, int expectedCreatedCallCount) 3290public new Size DefaultMaximumSize => base.DefaultMaximumSize; 3292public new Size DefaultMinimumSize => base.DefaultMinimumSize; 3296public new Size DefaultSize => base.DefaultSize;
WebBrowserBaseTests.cs (4)
7using Size = System.Drawing.Size; 898public new Size DefaultMaximumSize => base.DefaultMaximumSize; 900public new Size DefaultMinimumSize => base.DefaultMinimumSize; 904public new Size DefaultSize => base.DefaultSize;
System.Windows.Forms.UI.IntegrationTests (27)
ButtonTests.cs (6)
117var originalFormSize = form.DisplayRectangle.Size; 141var originalFormSize = form.DisplayRectangle.Size; 167var originalFormSize = form.DisplayRectangle.Size; 197var originalFormSize = form.DisplayRectangle.Size; 260Size primaryMonitor = SystemInformation.PrimaryMonitorSize; 296Size primaryMonitor = SystemInformation.PrimaryMonitorSize;
Dpi\FormDpiTests.cs (5)
67var minSize = new Drawing.Size(100, 100); 68var maxSize = new Drawing.Size(500, 500); 101var minSize = new Drawing.Size(100, 100); 102var maxSize = new Drawing.Size(500, 500); 142Drawing.Size nonLinearSize = form.Size;
DragDropTests.cs (1)
716Size dragSize = SystemInformation.DragSize;
Infra\ControlTestBase.cs (2)
183Size primaryMonitor = SystemInformation.PrimaryMonitorSize; 192Size primaryMonitor = SystemInformation.PrimaryMonitorSize;
Infra\ScreenRecordService.cs (11)
149(TimeSpan elapsed, Bitmap image, Size offset)[] croppedFrames = DetectChangedRegions(frames); 159(TimeSpan elapsed, Bitmap image, Size offset) firstFrame = croppedFrames[0]; 197if (offset != Size.Empty || image.Size != frames[0].image.Size) 234private static (TimeSpan elapsed, Bitmap image, Size offset)[] DetectChangedRegions((TimeSpan elapsed, Bitmap image)[] frames) 242List<(TimeSpan elapsed, Bitmap image, Size offset)> resultFrames = new(frames.Length); 254resultFrames.Add((frames[0].elapsed, frames[0].image, offset: Size.Empty)); 319resultFrames.Add((frames[i].elapsed, frames[i].image, Size.Empty)); 323var offset = new Size(firstChangedColumn, firstChangedLine); 367private static void WriteFrame(Stream stream, byte[] buffer, Crc32 crc, ref int sequenceNumber, Bitmap frame, Size offset, TimeSpan delay) 472private static void WriteFctl(Stream stream, byte[] buffer, Crc32 crc, int sequenceNumber, Size size, Size offset, TimeSpan delay, ApngDisposeOp disposeOp, ApngBlendOp blendOp)
Infra\ScreenshotService.cs (1)
75Rectangle bounds = new(Cursor.Position - (Size)cursor.HotSpot, cursor.Size);
ListViewTests.cs (1)
546private void InitializeTileList(ListView listView, int columnCount, int subItemsCount, Size tileSize)
WindowsFormsIntegration (27)
System\Windows\Integration\Convert.cs (5)
234internal static Size ToSystemWindowsSize(SD.Size size, Vector scale) 245internal static Size ToSystemWindowsSize(SD.Size size, Vector scale, double dpiScaleX, double dpiScaleY) 256internal static SD.Size ToSystemDrawingSize(Size size, Vector scale) 264internal static SD.Size ToSystemDrawingSize(Size size, Vector scale, double dpiScaleX, double dpiScaleY) 288internal static SD.Size ConstraintToSystemDrawingSize(Size size, Vector scale, double dpiScaleX, double dpiScaleY)
System\Windows\Integration\ElementHost.cs (6)
93public override SD.Size GetPreferredSize(SD.Size proposedSize) 114SD.Size prefSize = Convert.ToSystemDrawingSize(_decorator.DesiredSize, scale); 127protected override System.Drawing.Size DefaultSize 315SD.Size maxElementSize = Convert.ToSystemDrawingSize(new Size(childFrameworkElement.MaxWidth, childFrameworkElement.MaxHeight), scale); 316SD.Size priorMaxSize = HostUtils.ConvertZeroToUnbounded(MaximumSize);
System\Windows\Integration\HostUtils.cs (12)
42public static SD.Size ConvertZeroToUnbounded(SD.Size size) 50public static SD.Size ConvertZeroOrOneToUnbounded(SD.Size size) 57public static SD.Size ConvertUnboundedToZero(SD.Size size) 70public static SD.Size UnionSizes(SD.Size size1, SD.Size size2) 77public static SD.Size IntersectSizes(SD.Size size1, SD.Size size2)
System\Windows\Integration\WindowsFormsHost.cs (4)
247SD.Size constraintSize = Convert.ConstraintToSystemDrawingSize(constraint, _currentScale, dpi.DpiScaleX, dpi.DpiScaleY); 248SD.Size preferredSize = Child.GetPreferredSize(constraintSize); 280SD.Size targetSize = Convert.ConstraintToSystemDrawingSize(finalSize, _currentScale, dpi.DpiScaleX, dpi.DpiScaleY); 819this.Size = SD.Size.Empty;
WinFormsControlsTest (1)
MainForm.cs (1)
269Size biggestButton = default;