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)
175new ListViewGroup(), 238Assert.Throws<NotSupportedException>(() => converter.ConvertTo(new ListViewGroup(), destinationType)); 252ListViewGroup 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(); 610ListViewGroup group = new(); 651ListViewGroup group = new() 671ListViewGroup group = new() 695ListViewGroup group = new() 750ListViewGroup group1 = new() 781ListViewGroup group = new(); 790ListViewGroup group = new() 808ListViewGroup group = new(); 830ListViewGroup group = new(); 870ListViewGroup group = new(); 901ListViewGroup group = new() 921ListViewGroup group = new() 945ListViewGroup group = new() 1000ListViewGroup group1 = new() 1031ListViewGroup group = new(); 1046ListViewGroup group = new() 1063ListViewGroup group = new() 1086ListViewGroup group = new() 1126ListViewGroup group = new(); 1167ListViewGroup group = new(); 1175ListViewGroup group = new() 1192ListViewGroup group = new() 1210ListViewGroup group = new(); 1232ListViewGroup group = new(); 1275ListViewGroup group = new(); 1304ListViewGroup group = new() 1318yield return new object[] { new ListViewGroup() }; 1321ListViewGroup groupWithEmptyItems = new(); 1325ListViewGroup groupWithItems = new(); 1363ListViewGroup group = new(); 1379ListViewGroup group = new(); 1397ListViewGroup group = new(); 1416ListViewGroup group = new(); 1428ListViewGroup listViewGroup = new(); 1443ListViewGroup listViewGroup = new();
System\Windows\Forms\ListViewItem.IKeyboardToolTipTests.cs (1)
125ListViewGroup listViewGroup = new();
System\Windows\Forms\ListViewItemConverterTests.cs (1)
51ListViewGroup 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()