|
51 | 51 |
|
52 | 52 | The following table shows an example of how the <xref:System.Windows.Forms.ListView.ListViewItemCollection> stores the items of the <xref:System.Windows.Forms.ListView> as well as their selection states in an example <xref:System.Windows.Forms.ListView> control.
|
53 | 53 |
|
54 |
| -|Index|Item|Selection state in the ListView| |
55 |
| -|-----------|----------|-------------------------------------| |
56 |
| -|0|Item1|Unselected| |
57 |
| -|1|Item2|Selected| |
58 |
| -|2|Item3|Unselected| |
59 |
| -|3|Item4|Selected| |
60 |
| -|4|Item5|Selected| |
| 54 | +| Index | Item | Selection state in the ListView | |
| 55 | +|-------|-------|---------------------------------| |
| 56 | +| 0 | Item1 | Unselected | |
| 57 | +| 1 | Item2 | Selected | |
| 58 | +| 2 | Item3 | Unselected | |
| 59 | +| 3 | Item4 | Selected | |
| 60 | +| 4 | Item5 | Selected | |
61 | 61 |
|
62 | 62 | Based on the <xref:System.Windows.Forms.ListView.ListViewItemCollection> example in the previous table, the following table demonstrates how the <xref:System.Windows.Forms.ListView.SelectedListViewItemCollection> would appear.
|
63 | 63 |
|
64 |
| -|Index|Selected item in the ListViewItemCollection| |
65 |
| -|-----------|-------------------------------------------------| |
66 |
| -|0|Item2| |
67 |
| -|1|Item4| |
68 |
| -|2|Item5| |
| 64 | +| Index | Selected item in the ListViewItemCollection | |
| 65 | +|-------|---------------------------------------------| |
| 66 | +| 0 | Item2 | |
| 67 | +| 1 | Item4 | |
| 68 | +| 2 | Item5 | |
69 | 69 |
|
70 |
| - You can use the properties and methods of this class to perform a variety of tasks with the collection. The <xref:System.Windows.Forms.ListView.SelectedListViewItemCollection.Contains%2A> method enables you to determine whether an item from the <xref:System.Windows.Forms.ListView.ListViewItemCollection> class is a member of the <xref:System.Windows.Forms.ListView.SelectedListViewItemCollection>. Once you know that the item is in the collection, you can use the <xref:System.Windows.Forms.ListView.SelectedListViewItemCollection.IndexOf%2A> method to determine the position of the item in the <xref:System.Windows.Forms.ListView.SelectedListViewItemCollection>. |
71 |
| - |
72 |
| - |
| 70 | +You can use the properties and methods of this class to perform a variety of tasks with the collection. The <xref:System.Windows.Forms.ListView.SelectedListViewItemCollection.Contains%2A> method enables you to determine whether an item from the <xref:System.Windows.Forms.ListView.ListViewItemCollection> class is a member of the <xref:System.Windows.Forms.ListView.SelectedListViewItemCollection>. Once you know that the item is in the collection, you can use the <xref:System.Windows.Forms.ListView.SelectedListViewItemCollection.IndexOf%2A> method to determine the position of the item in the <xref:System.Windows.Forms.ListView.SelectedListViewItemCollection>. |
73 | 71 |
|
74 | 72 | ## Examples
|
75 | 73 | The following code example demonstrates using the <xref:System.Windows.Forms.ListView.SelectedItems%2A>, <xref:System.Windows.Forms.ListView.SelectedIndexChanged> event, and <xref:System.Windows.Forms.ListView.HeaderStyle%2A> members and the <xref:System.Windows.Forms.ListView.SelectedListViewItemCollection> class. To run this example, paste the following code in a form that contains a <xref:System.Windows.Forms.ListView> object named `ListView1` and a <xref:System.Windows.Forms.TextBox> named `TextBox1`. Call the `InitializeListView` method from the form's constructor or the <xref:System.Windows.Forms.Form.Load> event handler. This example requires that the event handler is correctly associated with the <xref:System.Windows.Forms.ListView.SelectedIndexChanged> event
|
|
149 | 147 | </ReturnValue>
|
150 | 148 | <Parameters />
|
151 | 149 | <Docs>
|
152 |
| - <summary>Removes all items from the collection.</summary> |
153 |
| - <remarks> |
154 |
| - <format type="text/markdown"><![CDATA[ |
155 |
| - |
156 |
| -## Remarks |
157 |
| - This method enables you to clear all selections from the <xref:System.Windows.Forms.ListView> control. |
158 |
| - |
159 |
| - ]]></format> |
160 |
| - </remarks> |
| 150 | + <summary>Clears all selections in the list view.</summary> |
| 151 | + <remarks>To be added.</remarks> |
161 | 152 | </Docs>
|
162 | 153 | </Member>
|
163 | 154 | <Member MemberName="Contains">
|
|
187 | 178 | <Parameter Name="item" Type="System.Windows.Forms.ListViewItem" />
|
188 | 179 | </Parameters>
|
189 | 180 | <Docs>
|
190 |
| - <param name="item">A <see cref="T:System.Windows.Forms.ListViewItem" /> representing the item to locate in the collection.</param> |
| 181 | + <param name="item">The item to locate in the collection.</param> |
191 | 182 | <summary>Determines whether the specified item is located in the collection.</summary>
|
192 | 183 | <returns>
|
193 | 184 | <see langword="true" /> if the specified item is located in the collection; otherwise, <see langword="false" />.</returns>
|
|
231 | 222 | <param name="key">The name of the item to find in the collection.</param>
|
232 | 223 | <summary>Determines whether an item with the specified key is contained in the collection.</summary>
|
233 | 224 | <returns>
|
234 |
| - <see langword="true" /> to indicate the specified item is contained in the collection; otherwise, <see langword="false" />.</returns> |
| 225 | + <see langword="true" /> if the specified item is contained in the collection; otherwise, <see langword="false" />.</returns> |
235 | 226 | <remarks>
|
236 | 227 | <format type="text/markdown"><![CDATA[
|
237 | 228 |
|
|
275 | 266 | <Parameter Name="index" Type="System.Int32" />
|
276 | 267 | </Parameters>
|
277 | 268 | <Docs>
|
278 |
| - <param name="dest">An <see cref="T:System.Array" /> representing the array to copy the contents of the collection to.</param> |
| 269 | + <param name="dest">The array to copy the contents of the collection to.</param> |
279 | 270 | <param name="index">The location within the destination array to copy the items from the collection to.</param>
|
280 | 271 | <summary>Copies the entire collection into an existing array at a specified location within the array.</summary>
|
281 | 272 | <remarks>
|
|
393 | 384 | <Parameter Name="item" Type="System.Windows.Forms.ListViewItem" />
|
394 | 385 | </Parameters>
|
395 | 386 | <Docs>
|
396 |
| - <param name="item">A <see cref="T:System.Windows.Forms.ListViewItem" /> representing the item to locate in the collection.</param> |
| 387 | + <param name="item">The item to locate in the collection.</param> |
397 | 388 | <summary>Returns the index within the collection of the specified item.</summary>
|
398 |
| - <returns>The zero-based index of the item in the collection. If the item is not located in the collection, the return value is negative one (-1).</returns> |
| 389 | + <returns>The zero-based index of the item in the collection. If the item is not located in the collection, returns -1.</returns> |
399 | 390 | <remarks>
|
400 | 391 | <format type="text/markdown"><![CDATA[
|
401 | 392 |
|
@@ -783,7 +774,7 @@ This member is an explicit interface member implementation. It can be used only
|
783 | 774 | <Parameter Name="item" Type="System.Object" />
|
784 | 775 | </Parameters>
|
785 | 776 | <Docs>
|
786 |
| - <param name="item">An object that represents the item to locate in the collection.</param> |
| 777 | + <param name="item">The item to locate in the collection.</param> |
787 | 778 | <summary>Returns the index, within the collection, of the specified item.</summary>
|
788 | 779 | <returns>The zero-based index of the item if it is in the collection; otherwise, -1</returns>
|
789 | 780 | <remarks>To be added.</remarks>
|
|
0 commit comments