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)
91ListViewGroup group = new(); 121ListViewGroup group = new(); 145ListViewGroup group = new();
System\Windows\Forms\AccessibleObjects\ListViewGroup.ListViewGroupAccessibleObjectTests.cs (9)
328ListViewGroup group = new(); 708ListViewGroup lvgroup1 = new() 717ListViewGroup lvgroup2 = new() 742ListViewGroup listViewGroup = new() 1160ListViewGroup listViewGroup = new(); 1221listView.Groups.Add(new ListViewGroup()); 1353ListViewGroup group = new(); 1369ListViewGroup group = new(); 1383ListViewGroup group = new();
System\Windows\Forms\AccessibleObjects\ListViewItem.ListViewItemAccessibleObjectTests.cs (7)
77ListViewGroup listviewGroup = new(); 1316listView.Groups.Add(new ListViewGroup()); 1350listView.Groups.Add(new ListViewGroup()); 1408listView.Groups.Add(new ListViewGroup()); 1482listView.Groups.Add(new ListViewGroup()); 1936ListViewGroup lvgroup1 = new() 1942ListViewGroup lvgroup2 = new()
System\Windows\Forms\BinaryFormat\WinFormsBinaryFormattedObjectTests.cs (1)
238new ListViewGroup(),
System\Windows\Forms\ListViewGroupCollectionTests.cs (96)
30ListViewGroup group = new(); 42collection.Add(new ListViewGroup()); 51collection.Add(new ListViewGroup()); 53ListViewGroup group = new(); 66collection.Add(new ListViewGroup()); 68ListViewGroup group = new(); 81collection.Add(new ListViewGroup()); 83ListViewGroup group = new(); 102collection.Add(new ListViewGroup()); 104ListViewGroup group = new(); 123ListViewGroup group1 = new(); 124ListViewGroup group2 = new(); 137collection.Add(new ListViewGroup()); 142ListViewGroup group = new(); 157ListViewGroup oldGroup = new(); 162ListViewGroup group = new(); 176collection.Add(new ListViewGroup()); 187collection.Add(new ListViewGroup()); 188Assert.Throws<ArgumentOutOfRangeException>("index", () => collection[index] = new ListViewGroup()); 197ListViewGroup group = new(); 209collection.Add(new ListViewGroup()); 218collection.Add(new ListViewGroup()); 220ListViewGroup group = new(); 231ListViewGroup group1 = new(); 232ListViewGroup group2 = new(); 247collection.Add(new ListViewGroup()); 248Assert.Throws<ArgumentOutOfRangeException>("index", () => collection[index] = new ListViewGroup()); 268ListViewGroup group1 = new(); 269ListViewGroup group2 = new() 289ListViewGroup group1 = new(); 290ListViewGroup group2 = new() 315ListViewGroup group1 = new(); 316ListViewGroup group2 = new() 323ListViewGroup group3 = new(); 338ListViewGroup group1 = new(); 339ListViewGroup group2 = new() 346ListViewGroup group3 = new(); 357collection["text"] = new ListViewGroup(); 374ListViewGroup group1 = new(); 380ListViewGroup group2 = new(); 393ListViewGroup group1 = new(); 399ListViewGroup group2 = new(); 412ListViewGroup group = new(); 431ListViewGroup group1 = new(); 440ListViewGroup group2 = new(); 448ListViewGroup group1 = new(); 449ListViewGroup group2 = new(); 466ListViewGroup group = new(); 493ListViewGroup group = new(); 521ListViewGroup group = new(); 542ListViewGroup group1 = new(); 543ListViewGroup group2 = new(); 560ListViewGroup group1 = new(); 561ListViewGroup group2 = new(); 589ListViewGroup group = new(); 599ListViewGroup group = new(); 619ListViewGroup group = new(); 647ListViewGroup group = new(); 651Assert.False(collection.Contains(new ListViewGroup())); 661Assert.False(collection.Contains(new ListViewGroup())); 670ListViewGroup group = new(); 674Assert.False(collection.Contains(new ListViewGroup())); 685Assert.False(collection.Contains(new ListViewGroup())); 695ListViewGroup group = new(); 699Assert.Equal(-1, collection.IndexOf(new ListViewGroup())); 709Assert.Equal(-1, collection.IndexOf(new ListViewGroup())); 718ListViewGroup group = new(); 722Assert.Equal(-1, collection.IndexOf(new ListViewGroup())); 733Assert.Equal(-1, collection.IndexOf(new ListViewGroup())); 743ListViewGroup group = new(); 744collection.Add(new ListViewGroup()); 758ListViewGroup group = new(); 759collection.Add(new ListViewGroup()); 773ListViewGroup group = new(); 792ListViewGroup group = new(); 807collection.Add(new ListViewGroup()); 812ListViewGroup group = new(); 832ListViewGroup group1 = new(); 833ListViewGroup group2 = new(); 849ListViewGroup group = new(); 865collection.Add(new ListViewGroup()); 876Assert.Throws<ArgumentOutOfRangeException>("index", () => collection.Insert(index, new ListViewGroup())); 884ListViewGroup group = new(); 885collection.Add(new ListViewGroup()); 911Assert.Throws<ArgumentOutOfRangeException>("index", () => collection.Insert(index, new ListViewGroup())); 919ListViewGroup group = new(); 943ListViewGroup group = new(); 965ListViewGroup group = new(); 985ListViewGroup group = new(); 997ListViewGroup group = new(); 999collection.Add(new ListViewGroup()); 1000collection.Add(new ListViewGroup()); 1001collection.Add(new ListViewGroup()); 1036ListViewGroup group = new(); 1066Assert.Throws<InvalidOperationException>(() => listView.Groups.Add(new ListViewGroup())); 1133Assert.Throws<InvalidOperationException>(() => listView.Groups.Insert(0, new ListViewGroup()));
System\Windows\Forms\ListViewGroupConverterTests.cs (3)
176new ListViewGroup(), 239Assert.Throws<NotSupportedException>(() => converter.ConvertTo(new ListViewGroup(), destinationType)); 253ListViewGroup item = new();
System\Windows\Forms\ListViewGroupTests.cs (56)
19ListViewGroup group = new(); 122ListViewGroup group = new() { CollapsedState = collapsedState }; 131ListViewGroup group = new(); 140ListViewGroup group = new() 158ListViewGroup group = new(); 177ListViewGroup group = new(); 224ListViewGroup group = new(); 252ListViewGroup group = new(); 260ListViewGroup group = new() 278ListViewGroup group = new() 296ListViewGroup group = new(); 318ListViewGroup group = new(); 364ListViewGroup group = new(); 392ListViewGroup group = new() 410ListViewGroup group = new() 428ListViewGroup group = new(); 450ListViewGroup group = new(); 501ListViewGroup group = new(); 532ListViewGroup group = new() 550ListViewGroup group = new(); 572ListViewGroup group = new(); 614ListViewGroup group = new(); 654ListViewGroup group = new() 674ListViewGroup group = new() 698ListViewGroup group = new() 753ListViewGroup group1 = new() 784ListViewGroup group = new(); 793ListViewGroup group = new() 811ListViewGroup group = new(); 833ListViewGroup group = new(); 875ListViewGroup group = new(); 906ListViewGroup group = new() 926ListViewGroup group = new() 950ListViewGroup group = new() 1005ListViewGroup group1 = new() 1036ListViewGroup group = new(); 1051ListViewGroup group = new() 1068ListViewGroup group = new() 1091ListViewGroup group = new() 1131ListViewGroup group = new(); 1172ListViewGroup group = new(); 1180ListViewGroup group = new() 1197ListViewGroup group = new() 1215ListViewGroup group = new(); 1237ListViewGroup group = new(); 1280ListViewGroup group = new(); 1309ListViewGroup group = new() 1323yield return new object[] { new ListViewGroup() }; 1326ListViewGroup groupWithEmptyItems = new(); 1330ListViewGroup groupWithItems = new(); 1368ListViewGroup group = new(); 1384ListViewGroup group = new(); 1402ListViewGroup group = new(); 1421ListViewGroup group = new(); 1433ListViewGroup listViewGroup = new(); 1448ListViewGroup listViewGroup = new();
System\Windows\Forms\ListViewItem.IKeyboardToolTipTests.cs (1)
127ListViewGroup listViewGroup = new();
System\Windows\Forms\ListViewItemConverterTests.cs (1)
52ListViewGroup group = new();
System\Windows\Forms\ListViewItemTests.cs (22)
48yield return new object[] { new string[] { null }, string.Empty, Color.Empty, Color.Empty, null, new ListViewGroup(), string.Empty, SystemColors.WindowText, SystemColors.Window, string.Empty }; 49yield return new object[] { new string[] { "text" }, "imageKey", Color.Blue, Color.Red, SystemFonts.MenuFont, new ListViewGroup(), "imageKey", Color.Blue, Color.Red, "text" }; 86yield return new object[] { new string[] { null }, 1, Color.Empty, Color.Empty, null, new ListViewGroup(), SystemColors.WindowText, SystemColors.Window, string.Empty }; 87yield return new object[] { new string[] { "text" }, 2, Color.Blue, Color.Red, SystemFonts.MenuFont, new ListViewGroup(), Color.Blue, Color.Red, "text" }; 200yield return new object[] { new ListViewItem.ListViewSubItem[] { new(null, "text") }, "imageKey", new ListViewGroup(), "imageKey", "text" }; 237yield return new object[] { new ListViewItem.ListViewSubItem[] { new(null, "text") }, -1, new ListViewGroup(), "text" }; 274yield return new object[] { new string[] { null }, string.Empty, new ListViewGroup(), string.Empty, string.Empty }; 275yield return new object[] { new string[] { "text" }, "imageKey", new ListViewGroup(), "imageKey", "text" }; 312yield return new object[] { new string[] { null }, 1, new ListViewGroup(), string.Empty }; 313yield return new object[] { new string[] { "text" }, 2, new ListViewGroup(), "text" }; 349yield return new object[] { string.Empty, string.Empty, new ListViewGroup(), string.Empty, string.Empty }; 350yield return new object[] { "text", "imageKey", new ListViewGroup(), "text", "imageKey" }; 387yield return new object[] { string.Empty, 0, new ListViewGroup(), string.Empty }; 388yield return new object[] { "text", 1, new ListViewGroup(), "text" }; 500yield return new object[] { new string[] { null }, new ListViewGroup(), string.Empty }; 501yield return new object[] { new string[] { "text" }, new ListViewGroup(), "text" }; 614yield return new object[] { "text", new ListViewGroup(), "text" }; 727yield return new object[] { new ListViewGroup() }; 835Assert.Throws<ArgumentNullException>("subItems", () => new ListViewItem((ListViewItem.ListViewSubItem[])null, "imageKey", new ListViewGroup())); 836Assert.Throws<ArgumentNullException>("subItems", () => new ListViewItem((ListViewItem.ListViewSubItem[])null, 0, new ListViewGroup())); 845Assert.Throws<ArgumentNullException>("subItems", () => new ListViewItem(subItems, "imageKey", new ListViewGroup())); 846Assert.Throws<ArgumentNullException>("subItems", () => new ListViewItem(subItems, 1, new ListViewGroup()));
System\Windows\Forms\ListViewTests.cs (2)
1922ListViewGroup group1 = new(); 1923ListViewGroup group2 = new()
WinFormsControlsTest (3)
ListViewTest.cs (3)
146ListViewGroup lvgroup1 = new() 159ListViewGroup lvgroup2 = new() 186ListViewGroup lvgroup1 = new()