298 instantiations of ListViewGroup
System.Windows.Forms (2)
System\Windows\Forms\Controls\ListView\ListView.cs (1)
737_defaultGroup ??= new ListViewGroup(string.Format(SR.ListViewGroupDefaultGroup, "1"))
System\Windows\Forms\Controls\ListView\ListViewGroupCollection.cs (1)
136ListViewGroup group = new(key, headerText);
System.Windows.Forms.Tests (292)
SerializableTypesTests.cs (1)
126ListViewGroup listViewGroup = new("Header", HorizontalAlignment.Center)
System\Windows\Forms\AccessibleObjects\ListVIew.ListViewAccessibleObjectTests.cs (25)
89ListViewGroup group = new(); 119ListViewGroup group = new(); 143ListViewGroup group = new(); 273ListViewGroup listViewGroup = new("Test Group"); 351ListViewGroup listViewGroup = new("Test Group"); 397listView.Groups.Add(new ListViewGroup("Test Group")); 454listView.Groups.Add(new ListViewGroup("Test Group")); 520listView.Groups.Add(new ListViewGroup("Test Group")); 591listView.Groups.Add(new ListViewGroup("Test Group")); 646listView.Groups.Add(new ListViewGroup("Test Group 1")); 647listView.Groups.Add(new ListViewGroup("Test Group 2")); 726listView.Groups.Add(new ListViewGroup("Test Group 1")); 727listView.Groups.Add(new ListViewGroup("Test Group 2")); 804listView.Groups.Add(new ListViewGroup("Test Group 1")); 806listView.Groups.Add(new ListViewGroup("Test Group 2")); 860listView.Groups.Add(new ListViewGroup("Test Group 1")); 861listView.Groups.Add(new ListViewGroup("Test Group 2")); 921ListViewGroup listGroup1 = new("Group1"); 922ListViewGroup listGroup2 = new("Group2"); 923ListViewGroup listGroup3 = new("Group2"); 1391ListViewGroup listViewGroup = new("Test"); 1722ListViewGroup listViewGroupWithoutItems = new("Group without items"); 1723ListViewGroup listViewGroupWithItems1 = new("Group with item 1"); 1724ListViewGroup listViewGroupWithItems2 = new("Group with item 2"); 1725ListViewGroup listViewGroupWithInvisibleItems = new("Group with invisible item");
System\Windows\Forms\AccessibleObjects\ListViewGroup.ListViewGroupAccessibleObjectTests.cs (42)
20ListViewGroup listGroup = new("Group1"); 30ListViewGroup listGroupWithoutList = new("Group2"); 38ListViewGroup listGroup = new("Group1"); 53ListViewGroup listGroup = new("Group1"); 84ListViewGroup listGroup = new("Group1"); 117ListViewGroup listGroup = new(name) { Subtitle = subtitle }; 144groups.Add(new ListViewGroup("Group1")); 145groups.Add(new ListViewGroup("Group2")); 213groups.Add(new ListViewGroup("Group1")); 214groups.Add(new ListViewGroup("Group2")); 278ListViewGroup listGroup = new("Group1"); 326ListViewGroup group = new(); 377groups.Add(new ListViewGroup("Group1")); 378groups.Add(new ListViewGroup("Group2")); 472groups.Add(new ListViewGroup("Group1")); 473groups.Add(new ListViewGroup("Group2")); 508groups.Add(new ListViewGroup("Group1")); 509groups.Add(new ListViewGroup("Group2")); 592groups.Add(new ListViewGroup("Group1")); 593groups.Add(new ListViewGroup("Group2")); 594groups.Add(new ListViewGroup("Group3")); 665ListViewGroup listViewGroup = new("Test Group"); 706ListViewGroup lvgroup1 = new() 715ListViewGroup lvgroup2 = new() 740ListViewGroup listViewGroup = new() 793ListViewGroup group1 = new("Group 1") { CollapsedState = firstGroupSate }; 794ListViewGroup group2 = new("Group 2") { CollapsedState = ListViewGroupCollapsedState.Expanded }; 795ListViewGroup group3 = new("Group 3") { CollapsedState = ListViewGroupCollapsedState.Expanded }; 1158ListViewGroup listViewGroup = new(); 1219listView.Groups.Add(new ListViewGroup()); 1231ListViewGroup listViewGroupWithoutItems = new("Group without items"); 1232ListViewGroup listViewGroupWithItems1 = new("Group with item 1"); 1233ListViewGroup listViewGroupWithItems2 = new("Group with item 2"); 1234ListViewGroup listViewGroupWithInvisibleItems = new("Group with invisible item"); 1262ListViewGroup listGroup1 = new("Group1"); 1263ListViewGroup listGroup2 = new("Group2"); 1323ListViewGroup listGroup = new("Test") 1351ListViewGroup group = new(); 1367ListViewGroup group = new(); 1381ListViewGroup group = new(); 1401ListViewGroup listViewGroup = new("Test group"); 1434ListViewGroup listViewGroup = new("Test Group");
System\Windows\Forms\AccessibleObjects\ListViewItem.ListViewItemAccessibleObjectTests.cs (10)
75ListViewGroup listviewGroup = new(); 1143ListViewGroup listViewGroup = new("Test"); 1204ListViewGroup listViewGroup = new("Test") { CollapsedState = state }; 1256ListViewGroup listViewGroup = new("Test group"); 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\AccessibleObjects\ListViewItem.ListViewSubItem.ListViewSubItemAccessibleObjectTests.cs (1)
807ListViewGroup listViewGroup = new("Test");
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 (11)
38ListViewGroup group = new("name", "header"); 72ListViewGroup group = new("name", "header"); 97listViewWithGroups.Groups.Add(new ListViewGroup("name", "header")); 151ListViewGroup group = new("name", "header"); 174new ListViewGroup(), 180new ListViewGroup("key", "headerText"), 186new ListViewGroup("header"), 192new ListViewGroup("header", HorizontalAlignment.Center), 237Assert.Throws<NotSupportedException>(() => converter.ConvertTo(new ListViewGroup(), destinationType)); 251ListViewGroup item = new(); 267ListViewGroup group = new("name", "header");
System\Windows\Forms\ListViewGroupTests.cs (61)
17ListViewGroup group = new(); 38ListViewGroup group = new(header); 68ListViewGroup group = new(header, headerAlignment); 96ListViewGroup group = new(key, header); 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() }; 1319yield return new object[] { new ListViewGroup("header", HorizontalAlignment.Center) { Name = "name", Tag = "tag" } }; 1321ListViewGroup groupWithEmptyItems = new(); 1325ListViewGroup groupWithItems = new(); 1356ListViewGroup group = new(header); 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)
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 (20)
1920ListViewGroup group1 = new(); 1921ListViewGroup group2 = new() 4541ListViewGroup group = new("Test group"); 4567ListViewGroup group1 = new("Test group1"); 4568ListViewGroup group2 = new("Test group2"); 4569ListViewGroup group3 = new("Test group3"); 4618ListViewGroup group = new("Test group"); 5651var groups = new ListViewGroup[] { new("Group 1"), new("Group 2"), new("Group 3") }; 5689var groups = new ListViewGroup[] { new("Group 1"), new("Group 2"), new("Group 3") }; 5726var groups = new ListViewGroup[] { new("Group 1"), new("Group 2"), new("Group 3") }; 5762var groups = new ListViewGroup[] { new("Group 1"), new("Group 2"), new("Group 3") }; 6189ListViewGroup listViewGroup = new("Test");
System.Windows.Forms.UI.IntegrationTests (1)
ListViewTests.cs (1)
50ListViewGroup group = new($"Group 1", HorizontalAlignment.Left) { CollapsedState = ListViewGroupCollapsedState.Expanded };
WinFormsControlsTest (3)
ListViewTest.cs (3)
146ListViewGroup lvgroup1 = new() 159ListViewGroup lvgroup2 = new() 186ListViewGroup lvgroup1 = new()
361 references to ListViewGroup
System.Windows.Forms (89)
System\Windows\Forms\Controls\ListView\ListView.cs (23)
16using static System.Windows.Forms.ListViewGroup; 129private ListViewGroup? _defaultGroup; 130private ListViewGroup? _focusedGroup; 736internal ListViewGroup DefaultGroup => 780internal ListViewGroup? FocusedGroup 916/// An <see cref="ImageList"/> that contains the icons to use for <see cref="ListViewGroup"/>. 925/// property, you can set the <see cref="ListViewGroup.TitleImageIndex"/> property of each <see cref="ListViewGroup"/> 1971/// Occurs when the user clicks a <see cref="ListViewGroup.TaskLink"/> on a <see cref="ListViewGroup"/>. 2096/// Occurs when the <see cref="ListViewGroup.CollapsedState"/> changes on a <see cref="ListViewGroup"/>. 3678foreach (ListViewGroup group in Groups) 3925internal void InsertGroupInListView(int index, ListViewGroup group) 3972private unsafe void InsertGroupNative(int index, ListViewGroup group) 4410ListViewGroup listViewGroup = Groups[e.GroupIndex]; 5054foreach (ListViewGroup group in Groups) 5069internal void RemoveGroupFromListView(ListViewGroup group) 5094private void RemoveGroupNative(ListViewGroup group) 5674internal void UpdateGroupNative(ListViewGroup group) 5682private unsafe nint SendGroupMessage(ListViewGroup group, uint msg, nint lParam, LVGROUP_MASK additionalMask) 6359ListViewGroup targetGroup = _groups[i]; 6921ListViewGroup? group = selectedItem.Group;
System\Windows\Forms\Controls\ListView\ListView.ListViewAccessibleObject.cs (8)
99IReadOnlyList<ListViewGroup> visibleGroups = GetVisibleGroups(); 141IReadOnlyList<ListViewGroup> visibleGroups = GetVisibleGroups(); 215IReadOnlyList<ListViewGroup> visibleGroups = GetVisibleGroups(); 258internal IReadOnlyList<ListViewGroup> GetVisibleGroups() 260List<ListViewGroup> list = []; 272foreach (ListViewGroup listViewGroup in owningListView.Groups) 274if (listViewGroup.AccessibilityObject is ListViewGroup.ListViewGroupAccessibleObject listViewGroupAccessibleObject 296IReadOnlyList<ListViewGroup> visibleGroups = GetVisibleGroups();
System\Windows\Forms\Controls\ListView\ListViewGroup.ListViewGroupAccessibleObject.cs (3)
17private readonly ListViewGroup _owningGroup; 20public ListViewGroupAccessibleObject(ListViewGroup owningGroup, bool owningGroupIsDefault) 37=> $"{nameof(ListViewGroup)}-{CurrentIndex}";
System\Windows\Forms\Controls\ListView\ListViewGroupCollapsedState.cs (1)
7/// Specifies the appearance of a <see cref="ListViewGroup"/>.
System\Windows\Forms\Controls\ListView\ListViewGroupCollection.cs (20)
17private List<ListViewGroup>? _list; 34private List<ListViewGroup> List => _list ??= []; 36public ListViewGroup this[int index] 54public ListViewGroup? this[string key] 105if (value is ListViewGroup group) 112public int Add(ListViewGroup group) 134public ListViewGroup Add(string? key, string? headerText) 136ListViewGroup group = new(key, headerText); 143if (value is not ListViewGroup group) 151public void AddRange(params ListViewGroup[] groups) 173private void CheckListViewItems(ListViewGroup group) 209public bool Contains(ListViewGroup value) => List.Contains(value); 213if (value is not ListViewGroup group) 225public int IndexOf(ListViewGroup value) => List.IndexOf(value); 229if (value is not ListViewGroup group) 237public void Insert(int index, ListViewGroup group) 259if (value is ListViewGroup group) 265private void MoveGroupItems(ListViewGroup group) 278public void Remove(ListViewGroup group) 296if (value is ListViewGroup group)
System\Windows\Forms\Controls\ListView\ListViewGroupConverter.cs (5)
62foreach (ListViewGroup group in item.ListView.Groups) 92if (destinationType == typeof(InstanceDescriptor) && value is ListViewGroup group) 95ConstructorInfo ctor = typeof(ListViewGroup).GetConstructor([typeof(string), typeof(HorizontalAlignment)])!; 117List<ListViewGroup?> list = new(); 118foreach (ListViewGroup group in item.ListView.Groups)
System\Windows\Forms\Controls\ListView\ListViewGroupEventArgs.cs (2)
15/// <param name="groupIndex">The index of the <see cref="ListViewGroup"/> associated with the event.</param> 22/// Gets the index of the <see cref="ListViewGroup"/> associated with the event.
System\Windows\Forms\Controls\ListView\ListViewGroupImageIndexer.cs (5)
8/// ListViewGroupImageIndexer is a class used to support <see cref="ListViewGroup.TitleImageIndex"/> and 9/// <see cref="ListViewGroup.TitleImageKey"/>. 13private readonly ListViewGroup _owner; 18/// <param name="group">The <see cref="ListViewGroup"/> that this object belongs to.</param> 19public ListViewGroupImageIndexer(ListViewGroup group)
System\Windows\Forms\Controls\ListView\ListViewGroupItemCollection.cs (4)
10private readonly ListViewGroup _group; 13public ListViewGroupItemCollection(ListViewGroup group) 99private static void MoveToGroup(ListViewItem item, ListViewGroup? newGroup) 101ListViewGroup? oldGroup = item.Group;
System\Windows\Forms\Controls\ListView\ListViewItem.cs (17)
37internal ListViewGroup? _group; 132public ListViewItem(ListViewGroup? group) 138public ListViewItem(string? text, ListViewGroup? group) 144public ListViewItem(string? text, int imageIndex, ListViewGroup? group) 150public ListViewItem(string[]? items, ListViewGroup? group) 156public ListViewItem(string[]? items, int imageIndex, ListViewGroup? group) 162public ListViewItem(string[]? items, int imageIndex, Color foreColor, Color backColor, Font? font, ListViewGroup? group) 168public ListViewItem(ListViewSubItem[] subItems, int imageIndex, ListViewGroup? group) 223public ListViewItem(string? text, string? imageKey, ListViewGroup? group) 229public ListViewItem(string[]? items, string? imageKey, ListViewGroup? group) 235public ListViewItem(string[]? items, string? imageKey, Color foreColor, Color backColor, Font? font, ListViewGroup? group) 241public ListViewItem(ListViewSubItem[] subItems, string? imageKey, ListViewGroup? group) 438public ListViewGroup? Group 1147foreach (ListViewGroup lvg in ListView!.Groups) 1234ListViewGroup group = (ListViewGroup)info.GetValue(nameof(Group), typeof(ListViewGroup))!;
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewItemBaseAccessibleObject.cs (1)
32private protected ListViewGroup? OwningGroup => _owningListView.GroupsDisplayed
System.Windows.Forms.Design (4)
System\Windows\Forms\Design\ListViewGroupCollectionEditor.cs (4)
27ListViewGroup group = (ListViewGroup)base.CreateInstance(itemType); 37ReadOnlySpan<char> listViewGroupName = nameof(ListViewGroup); 42listViewGroupName = nameService.CreateName(container, typeof(ListViewGroup));
System.Windows.Forms.Tests (262)
SerializableAttributeTests.cs (1)
21{ typeof(ListViewGroup).FullName },
SerializableTypesTests.cs (3)
126ListViewGroup listViewGroup = new("Header", HorizontalAlignment.Center) 143ListViewGroup result = BinarySerialization.EnsureDeserialize<ListViewGroup>(blob);
System\Windows\Forms\AccessibleObjects\ListVIew.ListViewAccessibleObjectTests.cs (18)
6using static System.Windows.Forms.ListViewGroup; 89ListViewGroup group = new(); 119ListViewGroup group = new(); 143ListViewGroup group = new(); 273ListViewGroup listViewGroup = new("Test Group"); 351ListViewGroup listViewGroup = new("Test Group"); 921ListViewGroup listGroup1 = new("Group1"); 922ListViewGroup listGroup2 = new("Group2"); 923ListViewGroup listGroup3 = new("Group2"); 1391ListViewGroup listViewGroup = new("Test"); 1454ListViewGroup listViewGroupWithItems1 = listView.Groups[1]; 1455ListViewGroup listViewGroupWithItems2 = listView.Groups[2]; 1643ListViewGroup listViewGroupWithItems1 = listView.Groups[1]; 1644ListViewGroup listViewGroupWithItems2 = listView.Groups[2]; 1722ListViewGroup listViewGroupWithoutItems = new("Group without items"); 1723ListViewGroup listViewGroupWithItems1 = new("Group with item 1"); 1724ListViewGroup listViewGroupWithItems2 = new("Group with item 2"); 1725ListViewGroup listViewGroupWithInvisibleItems = new("Group with invisible item");
System\Windows\Forms\AccessibleObjects\ListViewGroup.ListViewGroupAccessibleObjectTests.cs (32)
10using static System.Windows.Forms.ListViewGroup; 20ListViewGroup listGroup = new("Group1"); 25ConstructorInfo ctor = type.GetConstructor([typeof(ListViewGroup), typeof(bool)]); 30ListViewGroup listGroupWithoutList = new("Group2"); 38ListViewGroup listGroup = new("Group1"); 53ListViewGroup listGroup = new("Group1"); 84ListViewGroup listGroup = new("Group1"); 117ListViewGroup listGroup = new(name) { Subtitle = subtitle }; 278ListViewGroup listGroup = new("Group1"); 326ListViewGroup group = new(); 665ListViewGroup listViewGroup = new("Test Group"); 706ListViewGroup lvgroup1 = new() 715ListViewGroup lvgroup2 = new() 740ListViewGroup listViewGroup = new() 793ListViewGroup group1 = new("Group 1") { CollapsedState = firstGroupSate }; 794ListViewGroup group2 = new("Group 2") { CollapsedState = ListViewGroupCollapsedState.Expanded }; 795ListViewGroup group3 = new("Group 3") { CollapsedState = ListViewGroupCollapsedState.Expanded }; 796listView.Groups.AddRange((ListViewGroup[])[group1, group2, group3]); 1158ListViewGroup listViewGroup = new(); 1231ListViewGroup listViewGroupWithoutItems = new("Group without items"); 1232ListViewGroup listViewGroupWithItems1 = new("Group with item 1"); 1233ListViewGroup listViewGroupWithItems2 = new("Group with item 2"); 1234ListViewGroup listViewGroupWithInvisibleItems = new("Group with invisible item"); 1262ListViewGroup listGroup1 = new("Group1"); 1263ListViewGroup listGroup2 = new("Group2"); 1323ListViewGroup listGroup = new("Test") 1351ListViewGroup group = new(); 1367ListViewGroup group = new(); 1381ListViewGroup group = new(); 1391private static void EnforceAccessibleObjectCreation(ListViewGroup group) 1401ListViewGroup listViewGroup = new("Test group"); 1434ListViewGroup listViewGroup = new("Test Group");
System\Windows\Forms\AccessibleObjects\ListViewItem.ListViewItemAccessibleObjectTests.cs (6)
75ListViewGroup listviewGroup = new(); 1143ListViewGroup listViewGroup = new("Test"); 1204ListViewGroup listViewGroup = new("Test") { CollapsedState = state }; 1256ListViewGroup listViewGroup = new("Test group"); 1934ListViewGroup lvgroup1 = new() 1940ListViewGroup lvgroup2 = new()
System\Windows\Forms\AccessibleObjects\ListViewItem.ListViewSubItem.ListViewSubItemAccessibleObjectTests.cs (1)
807ListViewGroup listViewGroup = new("Test");
System\Windows\Forms\Layout\TableLayoutSettingsTests.cs (7)
1633SerializationInfo info = new(typeof(ListViewGroup), new FormatterConverter()); 1646SerializationInfo info = new(typeof(ListViewGroup), new FormatterConverter()); 1678SerializationInfo info = new(typeof(ListViewGroup), new FormatterConverter()); 1685info = new SerializationInfo(typeof(ListViewGroup), new FormatterConverter()); 1714SerializationInfo info = new(typeof(ListViewGroup), new FormatterConverter()); 1730SerializationInfo info = new(typeof(ListViewGroup), new FormatterConverter()); 1761SerializationInfo info = new(typeof(ListViewGroup), new FormatterConverter());
System\Windows\Forms\ListViewGroupCollectionTests.cs (75)
28ListViewGroup group = new(); 51ListViewGroup group = new(); 66ListViewGroup group = new(); 81ListViewGroup group = new(); 102ListViewGroup group = new(); 121ListViewGroup group1 = new(); 122ListViewGroup group2 = new(); 140ListViewGroup group = new(); 155ListViewGroup oldGroup = new(); 160ListViewGroup group = new(); 165Assert.Same(oldGroup, Assert.Single(collection.Cast<ListViewGroup>())); 195ListViewGroup group = new(); 218ListViewGroup group = new(); 229ListViewGroup group1 = new(); 230ListViewGroup group2 = new(); 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(); 372ListViewGroup group1 = new(); 378ListViewGroup group2 = new(); 380Assert.Equal(new ListViewGroup[] { group1, group2 }, collection.Cast<ListViewGroup>()); 391ListViewGroup group1 = new(); 397ListViewGroup group2 = new(); 399Assert.Equal(new ListViewGroup[] { group1, group2 }, collection.Cast<ListViewGroup>()); 410ListViewGroup group = new(); 429ListViewGroup group1 = new(); 438ListViewGroup group2 = new(); 446ListViewGroup group1 = new(); 447ListViewGroup group2 = new(); 464ListViewGroup group = new(); 491ListViewGroup group = new(); 509ListViewGroup group = Assert.Single(collection.Cast<ListViewGroup>()); 519ListViewGroup group = new(); 540ListViewGroup group1 = new(); 541ListViewGroup group2 = new(); 542var items = new ListViewGroup[] { group1, group2 }; 558ListViewGroup group1 = new(); 559ListViewGroup group2 = new(); 578Assert.Throws<ArgumentNullException>("groups", () => collection.AddRange((ListViewGroup[])null)); 587ListViewGroup group = new(); 588Assert.Throws<ArgumentNullException>("group", () => collection.AddRange((ListViewGroup[])[group, null])); 589Assert.Same(group, Assert.Single(collection.Cast<ListViewGroup>())); 597ListViewGroup group = new(); 617ListViewGroup group = new(); 645ListViewGroup group = new(); 668ListViewGroup group = new(); 693ListViewGroup group = new(); 716ListViewGroup group = new(); 741ListViewGroup group = new(); 756ListViewGroup group = new(); 771ListViewGroup group = new(); 790ListViewGroup group = new(); 810ListViewGroup group = new(); 830ListViewGroup group1 = new(); 831ListViewGroup group2 = new(); 847ListViewGroup group = new(); 882ListViewGroup group = new(); 917ListViewGroup group = new(); 941ListViewGroup group = new(); 963ListViewGroup group = new(); 983ListViewGroup group = new(); 995ListViewGroup group = new(); 1034ListViewGroup group = new(); 1096Assert.Throws<InvalidOperationException>(() => listView.Groups.AddRange((ListViewGroup[])[new(), new()])); 1108sourceGroup.AddRange((ListViewGroup[])[new(), new()]);
System\Windows\Forms\ListViewGroupConverterTests.cs (29)
18[InlineData(typeof(ListViewGroup), false)] 22TypeConverter converter = TypeDescriptor.GetConverter(typeof(ListViewGroup)); 38ListViewGroup group = new("name", "header"); 49TypeConverter converter = TypeDescriptor.GetConverter(typeof(ListViewGroup)); 62TypeConverter converter = TypeDescriptor.GetConverter(typeof(ListViewGroup)); 72ListViewGroup group = new("name", "header"); 77TypeConverter converter = TypeDescriptor.GetConverter(typeof(ListViewGroup)); 107TypeConverter converter = TypeDescriptor.GetConverter(typeof(ListViewGroup)); 123TypeConverter converter = TypeDescriptor.GetConverter(typeof(ListViewGroup)); 130[InlineData(typeof(ListViewGroup), false)] 135TypeConverter converter = TypeDescriptor.GetConverter(typeof(ListViewGroup)); 151ListViewGroup group = new("name", "header"); 162TypeConverter converter = TypeDescriptor.GetConverter(typeof(ListViewGroup)); 200public void ListViewGroupConverter_ConvertTo_InstanceDescriptor_ReturnsExpected(ListViewGroup value, Type[] parameterTypes, object[] arguments) 202TypeConverter converter = TypeDescriptor.GetConverter(typeof(ListViewGroup)); 204Assert.Equal(typeof(ListViewGroup).GetConstructor(parameterTypes), descriptor.MemberInfo); 213TypeConverter converter = TypeDescriptor.GetConverter(typeof(ListViewGroup)); 220TypeConverter converter = TypeDescriptor.GetConverter(typeof(ListViewGroup)); 227TypeConverter converter = TypeDescriptor.GetConverter(typeof(ListViewGroup)); 232[InlineData(typeof(ListViewGroup))] 236TypeConverter converter = TypeDescriptor.GetConverter(typeof(ListViewGroup)); 243TypeConverter converter = TypeDescriptor.GetConverter(typeof(ListViewGroup)); 250TypeConverter converter = TypeDescriptor.GetConverter(typeof(ListViewGroup)); 251ListViewGroup item = new(); 267ListViewGroup group = new("name", "header"); 278TypeConverter converter = TypeDescriptor.GetConverter(typeof(ListViewGroup)); 289TypeConverter converter = TypeDescriptor.GetConverter(typeof(ListViewGroup)); 296TypeConverter converter = TypeDescriptor.GetConverter(typeof(ListViewGroup)); 303TypeConverter converter = TypeDescriptor.GetConverter(typeof(ListViewGroup));
System\Windows\Forms\ListViewGroupTests.cs (65)
17ListViewGroup group = new(); 38ListViewGroup group = new(header); 68ListViewGroup group = new(header, headerAlignment); 96ListViewGroup group = new(key, header); 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() 1321ListViewGroup groupWithEmptyItems = new(); 1325ListViewGroup groupWithItems = new(); 1332public void ListViewGroup_Serialize_Deserialize_Success(ListViewGroup group) 1343ListViewGroup result = Assert.IsType<ListViewGroup>(formatter.Deserialize(stream)); // CodeQL [SM03722] : Deserialization is performed on trusted data and the types are controlled and validated. 1356ListViewGroup group = new(header); 1363ListViewGroup group = new(); 1365SerializationInfo info = new(typeof(ListViewGroup), new FormatterConverter()); 1379ListViewGroup group = new(); 1383SerializationInfo info = new(typeof(ListViewGroup), new FormatterConverter()); 1397ListViewGroup group = new(); 1401SerializationInfo info = new(typeof(ListViewGroup), new FormatterConverter()); 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)
50ListViewGroup group = new();
System\Windows\Forms\ListViewItemTests.cs (11)
52public void ListViewItem_Ctor_StringArray_String_Color_Color_Font_ListViewGroup(string[] subItems, string imageKey, Color foreColor, Color backColor, Font font, ListViewGroup group, string expectedImageKey, Color expectedForeColor, Color expectedBackColor, string expectedText) 90public void ListViewItem_Ctor_StringArray_Int_Color_Color_Font_ListViewGroup(string[] subItems, int imageIndex, Color foreColor, Color backColor, Font font, ListViewGroup group, Color expectedForeColor, Color expectedBackColor, string expectedText) 203public void ListViewItem_Ctor_ListViewSubItemArray_String_ListViewGroup(ListViewItem.ListViewSubItem[] subItems, string imageKey, ListViewGroup group, string expectedImageKey, string expectedText) 240public void ListViewItem_Ctor_ListViewSubItemArray_Int_ListViewGroup(ListViewItem.ListViewSubItem[] subItems, int imageIndex, ListViewGroup group, string expectedText) 278public void ListViewItem_Ctor_StringArray_String_ListViewGroup(string[] subItems, string imageKey, ListViewGroup group, string expectedImageKey, string expectedText) 316public void ListViewItem_Ctor_StringArray_Int_ListViewGroup(string[] subItems, int imageIndex, ListViewGroup group, string expectedText) 353public void ListViewItem_Ctor_String_String_ListViewGroup(string text, string imageKey, ListViewGroup group, string expectedText, string expectedImageKey) 391public void ListViewItem_Ctor_String_Int_ListViewGroup(string text, int imageIndex, ListViewGroup group, string expectedText) 504public void ListViewItem_Ctor_StringArray_ListViewGroup(string[] subItems, ListViewGroup group, string expectedText) 617public void ListViewItem_Ctor_String_ListViewGroup(string text, ListViewGroup group, string expectedText) 730public void ListViewItem_Ctor_ListViewGroup(ListViewGroup group)
System\Windows\Forms\ListViewTests.cs (12)
1920ListViewGroup group1 = new(); 1921ListViewGroup group2 = new() 4541ListViewGroup group = new("Test group"); 4567ListViewGroup group1 = new("Test group1"); 4568ListViewGroup group2 = new("Test group2"); 4569ListViewGroup group3 = new("Test group3"); 4618ListViewGroup group = new("Test group"); 5651var groups = new ListViewGroup[] { new("Group 1"), new("Group 2"), new("Group 3") }; 5689var groups = new ListViewGroup[] { new("Group 1"), new("Group 2"), new("Group 3") }; 5726var groups = new ListViewGroup[] { new("Group 1"), new("Group 2"), new("Group 3") }; 5762var groups = new ListViewGroup[] { new("Group 1"), new("Group 2"), new("Group 3") }; 6189ListViewGroup listViewGroup = new("Test");
System.Windows.Forms.UI.IntegrationTests (1)
ListViewTests.cs (1)
50ListViewGroup group = new($"Group 1", HorizontalAlignment.Left) { CollapsedState = ListViewGroupCollapsedState.Expanded };
WinFormsControlsTest (5)
ListViewTest.cs (3)
146ListViewGroup lvgroup1 = new() 159ListViewGroup lvgroup2 = new() 186ListViewGroup lvgroup1 = new()
ListViewTest.Designer.cs (2)
70this.listView1.Groups.AddRange(new System.Windows.Forms.ListViewGroup[] { 71(System.Windows.Forms.ListViewGroup)(resources.GetObject("listView1.Groups"))});