1 write to owner
System.Windows.Forms (1)
winforms\Managed\System\WinForms\ListView.cs (1)
8827
this.
owner
= owner;
125 references to owner
System.Windows.Forms (125)
winforms\Managed\System\WinForms\ListView.cs (125)
8832
owner
.ApplyUpdateCachedItems();
8833
if (
owner
.VirtualMode) {
8834
return
owner
.VirtualListSize;
8837
return
owner
.itemCount;
8844
return
owner
.VirtualMode;
8850
return
owner
.DesignMode;
8856
owner
.ApplyUpdateCachedItems();
8858
if (
owner
.VirtualMode) {
8862
owner
.OnRetrieveVirtualItem(rVI);
8863
rVI.Item.SetItemIndex(this.
owner
, displayIndex);
8867
if (displayIndex < 0 || displayIndex >=
owner
.itemCount)
8870
if (
owner
.IsHandleCreated && !
owner
.ListViewHandleDestroyed) {
8871
Debug.Assert(
owner
.listItemsArray == null, "listItemsArray not null, even though handle created");
8872
return (ListViewItem)
owner
.listItemsTable[DisplayIndexToID(displayIndex)];
8875
Debug.Assert(
owner
.listItemsArray != null, "listItemsArray is null, but the handle isn't created");
8876
return (ListViewItem)
owner
.listItemsArray[displayIndex];
8881
owner
.ApplyUpdateCachedItems();
8882
if (
owner
.VirtualMode) {
8886
if (displayIndex < 0 || displayIndex >=
owner
.itemCount)
8889
if (this.
owner
.ExpectingMouseUp) {
8890
this.
owner
.ItemCollectionChangedInMouseDown = true;
8899
if (
owner
.VirtualMode) {
8902
Debug.Assert(!this.
owner
.FlipViewToLargeIconAndSmallIcon || this.Count == 0, "the FlipView... bit is turned off after adding 1 item.");
8909
owner
.InsertItems(
owner
.itemCount, new ListViewItem[]{value}, true);
8911
if (
owner
.IsHandleCreated && !
owner
.CheckBoxes && valueChecked) {
8912
owner
.UpdateSavedCheckedItems(value, true /*addItem*/);
8915
if (this.
owner
.ExpectingMouseUp) {
8916
this.
owner
.ItemCollectionChangedInMouseDown = true;
8928
if (
owner
.VirtualMode) {
8932
IComparer comparer =
owner
.listItemSorter;
8933
owner
.listItemSorter = null;
8935
Debug.Assert(!this.
owner
.FlipViewToLargeIconAndSmallIcon || this.Count == 0, "the FlipView... bit is turned off after adding 1 item.");
8939
if (
owner
.IsHandleCreated && !
owner
.CheckBoxes) {
8951
owner
.BeginUpdate();
8952
owner
.InsertItems(
owner
.itemCount, values, true);
8954
if (
owner
.IsHandleCreated && !
owner
.CheckBoxes) {
8957
owner
.UpdateSavedCheckedItems(values[i], true /*addItem*/);
8964
owner
.listItemSorter = comparer;
8965
owner
.EndUpdate();
8968
if (this.
owner
.ExpectingMouseUp) {
8969
this.
owner
.ItemCollectionChangedInMouseDown = true;
8972
if (comparer != null || (
owner
.Sorting != SortOrder.None) && !
owner
.VirtualMode) {
8973
owner
.Sort();
8978
Debug.Assert(!
owner
.VirtualMode, "in virtual mode, this method does not make any sense");
8979
if (
owner
.IsHandleCreated && !
owner
.ListViewHandleDestroyed) {
8984
UnsafeNativeMethods.SendMessage(new HandleRef(
owner
,
owner
.Handle), NativeMethods.LVM_GETITEM, 0, ref lvItem);
8994
if (
owner
.itemCount > 0) {
8995
owner
.ApplyUpdateCachedItems();
8997
if (
owner
.IsHandleCreated && !
owner
.ListViewHandleDestroyed) {
9002
int count =
owner
.Items.Count;
9003
int nextSelected = (int)UnsafeNativeMethods.SendMessage(new HandleRef(
owner
,
owner
.Handle), NativeMethods.LVM_GETNEXTITEM, -1, NativeMethods.LVNI_SELECTED);
9005
ListViewItem item =
owner
.Items[i];
9013
nextSelected = (int)UnsafeNativeMethods.SendMessage(new HandleRef(
owner
,
owner
.Handle), NativeMethods.LVM_GETNEXTITEM, nextSelected, NativeMethods.LVNI_SELECTED);
9023
Debug.Assert(
owner
.listItemsArray == null, "listItemsArray not null, even though handle created");
9025
UnsafeNativeMethods.SendMessage(new HandleRef(
owner
,
owner
.Handle), NativeMethods.LVM_DELETEALLITEMS, 0, 0);
9030
if (
owner
.View == View.SmallIcon) {
9031
if (this.
owner
.ComctlSupportsVisualStyles) {
9032
this.
owner
.FlipViewToLargeIconAndSmallIcon = true;
9034
Debug.Assert(!this.
owner
.FlipViewToLargeIconAndSmallIcon, "we only set this when comctl 6.0 is loaded");
9035
owner
.View = View.LargeIcon;
9036
owner
.View = View.SmallIcon;
9042
int count =
owner
.Items.Count;
9045
ListViewItem item =
owner
.Items[i];
9051
Debug.Assert(
owner
.listItemsArray != null, "listItemsArray is null, but the handle isn't created");
9052
owner
.listItemsArray.Clear();
9055
owner
.listItemsTable.Clear();
9056
if (
owner
.IsHandleCreated && !
owner
.CheckBoxes) {
9057
owner
.savedCheckedItems = null;
9059
owner
.itemCount = 0;
9061
if (this.
owner
.ExpectingMouseUp) {
9062
this.
owner
.ItemCollectionChangedInMouseDown = true;
9070
owner
.ApplyUpdateCachedItems();
9071
if (
owner
.IsHandleCreated && !
owner
.ListViewHandleDestroyed) {
9072
Debug.Assert(
owner
.listItemsArray == null, "listItemsArray not null, even though handle created");
9073
return
owner
.listItemsTable[item.ID] == item;
9076
Debug.Assert(
owner
.listItemsArray != null, "listItemsArray is null, but the handle isn't created");
9077
return
owner
.listItemsArray.Contains(item);
9083
if (
owner
.VirtualMode) {
9087
count =
owner
.itemCount;
9094
if (
owner
.VirtualMode) {
9098
Debug.Assert(!this.
owner
.FlipViewToLargeIconAndSmallIcon || this.Count == 0, "the FlipView... bit is turned off after adding 1 item.");
9103
owner
.ApplyUpdateCachedItems();
9106
owner
.InsertItems(index, new ListViewItem[]{item}, true);
9107
if (
owner
.IsHandleCreated && !
owner
.CheckBoxes && item.Checked) {
9108
owner
.UpdateSavedCheckedItems(item, true /*addItem*/);
9111
if (this.
owner
.ExpectingMouseUp) {
9112
this.
owner
.ItemCollectionChangedInMouseDown = true;
9119
Debug.Assert(!
owner
.VirtualMode, "in virtual mode, this function does not make any sense");
9129
int index =
owner
.VirtualMode ? Count - 1 : IndexOf(item);
9131
Debug.Assert(!this.
owner
.FlipViewToLargeIconAndSmallIcon || this.Count == 0, "the FlipView... bit is turned off after adding 1 item.");
9133
if (
owner
.VirtualMode) {
9143
if (
owner
.VirtualMode) {
9147
if (index < 0 || index >=
owner
.itemCount)
9150
Debug.Assert(!this.
owner
.FlipViewToLargeIconAndSmallIcon || this.Count == 0, "the FlipView... bit is turned off after adding 1 item.");
9152
if (
owner
.IsHandleCreated && !
owner
.CheckBoxes && this[index].Checked) {
9153
owner
.UpdateSavedCheckedItems(this[index], false /*addItem*/);
9156
owner
.ApplyUpdateCachedItems();
9160
if (
owner
.IsHandleCreated) {
9162
Debug.Assert(
owner
.listItemsArray == null, "listItemsArray not null, even though handle created");
9163
int retval = unchecked( (int) (long)
owner
.SendMessage(NativeMethods.LVM_DELETEITEM, index, 0));
9171
Debug.Assert(
owner
.listItemsArray != null, "listItemsArray is null, but the handle isn't created");
9172
owner
.listItemsArray.RemoveAt(index);
9175
owner
.itemCount--;
9176
owner
.listItemsTable.Remove(itemID);
9178
if (this.
owner
.ExpectingMouseUp) {
9179
this.
owner
.ItemCollectionChangedInMouseDown = true;
9185
if (
owner
.itemCount > 0) {
9193
ListViewItem[] items = new ListViewItem[this.
owner
.itemCount];