forked from dotnet/dotnet-api-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathListViewGroupCollection.xml
More file actions
999 lines (924 loc) · 70.6 KB
/
ListViewGroupCollection.xml
File metadata and controls
999 lines (924 loc) · 70.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
<Type Name="ListViewGroupCollection" FullName="System.Windows.Forms.ListViewGroupCollection">
<TypeSignature Language="C#" Value="public class ListViewGroupCollection : System.Collections.IList" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit ListViewGroupCollection extends System.Object implements class System.Collections.ICollection, class System.Collections.IEnumerable, class System.Collections.IList" />
<TypeSignature Language="DocId" Value="T:System.Windows.Forms.ListViewGroupCollection" />
<TypeSignature Language="VB.NET" Value="Public Class ListViewGroupCollection
Implements IList" />
<TypeSignature Language="C++ CLI" Value="public ref class ListViewGroupCollection : System::Collections::IList" />
<TypeSignature Language="F#" Value="type ListViewGroupCollection = class
 interface IList
 interface ICollection
 interface IEnumerable" />
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Object</BaseTypeName>
</Base>
<Interfaces>
<Interface>
<InterfaceName>System.Collections.ICollection</InterfaceName>
</Interface>
<Interface>
<InterfaceName>System.Collections.IEnumerable</InterfaceName>
</Interface>
<Interface>
<InterfaceName>System.Collections.IList</InterfaceName>
</Interface>
</Interfaces>
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.ComponentModel.ListBindable(false)]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.ListBindable(false)>]</AttributeName>
</Attribute>
</Attributes>
<Docs>
<summary>Represents the collection of groups within a <see cref="T:System.Windows.Forms.ListView" /> control.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use the <xref:System.Windows.Forms.ListView.Groups%2A?displayProperty=nameWithType> property to get the <xref:System.Windows.Forms.ListViewGroupCollection> associated with a <xref:System.Windows.Forms.ListView> control. This collection contains the <xref:System.Windows.Forms.ListViewGroup> objects that represent the groups shown in the control when the <xref:System.Windows.Forms.ListView.View%2A?displayProperty=nameWithType> property is set to a value other than <xref:System.Windows.Forms.View.List?displayProperty=nameWithType>. Any items that are not assigned to a group will appear in the default group, which has the header label "DefaultGroup{0}". The default group is not contained in the <xref:System.Windows.Forms.ListView.Groups%2A?displayProperty=nameWithType> collection, and cannot be altered. It is primarily useful in debugging to ensure that all items have been properly added to groups. If there are no groups in the <xref:System.Windows.Forms.ListView.Groups%2A?displayProperty=nameWithType> collection, the grouping feature is disabled.
Use the <xref:System.Windows.Forms.ListViewGroupCollection.Add%2A> method to add a single group to the collection. Use the <xref:System.Windows.Forms.ListViewGroupCollection.Insert%2A> method to add a group at a particular index within the collection. To remove a group, use the <xref:System.Windows.Forms.ListViewGroupCollection.Remove%2A> method. Use the <xref:System.Windows.Forms.ListViewGroupCollection.RemoveAt%2A> method to remove the group at a particular index.
You cannot add a <xref:System.Windows.Forms.ListViewGroup> to the collection more than once. To reposition a group within the collection, it must first be removed from the collection, and then inserted at the desired location. Use the <xref:System.Windows.Forms.ListViewGroupCollection.Contains%2A> method to determine whether a particular group is already in the collection. To retrieve the index of a group within the collection, use the <xref:System.Windows.Forms.ListViewGroupCollection.IndexOf%2A> method. You can get or set the group at a particular index with the <xref:System.Windows.Forms.ListViewGroupCollection.Item%2A> indexer.
Use the <xref:System.Windows.Forms.ListViewGroupCollection.AddRange%2A> method to add multiple groups to the collection. You can add multiple groups either as an array of groups or as a <xref:System.Windows.Forms.ListViewGroupCollection> that you retrieve through the <xref:System.Windows.Forms.ListView.Groups%2A?displayProperty=nameWithType> property of another <xref:System.Windows.Forms.ListView> control. Use the <xref:System.Windows.Forms.ListViewGroupCollection.Clear%2A> method to remove all the groups from the collection.
> [!NOTE]
> The <xref:System.Windows.Forms.ListViewGroupCollection.Remove%2A>, <xref:System.Windows.Forms.ListViewGroupCollection.RemoveAt%2A>, and <xref:System.Windows.Forms.ListViewGroupCollection.Clear%2A> methods remove groups from the collection, but do not remove any items from the <xref:System.Windows.Forms.ListView> control. If there are no groups in the <xref:System.Windows.Forms.ListView.Groups%2A?displayProperty=nameWithType> collection, the grouping feature is disabled and all items in the control are displayed normally.
The <xref:System.Windows.Forms.ListViewGroupCollection.AddRange%2A> and <xref:System.Windows.Forms.ListViewGroupCollection.Clear%2A> methods are useful when you want to provide multiple ways to group the items in a <xref:System.Windows.Forms.ListView> control. To do this, create multiple group arrays. To change the grouping, first use the <xref:System.Windows.Forms.ListViewGroupCollection.Clear%2A> method to remove all the groups from the collection, then use the <xref:System.Windows.Forms.ListViewGroupCollection.AddRange%2A> method to add the next array of groups to display.
Use the <xref:System.Windows.Forms.ListViewGroupCollection.CopyTo%2A> method to copy the groups in a collection to a compatible array starting at a specified index. This is useful, for example, when you want to sort the groups in the collection using the <xref:System.Array.Sort%2A?displayProperty=nameWithType> method. To do this, copy the groups into a compatible array, then sort the array. Next, use the <xref:System.Windows.Forms.ListViewGroupCollection.Clear%2A> method to remove all the groups from the collection, then use the <xref:System.Windows.Forms.ListViewGroupCollection.AddRange%2A> method to add the sorted array back to the collection.
Use the <xref:System.Windows.Forms.ListViewGroupCollection.Count%2A> property to determine how many groups are in the collection. To iterate through the collection, use the <xref:System.Collections.IEnumerator> returned from the <xref:System.Windows.Forms.ListViewGroupCollection.GetEnumerator%2A> method.
> [!NOTE]
> The grouping feature is available only on Windows XP and the Windows Server 2003 family when your application calls the <xref:System.Windows.Forms.Application.EnableVisualStyles%2A?displayProperty=nameWithType> method. On earlier operating systems, any code relating to groups will be ignored and the groups will not appear. As a result, any code that depends on the grouping feature might not work correctly. You might want to include a test that determines whether the grouping feature is available, and provide alternate functionality when it is unavailable. For example, you might want to provide alternate sorting when running on operating systems that do not support sorting by group.
>
> The insertion mark feature is provided by the same library that provides the operating system themes feature. To check for the availability of this library, call the <xref:System.Windows.Forms.FeatureSupport.IsPresent%28System.Object%29?displayProperty=nameWithType> method overload and pass in the <xref:System.Windows.Forms.OSFeature.Themes?displayProperty=nameWithType> value.
## Examples
The following example demonstrates how to use the <xref:System.Windows.Forms.ListView> grouping feature to organize items by subitem value in the details view. This form of grouping is similar to the grouping used in Windows Explorer. In the example, the groups are created dynamically. For each subitem column, one group is created for each unique subitem value. For the parent item column, one group is created for each unique initial letter. Clicking the header of a column sorts the items into the groups created for that column. Clicking the same column header again reverses the order of the groups.
[!code-cpp[System.Windows.Forms.ListView.Groups#1](~/samples/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ListView.Groups/CPP/listviewgroupsexample.cpp#1)]
[!code-csharp[System.Windows.Forms.ListView.Groups#1](~/samples/snippets/csharp/VS_Snippets_Winforms/System.Windows.Forms.ListView.Groups/CS/listviewgroupsexample.cs#1)]
[!code-vb[System.Windows.Forms.ListView.Groups#1](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ListView.Groups/VB/listviewgroupsexample.vb#1)]
]]></format>
</remarks>
<altmember cref="T:System.Windows.Forms.ListView" />
<altmember cref="T:System.Windows.Forms.ListViewGroup" />
</Docs>
<Members>
<MemberGroup MemberName="Add">
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Adds a <see cref="T:System.Windows.Forms.ListViewGroup" /> to the collection.</summary>
</Docs>
</MemberGroup>
<Member MemberName="Add">
<MemberSignature Language="C#" Value="public int Add (System.Windows.Forms.ListViewGroup group);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance int32 Add(class System.Windows.Forms.ListViewGroup group) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.ListViewGroupCollection.Add(System.Windows.Forms.ListViewGroup)" />
<MemberSignature Language="VB.NET" Value="Public Function Add (group As ListViewGroup) As Integer" />
<MemberSignature Language="C++ CLI" Value="public:
 int Add(System::Windows::Forms::ListViewGroup ^ group);" />
<MemberSignature Language="F#" Value="member this.Add : System.Windows.Forms.ListViewGroup -> int" Usage="listViewGroupCollection.Add group" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="group" Type="System.Windows.Forms.ListViewGroup" />
</Parameters>
<Docs>
<param name="group">The <see cref="T:System.Windows.Forms.ListViewGroup" /> to add to the collection.</param>
<summary>Adds the specified <see cref="T:System.Windows.Forms.ListViewGroup" /> to the collection.</summary>
<returns>The index of the group within the collection, or -1 if the group is already present in the collection.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use this method to add an existing <xref:System.Windows.Forms.ListViewGroup> to the collection. You cannot add a <xref:System.Windows.Forms.ListViewGroup> to the collection more than once. When you call the <xref:System.Windows.Forms.ListViewGroupCollection.Add%2A> method using a <xref:System.Windows.Forms.ListViewGroup> that is already in the collection, the addition fails and -1 is returned.
To add multiple groups to the collection, use the <xref:System.Windows.Forms.ListViewGroupCollection.AddRange%2A> method.
]]></format>
</remarks>
<exception cref="T:System.ArgumentException">
<paramref name="group" /> contains at least one <see cref="T:System.Windows.Forms.ListViewItem" /> that belongs to a <see cref="T:System.Windows.Forms.ListView" /> control other than the one that owns this <see cref="T:System.Windows.Forms.ListViewGroupCollection" />.</exception>
<altmember cref="T:System.Windows.Forms.ListViewGroup" />
</Docs>
</Member>
<Member MemberName="Add">
<MemberSignature Language="C#" Value="public System.Windows.Forms.ListViewGroup Add (string key, string headerText);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance class System.Windows.Forms.ListViewGroup Add(string key, string headerText) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.ListViewGroupCollection.Add(System.String,System.String)" />
<MemberSignature Language="VB.NET" Value="Public Function Add (key As String, headerText As String) As ListViewGroup" />
<MemberSignature Language="C++ CLI" Value="public:
 System::Windows::Forms::ListViewGroup ^ Add(System::String ^ key, System::String ^ headerText);" />
<MemberSignature Language="F#" Value="member this.Add : string * string -> System.Windows.Forms.ListViewGroup" Usage="listViewGroupCollection.Add (key, headerText)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.Forms.ListViewGroup</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="key" Type="System.String" />
<Parameter Name="headerText" Type="System.String" />
</Parameters>
<Docs>
<param name="key">The initial value of the <see cref="P:System.Windows.Forms.ListViewGroup.Name" /> property for the new group.</param>
<param name="headerText">The initial value of the <see cref="P:System.Windows.Forms.ListViewGroup.Header" /> property for the new group.</param>
<summary>Adds a new <see cref="T:System.Windows.Forms.ListViewGroup" /> to the collection using the specified values to initialize the <see cref="P:System.Windows.Forms.ListViewGroup.Name" /> and <see cref="P:System.Windows.Forms.ListViewGroup.Header" /> properties.</summary>
<returns>The new <see cref="T:System.Windows.Forms.ListViewGroup" />.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<MemberGroup MemberName="AddRange">
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Adds multiple groups to the collection.</summary>
</Docs>
</MemberGroup>
<Member MemberName="AddRange">
<MemberSignature Language="C#" Value="public void AddRange (System.Windows.Forms.ListViewGroup[] groups);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void AddRange(class System.Windows.Forms.ListViewGroup[] groups) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.ListViewGroupCollection.AddRange(System.Windows.Forms.ListViewGroup[])" />
<MemberSignature Language="VB.NET" Value="Public Sub AddRange (groups As ListViewGroup())" />
<MemberSignature Language="C++ CLI" Value="public:
 void AddRange(cli::array <System::Windows::Forms::ListViewGroup ^> ^ groups);" />
<MemberSignature Language="F#" Value="member this.AddRange : System.Windows.Forms.ListViewGroup[] -> unit" Usage="listViewGroupCollection.AddRange groups" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="groups" Type="System.Windows.Forms.ListViewGroup[]" />
</Parameters>
<Docs>
<param name="groups">An array of type <see cref="T:System.Windows.Forms.ListViewGroup" /> that specifies the groups to add to the collection.</param>
<summary>Adds an array of groups to the collection.</summary>
<remarks>
<format type="text/markdown"><]
[!code-csharp[System.Windows.Forms.ListView.Groups#2](~/samples/snippets/csharp/VS_Snippets_Winforms/System.Windows.Forms.ListView.Groups/CS/listviewgroupsexample.cs#2)]
[!code-vb[System.Windows.Forms.ListView.Groups#2](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ListView.Groups/VB/listviewgroupsexample.vb#2)]
]]></format>
</remarks>
<exception cref="T:System.ArgumentException">
<paramref name="groups" /> contains at least one group with at least one <see cref="T:System.Windows.Forms.ListViewItem" /> that belongs to a <see cref="T:System.Windows.Forms.ListView" /> control other than the one that owns this <see cref="T:System.Windows.Forms.ListViewGroupCollection" />.</exception>
<altmember cref="T:System.Windows.Forms.ListViewGroup" />
</Docs>
</Member>
<Member MemberName="AddRange">
<MemberSignature Language="C#" Value="public void AddRange (System.Windows.Forms.ListViewGroupCollection groups);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void AddRange(class System.Windows.Forms.ListViewGroupCollection groups) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.ListViewGroupCollection.AddRange(System.Windows.Forms.ListViewGroupCollection)" />
<MemberSignature Language="VB.NET" Value="Public Sub AddRange (groups As ListViewGroupCollection)" />
<MemberSignature Language="C++ CLI" Value="public:
 void AddRange(System::Windows::Forms::ListViewGroupCollection ^ groups);" />
<MemberSignature Language="F#" Value="member this.AddRange : System.Windows.Forms.ListViewGroupCollection -> unit" Usage="listViewGroupCollection.AddRange groups" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="groups" Type="System.Windows.Forms.ListViewGroupCollection" />
</Parameters>
<Docs>
<param name="groups">A <see cref="T:System.Windows.Forms.ListViewGroupCollection" /> containing the groups to add to the collection.</param>
<summary>Adds the groups in an existing <see cref="T:System.Windows.Forms.ListViewGroupCollection" /> to the collection.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use this version of the <xref:System.Windows.Forms.ListViewGroupCollection.AddRange%2A> method to add the elements of a <xref:System.Windows.Forms.ListViewGroupCollection> that you retrieve through the <xref:System.Windows.Forms.ListView.Groups%2A?displayProperty=nameWithType> property of a different <xref:System.Windows.Forms.ListView> control.
Unlike the <xref:System.Windows.Forms.ListViewGroupCollection.Add%2A> method, the <xref:System.Windows.Forms.ListViewGroupCollection.AddRange%2A> method does not have a return value that can be used to determine whether a group being added is already in the collection. If you need this information, use the <xref:System.Windows.Forms.ListViewGroupCollection.Contains%2A> method before using the <xref:System.Windows.Forms.ListViewGroupCollection.AddRange%2A> method.
]]></format>
</remarks>
<exception cref="T:System.ArgumentException">
<paramref name="groups" /> contains at least one group with at least one <see cref="T:System.Windows.Forms.ListViewItem" /> that belongs to a <see cref="T:System.Windows.Forms.ListView" /> control other than the one that owns this <see cref="T:System.Windows.Forms.ListViewGroupCollection" />.</exception>
</Docs>
</Member>
<Member MemberName="Clear">
<MemberSignature Language="C#" Value="public void Clear ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void Clear() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.ListViewGroupCollection.Clear" />
<MemberSignature Language="VB.NET" Value="Public Sub Clear ()" />
<MemberSignature Language="C++ CLI" Value="public:
 virtual void Clear();" />
<MemberSignature Language="F#" Value="abstract member Clear : unit -> unit
override this.Clear : unit -> unit" Usage="listViewGroupCollection.Clear " />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.Collections.IList.Clear</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Removes all groups from the collection.</summary>
<remarks>
<format type="text/markdown"><]
[!code-csharp[System.Windows.Forms.ListView.Groups#2](~/samples/snippets/csharp/VS_Snippets_Winforms/System.Windows.Forms.ListView.Groups/CS/listviewgroupsexample.cs#2)]
[!code-vb[System.Windows.Forms.ListView.Groups#2](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ListView.Groups/VB/listviewgroupsexample.vb#2)]
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="Contains">
<MemberSignature Language="C#" Value="public bool Contains (System.Windows.Forms.ListViewGroup value);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance bool Contains(class System.Windows.Forms.ListViewGroup value) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.ListViewGroupCollection.Contains(System.Windows.Forms.ListViewGroup)" />
<MemberSignature Language="VB.NET" Value="Public Function Contains (value As ListViewGroup) As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:
 bool Contains(System::Windows::Forms::ListViewGroup ^ value);" />
<MemberSignature Language="F#" Value="member this.Contains : System.Windows.Forms.ListViewGroup -> bool" Usage="listViewGroupCollection.Contains value" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="value" Type="System.Windows.Forms.ListViewGroup" />
</Parameters>
<Docs>
<param name="value">The <see cref="T:System.Windows.Forms.ListViewGroup" /> to locate in the collection.</param>
<summary>Determines whether the specified group is located in the collection.</summary>
<returns>
<see langword="true" /> if the group is in the collection; otherwise, <see langword="false" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
You cannot add a <xref:System.Windows.Forms.ListViewGroup> to the collection more than once. However, attempting to add another copy will not throw an exception. Instead, the addition will simply fail. The <xref:System.Windows.Forms.ListViewGroupCollection.Add%2A> method will return a value of -1 in this case. The <xref:System.Windows.Forms.ListViewGroupCollection.AddRange%2A> and <xref:System.Windows.Forms.ListViewGroupCollection.Insert%2A> methods, however, do not have return values. When adding groups using one of these methods, use the <xref:System.Windows.Forms.ListViewGroupCollection.Contains%2A> method to determine whether a particular <xref:System.Windows.Forms.ListViewGroup> is already in the collection.
]]></format>
</remarks>
<altmember cref="T:System.Windows.Forms.ListViewGroup" />
</Docs>
</Member>
<Member MemberName="CopyTo">
<MemberSignature Language="C#" Value="public void CopyTo (Array array, int index);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void CopyTo(class System.Array array, int32 index) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.ListViewGroupCollection.CopyTo(System.Array,System.Int32)" />
<MemberSignature Language="VB.NET" Value="Public Sub CopyTo (array As Array, index As Integer)" />
<MemberSignature Language="C++ CLI" Value="public:
 virtual void CopyTo(Array ^ array, int index);" />
<MemberSignature Language="F#" Value="abstract member CopyTo : Array * int -> unit
override this.CopyTo : Array * int -> unit" Usage="listViewGroupCollection.CopyTo (array, index)" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.Collections.ICollection.CopyTo(System.Array,System.Int32)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="array" Type="System.Array" />
<Parameter Name="index" Type="System.Int32" />
</Parameters>
<Docs>
<param name="array">The <see cref="T:System.Array" /> to which the groups are copied.</param>
<param name="index">The first index within the array to which the groups are copied.</param>
<summary>Copies the groups in the collection to a compatible one-dimensional <see cref="T:System.Array" />, starting at the specified index of the target array.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use the <xref:System.Windows.Forms.ListViewGroupCollection.CopyTo%2A> method to copy the groups in a collection (including the item references they contain) to a compatible array, starting at a specified index. This is useful, for example, when you want to sort the groups in the collection using the <xref:System.Array.Sort%2A?displayProperty=nameWithType> method. To do this, copy the groups into a compatible array, then sort the array. Next, use the <xref:System.Windows.Forms.ListViewGroupCollection.Clear%2A> method to remove all the groups from the collection, then use the <xref:System.Windows.Forms.ListViewGroupCollection.AddRange%2A> method to add the sorted array back to the collection.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="Count">
<MemberSignature Language="C#" Value="public int Count { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance int32 Count" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.ListViewGroupCollection.Count" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property Count As Integer" />
<MemberSignature Language="C++ CLI" Value="public:
 property int Count { int get(); };" />
<MemberSignature Language="F#" Value="member this.Count : int" Usage="System.Windows.Forms.ListViewGroupCollection.Count" />
<MemberType>Property</MemberType>
<Implements>
<InterfaceMember>P:System.Collections.ICollection.Count</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the number of groups in the collection.</summary>
<value>The number of groups in the collection.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use this property to determine the number of groups in the collection. This is useful when you need to loop through the collection and perform the same operation on each group. You can also use the <xref:System.Collections.IEnumerator> returned by the <xref:System.Windows.Forms.ListViewGroupCollection.GetEnumerator%2A> method to iterate through the collection.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="GetEnumerator">
<MemberSignature Language="C#" Value="public System.Collections.IEnumerator GetEnumerator ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Collections.IEnumerator GetEnumerator() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.ListViewGroupCollection.GetEnumerator" />
<MemberSignature Language="VB.NET" Value="Public Function GetEnumerator () As IEnumerator" />
<MemberSignature Language="C++ CLI" Value="public:
 virtual System::Collections::IEnumerator ^ GetEnumerator();" />
<MemberSignature Language="F#" Value="abstract member GetEnumerator : unit -> System.Collections.IEnumerator
override this.GetEnumerator : unit -> System.Collections.IEnumerator" Usage="listViewGroupCollection.GetEnumerator " />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.Collections.IEnumerable.GetEnumerator</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Collections.IEnumerator</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Returns an enumerator used to iterate through the collection.</summary>
<returns>An <see cref="T:System.Collections.IEnumerator" /> that represents the collection.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This method is useful when you need to iterate through the collection to perform the same operation on each group. You can also loop through the collection once for each group, using the <xref:System.Windows.Forms.ListViewGroupCollection.Count%2A> property to determine the number of loops.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="IndexOf">
<MemberSignature Language="C#" Value="public int IndexOf (System.Windows.Forms.ListViewGroup value);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance int32 IndexOf(class System.Windows.Forms.ListViewGroup value) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.ListViewGroupCollection.IndexOf(System.Windows.Forms.ListViewGroup)" />
<MemberSignature Language="VB.NET" Value="Public Function IndexOf (value As ListViewGroup) As Integer" />
<MemberSignature Language="C++ CLI" Value="public:
 int IndexOf(System::Windows::Forms::ListViewGroup ^ value);" />
<MemberSignature Language="F#" Value="member this.IndexOf : System.Windows.Forms.ListViewGroup -> int" Usage="listViewGroupCollection.IndexOf value" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="value" Type="System.Windows.Forms.ListViewGroup" />
</Parameters>
<Docs>
<param name="value">The <see cref="T:System.Windows.Forms.ListViewGroup" /> to locate in the collection.</param>
<summary>Returns the index of the specified <see cref="T:System.Windows.Forms.ListViewGroup" /> within the collection.</summary>
<returns>The zero-based index of the group within the collection, or -1 if the group is not in the collection.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use this method to determine the index of a group within the collection. This is useful, for example, to determine the index of each group when you iterate through the collection using the <xref:System.Collections.IEnumerator> returned by the <xref:System.Windows.Forms.ListViewGroupCollection.GetEnumerator%2A> method.
]]></format>
</remarks>
<altmember cref="T:System.Windows.Forms.ListViewGroup" />
</Docs>
</Member>
<Member MemberName="Insert">
<MemberSignature Language="C#" Value="public void Insert (int index, System.Windows.Forms.ListViewGroup group);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void Insert(int32 index, class System.Windows.Forms.ListViewGroup group) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.ListViewGroupCollection.Insert(System.Int32,System.Windows.Forms.ListViewGroup)" />
<MemberSignature Language="VB.NET" Value="Public Sub Insert (index As Integer, group As ListViewGroup)" />
<MemberSignature Language="C++ CLI" Value="public:
 void Insert(int index, System::Windows::Forms::ListViewGroup ^ group);" />
<MemberSignature Language="F#" Value="member this.Insert : int * System.Windows.Forms.ListViewGroup -> unit" Usage="listViewGroupCollection.Insert (index, group)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="index" Type="System.Int32" />
<Parameter Name="group" Type="System.Windows.Forms.ListViewGroup" />
</Parameters>
<Docs>
<param name="index">The index within the collection at which to insert the group.</param>
<param name="group">The <see cref="T:System.Windows.Forms.ListViewGroup" /> to insert into the collection.</param>
<summary>Inserts the specified <see cref="T:System.Windows.Forms.ListViewGroup" /> into the collection at the specified index.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use this method to insert an existing <xref:System.Windows.Forms.ListViewGroup> at a particular index within the collection.
You cannot add a <xref:System.Windows.Forms.ListViewGroup> to the collection more than once. When you call the <xref:System.Windows.Forms.ListViewGroupCollection.Insert%2A> method using a group that is already in the collection, the insertion simply fails. Use the <xref:System.Windows.Forms.ListViewGroupCollection.Contains%2A> method before the insertion to determine whether a particular group is already in the collection. To reposition a group within the collection, you must first remove it, and then insert it at the desired index.
]]></format>
</remarks>
<altmember cref="T:System.Windows.Forms.ListViewGroup" />
</Docs>
</Member>
<MemberGroup MemberName="Item">
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Gets or sets a <see cref="T:System.Windows.Forms.ListViewGroup" /> in the collection.</summary>
</Docs>
</MemberGroup>
<Member MemberName="Item">
<MemberSignature Language="C#" Value="public System.Windows.Forms.ListViewGroup this[int index] { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Windows.Forms.ListViewGroup Item(int32)" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.ListViewGroupCollection.Item(System.Int32)" />
<MemberSignature Language="VB.NET" Value="Default Public Property Item(index As Integer) As ListViewGroup" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::Windows::Forms::ListViewGroup ^ default[int] { System::Windows::Forms::ListViewGroup ^ get(int index); void set(int index, System::Windows::Forms::ListViewGroup ^ value); };" />
<MemberSignature Language="F#" Value="member this.Item(int) : System.Windows.Forms.ListViewGroup with get, set" Usage="System.Windows.Forms.ListViewGroupCollection.Item" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.Forms.ListViewGroup</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="index" Type="System.Int32" />
</Parameters>
<Docs>
<param name="index">The index within the collection of the <see cref="T:System.Windows.Forms.ListViewGroup" /> to get or set.</param>
<summary>Gets or sets the <see cref="T:System.Windows.Forms.ListViewGroup" /> at the specified index within the collection.</summary>
<value>The <see cref="T:System.Windows.Forms.ListViewGroup" /> at the specified index within the collection.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use this property to retrieve the group at the specified index within the collection. When you have a reference to the group object and need the index, use the <xref:System.Windows.Forms.ListViewGroupCollection.IndexOf%2A> method.
]]></format>
</remarks>
<exception cref="T:System.ArgumentOutOfRangeException">
<paramref name="index" /> is less than 0 or greater than or equal to <see cref="P:System.Windows.Forms.ListViewGroupCollection.Count" />.</exception>
</Docs>
</Member>
<Member MemberName="Item">
<MemberSignature Language="C#" Value="public System.Windows.Forms.ListViewGroup this[string key] { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Windows.Forms.ListViewGroup Item(string)" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.ListViewGroupCollection.Item(System.String)" />
<MemberSignature Language="VB.NET" Value="Default Public Property Item(key As String) As ListViewGroup" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::Windows::Forms::ListViewGroup ^ default[System::String ^] { System::Windows::Forms::ListViewGroup ^ get(System::String ^ key); void set(System::String ^ key, System::Windows::Forms::ListViewGroup ^ value); };" />
<MemberSignature Language="F#" Value="member this.Item(string) : System.Windows.Forms.ListViewGroup with get, set" Usage="System.Windows.Forms.ListViewGroupCollection.Item" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.Forms.ListViewGroup</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="key" Type="System.String" />
</Parameters>
<Docs>
<param name="key">The name of the group to get or set.</param>
<summary>Gets or sets the <see cref="T:System.Windows.Forms.ListViewGroup" /> with the specified <see cref="P:System.Windows.Forms.ListViewGroup.Name" /> property value.</summary>
<value>The <see cref="T:System.Windows.Forms.ListViewGroup" /> with the specified name, or <see langword="null" /> if no such <see cref="T:System.Windows.Forms.ListViewGroup" /> exists.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Remove">
<MemberSignature Language="C#" Value="public void Remove (System.Windows.Forms.ListViewGroup group);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void Remove(class System.Windows.Forms.ListViewGroup group) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.ListViewGroupCollection.Remove(System.Windows.Forms.ListViewGroup)" />
<MemberSignature Language="VB.NET" Value="Public Sub Remove (group As ListViewGroup)" />
<MemberSignature Language="C++ CLI" Value="public:
 void Remove(System::Windows::Forms::ListViewGroup ^ group);" />
<MemberSignature Language="F#" Value="member this.Remove : System.Windows.Forms.ListViewGroup -> unit" Usage="listViewGroupCollection.Remove group" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="group" Type="System.Windows.Forms.ListViewGroup" />
</Parameters>
<Docs>
<param name="group">The <see cref="T:System.Windows.Forms.ListViewGroup" /> to remove from the collection.</param>
<summary>Removes the specified <see cref="T:System.Windows.Forms.ListViewGroup" /> from the collection.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use this method to remove a group from the collection when you have a reference to the group. Note that removing a group from the <xref:System.Windows.Forms.ListView.Groups%2A?displayProperty=nameWithType> collection does not remove items from the <xref:System.Windows.Forms.ListView> control.
To remove a group at a particular index, use the <xref:System.Windows.Forms.ListViewGroupCollection.RemoveAt%2A> method instead. To remove all the groups from the collection, use the <xref:System.Windows.Forms.ListViewGroupCollection.Clear%2A> method.
]]></format>
</remarks>
<altmember cref="T:System.Windows.Forms.ListViewGroup" />
</Docs>
</Member>
<Member MemberName="RemoveAt">
<MemberSignature Language="C#" Value="public void RemoveAt (int index);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void RemoveAt(int32 index) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.ListViewGroupCollection.RemoveAt(System.Int32)" />
<MemberSignature Language="VB.NET" Value="Public Sub RemoveAt (index As Integer)" />
<MemberSignature Language="C++ CLI" Value="public:
 virtual void RemoveAt(int index);" />
<MemberSignature Language="F#" Value="abstract member RemoveAt : int -> unit
override this.RemoveAt : int -> unit" Usage="listViewGroupCollection.RemoveAt index" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.Collections.IList.RemoveAt(System.Int32)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="index" Type="System.Int32" />
</Parameters>
<Docs>
<param name="index">The index within the collection of the <see cref="T:System.Windows.Forms.ListViewGroup" /> to remove.</param>
<summary>Removes the <see cref="T:System.Windows.Forms.ListViewGroup" /> at the specified index within the collection.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use this method to remove a group from the collection when you have the index of the group within the collection. Note that removing groups from the <xref:System.Windows.Forms.ListView.Groups%2A?displayProperty=nameWithType> collection does not remove items from the <xref:System.Windows.Forms.ListView> control.
To remove a group using a reference to the object, use the <xref:System.Windows.Forms.ListViewGroupCollection.Remove%2A> method instead. To remove all the groups from the collection, use the <xref:System.Windows.Forms.ListViewGroupCollection.Clear%2A> method. When you remove an item from the collection, the indexes change for subsequent items in the collection. All information about the removed item is deleted.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="System.Collections.ICollection.IsSynchronized">
<MemberSignature Language="C#" Value="bool System.Collections.ICollection.IsSynchronized { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool System.Collections.ICollection.IsSynchronized" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.ListViewGroupCollection.System#Collections#ICollection#IsSynchronized" />
<MemberSignature Language="VB.NET" Value=" ReadOnly Property IsSynchronized As Boolean Implements ICollection.IsSynchronized" />
<MemberSignature Language="C++ CLI" Value="property bool System::Collections::ICollection::IsSynchronized { bool get(); };" />
<MemberSignature Language="F#" Value="member this.System.Collections.ICollection.IsSynchronized : bool" Usage="System.Collections.ICollection.IsSynchronized" />
<MemberType>Property</MemberType>
<Implements>
<InterfaceMember>P:System.Collections.ICollection.IsSynchronized</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a value indicating whether access to the collection is synchronized (thread safe).</summary>
<value>
<see langword="true" /> in all cases.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This member is an explicit interface member implementation. It can be used only when the <xref:System.Windows.Forms.ListViewGroupCollection> instance is cast to an <xref:System.Collections.ICollection> interface.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="System.Collections.ICollection.SyncRoot">
<MemberSignature Language="C#" Value="object System.Collections.ICollection.SyncRoot { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance object System.Collections.ICollection.SyncRoot" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.ListViewGroupCollection.System#Collections#ICollection#SyncRoot" />
<MemberSignature Language="VB.NET" Value=" ReadOnly Property SyncRoot As Object Implements ICollection.SyncRoot" />
<MemberSignature Language="C++ CLI" Value="property System::Object ^ System::Collections::ICollection::SyncRoot { System::Object ^ get(); };" />
<MemberSignature Language="F#" Value="member this.System.Collections.ICollection.SyncRoot : obj" Usage="System.Collections.ICollection.SyncRoot" />
<MemberType>Property</MemberType>
<Implements>
<InterfaceMember>P:System.Collections.ICollection.SyncRoot</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Object</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets an object that can be used to synchronize access to the collection.</summary>
<value>The object used to synchronize the collection.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This member is an explicit interface member implementation. It can be used only when the <xref:System.Windows.Forms.ListViewGroupCollection> instance is cast to an <xref:System.Collections.ICollection> interface.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="System.Collections.IList.Add">
<MemberSignature Language="C#" Value="int IList.Add (object value);" />
<MemberSignature Language="ILAsm" Value=".method hidebysig newslot virtual instance int32 System.Collections.IList.Add(object value) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.ListViewGroupCollection.System#Collections#IList#Add(System.Object)" />
<MemberSignature Language="VB.NET" Value="Function Add (value As Object) As Integer Implements IList.Add" />
<MemberSignature Language="C++ CLI" Value=" virtual int System.Collections.IList.Add(System::Object ^ value) = System::Collections::IList::Add;" />
<MemberSignature Language="F#" Value="abstract member System.Collections.IList.Add : obj -> int
override this.System.Collections.IList.Add : obj -> int" Usage="listViewGroupCollection.System.Collections.IList.Add value" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.Collections.IList.Add(System.Object)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="value" Type="System.Object" />
</Parameters>
<Docs>
<param name="value">The <see cref="T:System.Windows.Forms.ListViewGroup" /> to add to the <see cref="T:System.Windows.Forms.ListViewGroupCollection" />.</param>
<summary>Adds a new <see cref="T:System.Windows.Forms.ListViewGroup" /> to the <see cref="T:System.Windows.Forms.ListViewGroupCollection" />.</summary>
<returns>The index at which the <see cref="T:System.Windows.Forms.ListViewGroup" /> has been added.</returns>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentException">
<paramref name="value" /> is not a <see cref="T:System.Windows.Forms.ListViewGroup" />.
-or-
<paramref name="value" /> contains at least one <see cref="T:System.Windows.Forms.ListViewItem" /> that belongs to a <see cref="T:System.Windows.Forms.ListView" /> control other than the one that owns this <see cref="T:System.Windows.Forms.ListViewGroupCollection" />.</exception>
</Docs>
</Member>
<Member MemberName="System.Collections.IList.Contains">
<MemberSignature Language="C#" Value="bool IList.Contains (object value);" />
<MemberSignature Language="ILAsm" Value=".method hidebysig newslot virtual instance bool System.Collections.IList.Contains(object value) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.ListViewGroupCollection.System#Collections#IList#Contains(System.Object)" />
<MemberSignature Language="VB.NET" Value="Function Contains (value As Object) As Boolean Implements IList.Contains" />
<MemberSignature Language="C++ CLI" Value=" virtual bool System.Collections.IList.Contains(System::Object ^ value) = System::Collections::IList::Contains;" />
<MemberSignature Language="F#" Value="abstract member System.Collections.IList.Contains : obj -> bool
override this.System.Collections.IList.Contains : obj -> bool" Usage="listViewGroupCollection.System.Collections.IList.Contains value" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.Collections.IList.Contains(System.Object)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="value" Type="System.Object" />
</Parameters>
<Docs>
<param name="value">An object that represents the <see cref="T:System.Windows.Forms.ListViewGroup" /> to locate in the collection.</param>
<summary>Determines whether the specified value is located in the collection.</summary>
<returns>
<see langword="true" /> if <paramref name="value" /> is a <see cref="T:System.Windows.Forms.ListViewGroup" /> contained in the collection; otherwise, <see langword="false" />.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="System.Collections.IList.IndexOf">
<MemberSignature Language="C#" Value="int IList.IndexOf (object value);" />
<MemberSignature Language="ILAsm" Value=".method hidebysig newslot virtual instance int32 System.Collections.IList.IndexOf(object value) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.ListViewGroupCollection.System#Collections#IList#IndexOf(System.Object)" />
<MemberSignature Language="VB.NET" Value="Function IndexOf (value As Object) As Integer Implements IList.IndexOf" />
<MemberSignature Language="C++ CLI" Value=" virtual int System.Collections.IList.IndexOf(System::Object ^ value) = System::Collections::IList::IndexOf;" />
<MemberSignature Language="F#" Value="abstract member System.Collections.IList.IndexOf : obj -> int
override this.System.Collections.IList.IndexOf : obj -> int" Usage="listViewGroupCollection.System.Collections.IList.IndexOf value" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.Collections.IList.IndexOf(System.Object)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="value" Type="System.Object" />
</Parameters>
<Docs>
<param name="value">The <see cref="T:System.Windows.Forms.ListViewGroup" /> to find in the <see cref="T:System.Windows.Forms.ListViewGroupCollection" />.</param>
<summary>Returns the index within the collection of the specified value.</summary>
<returns>The zero-based index of <paramref name="value" /> if it is in the collection; otherwise, -1.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="System.Collections.IList.Insert">
<MemberSignature Language="C#" Value="void IList.Insert (int index, object value);" />
<MemberSignature Language="ILAsm" Value=".method hidebysig newslot virtual instance void System.Collections.IList.Insert(int32 index, object value) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.ListViewGroupCollection.System#Collections#IList#Insert(System.Int32,System.Object)" />
<MemberSignature Language="VB.NET" Value="Sub Insert (index As Integer, value As Object) Implements IList.Insert" />
<MemberSignature Language="C++ CLI" Value=" virtual void System.Collections.IList.Insert(int index, System::Object ^ value) = System::Collections::IList::Insert;" />
<MemberSignature Language="F#" Value="abstract member System.Collections.IList.Insert : int * obj -> unit
override this.System.Collections.IList.Insert : int * obj -> unit" Usage="listViewGroupCollection.System.Collections.IList.Insert (index, value)" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.Collections.IList.Insert(System.Int32,System.Object)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="index" Type="System.Int32" />
<Parameter Name="value" Type="System.Object" />
</Parameters>
<Docs>
<param name="index">The position at which the <see cref="T:System.Windows.Forms.ListViewGroup" /> is added to the collection.</param>
<param name="value">The <see cref="T:System.Windows.Forms.ListViewGroup" /> to add to the collection.</param>
<summary>Inserts a <see cref="T:System.Windows.Forms.ListViewGroup" /> into the <see cref="T:System.Windows.Forms.ListViewGroupCollection" />.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
If `value` is not a <xref:System.Windows.Forms.ListViewGroup>, it is not added to the collection.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="System.Collections.IList.IsFixedSize">
<MemberSignature Language="C#" Value="bool System.Collections.IList.IsFixedSize { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool System.Collections.IList.IsFixedSize" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.ListViewGroupCollection.System#Collections#IList#IsFixedSize" />
<MemberSignature Language="VB.NET" Value=" ReadOnly Property IsFixedSize As Boolean Implements IList.IsFixedSize" />
<MemberSignature Language="C++ CLI" Value="property bool System::Collections::IList::IsFixedSize { bool get(); };" />
<MemberSignature Language="F#" Value="member this.System.Collections.IList.IsFixedSize : bool" Usage="System.Collections.IList.IsFixedSize" />
<MemberType>Property</MemberType>
<Implements>
<InterfaceMember>P:System.Collections.IList.IsFixedSize</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a value indicating whether the collection has a fixed size.</summary>
<value>
<see langword="false" /> in all cases.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This member is an explicit interface member implementation. It can be used only when the <xref:System.Windows.Forms.ListViewGroupCollection> instance is cast to an <xref:System.Collections.IList> interface.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="System.Collections.IList.IsReadOnly">
<MemberSignature Language="C#" Value="bool System.Collections.IList.IsReadOnly { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool System.Collections.IList.IsReadOnly" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.ListViewGroupCollection.System#Collections#IList#IsReadOnly" />
<MemberSignature Language="VB.NET" Value=" ReadOnly Property IsReadOnly As Boolean Implements IList.IsReadOnly" />
<MemberSignature Language="C++ CLI" Value="property bool System::Collections::IList::IsReadOnly { bool get(); };" />
<MemberSignature Language="F#" Value="member this.System.Collections.IList.IsReadOnly : bool" Usage="System.Collections.IList.IsReadOnly" />
<MemberType>Property</MemberType>
<Implements>
<InterfaceMember>P:System.Collections.IList.IsReadOnly</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a value indicating whether the collection is read-only.</summary>
<value>
<see langword="false" /> in all cases.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This member is an explicit interface member implementation. It can be used only when the <xref:System.Windows.Forms.ListViewGroupCollection> instance is cast to an <xref:System.Collections.IList> interface.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="System.Collections.IList.Item">
<MemberSignature Language="C#" Value="object System.Collections.IList.Item[int index] { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance object System.Collections.IList.Item(int32)" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.ListViewGroupCollection.System#Collections#IList#Item(System.Int32)" />
<MemberSignature Language="VB.NET" Value=" Property Item(index As Integer) As Object Implements IList.Item" />
<MemberSignature Language="C++ CLI" Value="property System::Object ^ System::Collections::IList::Item[int] { System::Object ^ get(int index); void set(int index, System::Object ^ value); };" />
<MemberSignature Language="F#" Value="member this.System.Collections.IList.Item(int) : obj with get, set" Usage="System.Collections.IList.Item" />
<MemberType>Property</MemberType>
<Implements>
<InterfaceMember>P:System.Collections.IList.Item(System.Int32)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Object</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="index" Type="System.Int32" />
</Parameters>
<Docs>
<param name="index">The zero-based index of the element to get or set.</param>
<summary>Gets or sets the <see cref="T:System.Windows.Forms.ListViewGroup" /> at the specified index within the collection.</summary>
<value>A <see cref="T:System.Windows.Forms.ListViewGroup" /> that represents the item located at the specified index within the collection.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="System.Collections.IList.Remove">
<MemberSignature Language="C#" Value="void IList.Remove (object value);" />
<MemberSignature Language="ILAsm" Value=".method hidebysig newslot virtual instance void System.Collections.IList.Remove(object value) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.ListViewGroupCollection.System#Collections#IList#Remove(System.Object)" />
<MemberSignature Language="VB.NET" Value="Sub Remove (value As Object) Implements IList.Remove" />
<MemberSignature Language="C++ CLI" Value=" virtual void System.Collections.IList.Remove(System::Object ^ value) = System::Collections::IList::Remove;" />
<MemberSignature Language="F#" Value="abstract member System.Collections.IList.Remove : obj -> unit
override this.System.Collections.IList.Remove : obj -> unit" Usage="listViewGroupCollection.System.Collections.IList.Remove value" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.Collections.IList.Remove(System.Object)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="value" Type="System.Object" />
</Parameters>
<Docs>
<param name="value">The <see cref="T:System.Windows.Forms.ListViewGroup" /> to remove from the <see cref="T:System.Windows.Forms.ListViewGroupCollection" />.</param>
<summary>Removes the <see cref="T:System.Windows.Forms.ListViewGroup" /> from the <see cref="T:System.Windows.Forms.ListViewGroupCollection" />.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
</Members>
</Type>