74 references to Index
System.Windows.Forms (50)
System\Windows\Forms\Controls\ListView\ListView.cs (12)
1752
EnsureVisible(value.
Index
);
1765
Scroll(0, value.
Index
);
1771
if (topItem is null || value.
Index
== topItem.
Index
)
1778
Scroll(topItem.
Index
, value.
Index
);
3238
Rectangle iconBounds = GetItemRect(lvi.
Index
, ItemBoundsPortion.Icon);
3950
item.UpdateStateToListView(item.
Index
);
3964
iItem = item.
Index
,
4315
SetItemImage(item.
Index
, imageIndex);
4324
SetItemText(item.
Index
, 0 /*subItemIndex*/, item.Text);
5081
item.UpdateStateToListView(item.
Index
);
System\Windows\Forms\Controls\ListView\ListView.SelectedIndexCollection.cs (2)
81
indices[i] = _owner._savedSelectedItems[i].
Index
;
119
return _owner._savedSelectedItems[index].
Index
;
System\Windows\Forms\Controls\ListView\ListViewGroupCollection.cs (1)
273
item.UpdateStateToListView(item.
Index
);
System\Windows\Forms\Controls\ListView\ListViewGroupItemCollection.cs (1)
127
item.UpdateStateToListView(item.
Index
);
System\Windows\Forms\Controls\ListView\ListViewItem.cs (21)
312
return _listView.GetItemRect(
Index
);
364
return _listView.GetItemState(
Index
, LIST_VIEW_ITEM_STATE_FLAGS.LVIS_FOCUSED) != 0;
374
_listView.SetItemState(
Index
, value ? LIST_VIEW_ITEM_STATE_FLAGS.LVIS_FOCUSED : 0, LIST_VIEW_ITEM_STATE_FLAGS.LVIS_FOCUSED);
489
_listView.SetItemImage(itemIndex:
Index
, imageIndex: ImageIndexer.ActualIndex);
515
_listView.SetItemImage(
Index
, ImageIndexer.ActualIndex);
561
_listView.SetItemIndentCount(
Index
, _indentCount);
632
_position = _listView.GetItemPosition(
Index
);
646
_listView.SetItemPosition(
Index
, _position.X, _position.Y);
687
return _listView.GetItemState(
Index
, LIST_VIEW_ITEM_STATE_FLAGS.LVIS_SELECTED) != 0;
696
_listView.SetItemState(
Index
, value ? LIST_VIEW_ITEM_STATE_FLAGS.LVIS_SELECTED : 0, LIST_VIEW_ITEM_STATE_FLAGS.LVIS_SELECTED);
699
_listView.SetSelectionMark(
Index
);
727
LIST_VIEW_ITEM_STATE_FLAGS state = _listView.GetItemState(
Index
, LIST_VIEW_ITEM_STATE_FLAGS.LVIS_STATEIMAGEMASK);
742
_listView.SetItemState(
Index
, state, LIST_VIEW_ITEM_STATE_FLAGS.LVIS_STATEIMAGEMASK);
867
if (
Index
>= 0)
880
PInvokeCore.SendMessage(lv, PInvoke.LVM_EDITLABELW, (WPARAM)
Index
);
949
_listView.EnsureVisible(
Index
);
970
return _listView.GetItemRect(
Index
, portion);
981
if (iItem ==
Index
&& iSubItem != -1 && iSubItem < SubItems.Count)
1067
index =
Index
;
1158
internal void UnHost(bool checkSelection) => UnHost(
Index
, checkSelection);
1328
int itemIndex =
Index
;
System\Windows\Forms\Controls\ListView\ListViewItem.IKeyboardToolTip.cs (6)
20
Rectangle IKeyboardToolTip.GetNativeScreenRectangle() => GetNativeRectangle(
Index
);
40
neighboringRectangles.Add(GetNativeRectangle(neighboringItem.
Index
));
48
if (
Index
> 0)
50
neighboringRectangles.Add(_listView.Items[
Index
- 1].AccessibilityObject.Bounds);
53
if (
Index
< _listView.Items.Count - 1)
55
neighboringRectangles.Add(_listView.Items[
Index
+ 1].AccessibilityObject.Bounds);
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewItemBaseAccessibleObject.cs (2)
49
=> _owningItem.
Index
;
86
if (_owningListView.SelectedIndices.Contains(_owningItem.
Index
))
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewItemDetailsAccessibleObject.cs (1)
179
? _owningListView.GetSubItemRect(_owningItem.
Index
, HasImage ? accessibleChildIndex - 1 : accessibleChildIndex)
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewItemImageAccessibleObject.cs (1)
54
internal Rectangle GetImageRectangle() => _owningItem.ListView!.GetItemRect(_owningItem.
Index
, ItemBoundsPortion.Icon);
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewItemTileAccessibleObject.cs (1)
126
? _owningListView.GetSubItemRect(_owningItem.
Index
, subItemIndex)
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewSubItem.cs (1)
101
return _owner._listView.GetSubItemRect(_owner.
Index
, _owner.SubItems.IndexOf(this));
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewSubItem.ListViewSubItemAccessibleObject.cs (1)
139
internal override int Row => _owningItem.
Index
;
System.Windows.Forms.Tests (24)
SerializableTypesTests.cs (1)
197
Assert.Equal(-1, result.
Index
);
System\Windows\Forms\AccessibleObjects\ListViewItem.ListViewItemBaseAccessibleObjectTests.cs (1)
50
Assert.Equal(item.
Index
, accessibleObject.CurrentIndex);
System\Windows\Forms\ListViewItemTests.cs (22)
27
Assert.Equal(-1, item.
Index
);
66
Assert.Equal(-1, item.
Index
);
104
Assert.Equal(-1, item.
Index
);
142
Assert.Equal(-1, item.
Index
);
180
Assert.Equal(-1, item.
Index
);
217
Assert.Equal(-1, item.
Index
);
254
Assert.Equal(-1, item.
Index
);
292
Assert.Equal(-1, item.
Index
);
330
Assert.Equal(-1, item.
Index
);
367
Assert.Equal(-1, item.
Index
);
405
Assert.Equal(-1, item.
Index
);
443
Assert.Equal(-1, item.
Index
);
480
Assert.Equal(-1, item.
Index
);
518
Assert.Equal(-1, item.
Index
);
556
Assert.Equal(-1, item.
Index
);
594
Assert.Equal(-1, item.
Index
);
631
Assert.Equal(-1, item.
Index
);
669
Assert.Equal(-1, item.
Index
);
707
Assert.Equal(-1, item.
Index
);
744
Assert.Equal(-1, item.
Index
);
783
Assert.Equal(-1, item.
Index
);
813
Assert.Equal(-1, item.
Index
);