206 references to new
System.Windows.Forms (2)
System\Windows\Forms\Controls\ListView\ListViewGroup.cs (2)
46private ListViewGroup(SerializationInfo info, StreamingContext context) : this() 54public ListViewGroup(string? key, string? headerText) : this()
System.Windows.Forms.Tests (201)
System\Windows\Forms\AccessibleObjects\ListVIew.ListViewAccessibleObjectTests.cs (3)
89ListViewGroup group = new(); 119ListViewGroup group = new(); 143ListViewGroup group = new();
System\Windows\Forms\AccessibleObjects\ListViewGroup.ListViewGroupAccessibleObjectTests.cs (9)
326ListViewGroup group = new(); 706ListViewGroup lvgroup1 = new() 715ListViewGroup lvgroup2 = new() 740ListViewGroup listViewGroup = new() 1158ListViewGroup listViewGroup = new(); 1219listView.Groups.Add(new ListViewGroup()); 1351ListViewGroup group = new(); 1367ListViewGroup group = new(); 1381ListViewGroup group = new();
System\Windows\Forms\AccessibleObjects\ListViewItem.ListViewItemAccessibleObjectTests.cs (7)
75ListViewGroup listviewGroup = new(); 1314listView.Groups.Add(new ListViewGroup()); 1348listView.Groups.Add(new ListViewGroup()); 1406listView.Groups.Add(new ListViewGroup()); 1480listView.Groups.Add(new ListViewGroup()); 1934ListViewGroup lvgroup1 = new() 1940ListViewGroup lvgroup2 = new()
System\Windows\Forms\BinaryFormat\WinFormsBinaryFormattedObjectTests.cs (1)
134new ListViewGroup(),
System\Windows\Forms\ListViewGroupCollectionTests.cs (96)
28ListViewGroup group = new(); 40collection.Add(new ListViewGroup()); 49collection.Add(new ListViewGroup()); 51ListViewGroup group = new(); 64collection.Add(new ListViewGroup()); 66ListViewGroup group = new(); 79collection.Add(new ListViewGroup()); 81ListViewGroup group = new(); 100collection.Add(new ListViewGroup()); 102ListViewGroup group = new(); 121ListViewGroup group1 = new(); 122ListViewGroup group2 = new(); 135collection.Add(new ListViewGroup()); 140ListViewGroup group = new(); 155ListViewGroup oldGroup = new(); 160ListViewGroup group = new(); 174collection.Add(new ListViewGroup()); 185collection.Add(new ListViewGroup()); 186Assert.Throws<ArgumentOutOfRangeException>("index", () => collection[index] = new ListViewGroup()); 195ListViewGroup group = new(); 207collection.Add(new ListViewGroup()); 216collection.Add(new ListViewGroup()); 218ListViewGroup group = new(); 229ListViewGroup group1 = new(); 230ListViewGroup group2 = new(); 245collection.Add(new ListViewGroup()); 246Assert.Throws<ArgumentOutOfRangeException>("index", () => collection[index] = new ListViewGroup()); 266ListViewGroup group1 = new(); 267ListViewGroup group2 = new() 287ListViewGroup group1 = new(); 288ListViewGroup group2 = new() 313ListViewGroup group1 = new(); 314ListViewGroup group2 = new() 321ListViewGroup group3 = new(); 336ListViewGroup group1 = new(); 337ListViewGroup group2 = new() 344ListViewGroup group3 = new(); 355collection["text"] = new ListViewGroup(); 372ListViewGroup group1 = new(); 378ListViewGroup group2 = new(); 391ListViewGroup group1 = new(); 397ListViewGroup group2 = new(); 410ListViewGroup group = new(); 429ListViewGroup group1 = new(); 438ListViewGroup group2 = new(); 446ListViewGroup group1 = new(); 447ListViewGroup group2 = new(); 464ListViewGroup group = new(); 491ListViewGroup group = new(); 519ListViewGroup group = new(); 540ListViewGroup group1 = new(); 541ListViewGroup group2 = new(); 558ListViewGroup group1 = new(); 559ListViewGroup group2 = new(); 587ListViewGroup group = new(); 597ListViewGroup group = new(); 617ListViewGroup group = new(); 645ListViewGroup group = new(); 649Assert.False(collection.Contains(new ListViewGroup())); 659Assert.False(collection.Contains(new ListViewGroup())); 668ListViewGroup group = new(); 672Assert.False(collection.Contains(new ListViewGroup())); 683Assert.False(collection.Contains(new ListViewGroup())); 693ListViewGroup group = new(); 697Assert.Equal(-1, collection.IndexOf(new ListViewGroup())); 707Assert.Equal(-1, collection.IndexOf(new ListViewGroup())); 716ListViewGroup group = new(); 720Assert.Equal(-1, collection.IndexOf(new ListViewGroup())); 731Assert.Equal(-1, collection.IndexOf(new ListViewGroup())); 741ListViewGroup group = new(); 742collection.Add(new ListViewGroup()); 756ListViewGroup group = new(); 757collection.Add(new ListViewGroup()); 771ListViewGroup group = new(); 790ListViewGroup group = new(); 805collection.Add(new ListViewGroup()); 810ListViewGroup group = new(); 830ListViewGroup group1 = new(); 831ListViewGroup group2 = new(); 847ListViewGroup group = new(); 863collection.Add(new ListViewGroup()); 874Assert.Throws<ArgumentOutOfRangeException>("index", () => collection.Insert(index, new ListViewGroup())); 882ListViewGroup group = new(); 883collection.Add(new ListViewGroup()); 909Assert.Throws<ArgumentOutOfRangeException>("index", () => collection.Insert(index, new ListViewGroup())); 917ListViewGroup group = new(); 941ListViewGroup group = new(); 963ListViewGroup group = new(); 983ListViewGroup group = new(); 995ListViewGroup group = new(); 997collection.Add(new ListViewGroup()); 998collection.Add(new ListViewGroup()); 999collection.Add(new ListViewGroup()); 1034ListViewGroup group = new(); 1064Assert.Throws<InvalidOperationException>(() => listView.Groups.Add(new ListViewGroup())); 1131Assert.Throws<InvalidOperationException>(() => listView.Groups.Insert(0, new ListViewGroup()));
System\Windows\Forms\ListViewGroupConverterTests.cs (3)
174new ListViewGroup(), 237Assert.Throws<NotSupportedException>(() => converter.ConvertTo(new ListViewGroup(), destinationType)); 251ListViewGroup item = new();
System\Windows\Forms\ListViewGroupTests.cs (56)
17ListViewGroup group = new(); 120ListViewGroup group = new() { CollapsedState = collapsedState }; 129ListViewGroup group = new(); 138ListViewGroup group = new() 156ListViewGroup group = new(); 175ListViewGroup group = new(); 222ListViewGroup group = new(); 250ListViewGroup group = new(); 258ListViewGroup group = new() 276ListViewGroup group = new() 294ListViewGroup group = new(); 316ListViewGroup group = new(); 362ListViewGroup group = new(); 390ListViewGroup group = new() 408ListViewGroup group = new() 426ListViewGroup group = new(); 448ListViewGroup group = new(); 499ListViewGroup group = new(); 530ListViewGroup group = new() 548ListViewGroup group = new(); 570ListViewGroup group = new(); 612ListViewGroup group = new(); 652ListViewGroup group = new() 672ListViewGroup group = new() 696ListViewGroup group = new() 751ListViewGroup group1 = new() 782ListViewGroup group = new(); 791ListViewGroup group = new() 809ListViewGroup group = new(); 831ListViewGroup group = new(); 873ListViewGroup group = new(); 904ListViewGroup group = new() 924ListViewGroup group = new() 948ListViewGroup group = new() 1003ListViewGroup group1 = new() 1034ListViewGroup group = new(); 1049ListViewGroup group = new() 1066ListViewGroup group = new() 1089ListViewGroup group = new() 1129ListViewGroup group = new(); 1170ListViewGroup group = new(); 1178ListViewGroup group = new() 1195ListViewGroup group = new() 1213ListViewGroup group = new(); 1235ListViewGroup group = new(); 1278ListViewGroup group = new(); 1307ListViewGroup group = new() 1321yield return new object[] { new ListViewGroup() }; 1324ListViewGroup groupWithEmptyItems = new(); 1328ListViewGroup groupWithItems = new(); 1366ListViewGroup group = new(); 1382ListViewGroup group = new(); 1400ListViewGroup group = new(); 1419ListViewGroup group = new(); 1431ListViewGroup listViewGroup = new(); 1446ListViewGroup listViewGroup = new();
System\Windows\Forms\ListViewItem.IKeyboardToolTipTests.cs (1)
125ListViewGroup listViewGroup = new();
System\Windows\Forms\ListViewItemConverterTests.cs (1)
50ListViewGroup group = new();
System\Windows\Forms\ListViewItemTests.cs (22)
46yield return new object[] { new string[] { null }, string.Empty, Color.Empty, Color.Empty, null, new ListViewGroup(), string.Empty, SystemColors.WindowText, SystemColors.Window, string.Empty }; 47yield return new object[] { new string[] { "text" }, "imageKey", Color.Blue, Color.Red, SystemFonts.MenuFont, new ListViewGroup(), "imageKey", Color.Blue, Color.Red, "text" }; 84yield return new object[] { new string[] { null }, 1, Color.Empty, Color.Empty, null, new ListViewGroup(), SystemColors.WindowText, SystemColors.Window, string.Empty }; 85yield return new object[] { new string[] { "text" }, 2, Color.Blue, Color.Red, SystemFonts.MenuFont, new ListViewGroup(), Color.Blue, Color.Red, "text" }; 198yield return new object[] { new ListViewItem.ListViewSubItem[] { new(null, "text") }, "imageKey", new ListViewGroup(), "imageKey", "text" }; 235yield return new object[] { new ListViewItem.ListViewSubItem[] { new(null, "text") }, -1, new ListViewGroup(), "text" }; 272yield return new object[] { new string[] { null }, string.Empty, new ListViewGroup(), string.Empty, string.Empty }; 273yield return new object[] { new string[] { "text" }, "imageKey", new ListViewGroup(), "imageKey", "text" }; 310yield return new object[] { new string[] { null }, 1, new ListViewGroup(), string.Empty }; 311yield return new object[] { new string[] { "text" }, 2, new ListViewGroup(), "text" }; 347yield return new object[] { string.Empty, string.Empty, new ListViewGroup(), string.Empty, string.Empty }; 348yield return new object[] { "text", "imageKey", new ListViewGroup(), "text", "imageKey" }; 385yield return new object[] { string.Empty, 0, new ListViewGroup(), string.Empty }; 386yield return new object[] { "text", 1, new ListViewGroup(), "text" }; 498yield return new object[] { new string[] { null }, new ListViewGroup(), string.Empty }; 499yield return new object[] { new string[] { "text" }, new ListViewGroup(), "text" }; 612yield return new object[] { "text", new ListViewGroup(), "text" }; 725yield return new object[] { new ListViewGroup() }; 833Assert.Throws<ArgumentNullException>("subItems", () => new ListViewItem((ListViewItem.ListViewSubItem[])null, "imageKey", new ListViewGroup())); 834Assert.Throws<ArgumentNullException>("subItems", () => new ListViewItem((ListViewItem.ListViewSubItem[])null, 0, new ListViewGroup())); 843Assert.Throws<ArgumentNullException>("subItems", () => new ListViewItem(subItems, "imageKey", new ListViewGroup())); 844Assert.Throws<ArgumentNullException>("subItems", () => new ListViewItem(subItems, 1, new ListViewGroup()));
System\Windows\Forms\ListViewTests.cs (2)
1920ListViewGroup group1 = new(); 1921ListViewGroup group2 = new()
WinFormsControlsTest (3)
ListViewTest.cs (3)
146ListViewGroup lvgroup1 = new() 159ListViewGroup lvgroup2 = new() 186ListViewGroup lvgroup1 = new()