System.Windows.Forms.ListView Members

The members of System.Windows.Forms.ListView are listed below.

See Also: Inherited members from System.Windows.Forms.Control

Public Constructors

Initializes a new instance of the System.Windows.Forms.ListView class.

Public Properties

ActivationItemActivation.

Gets or sets the type of action the user must take to activate an item.

AlignmentListViewAlignment.

Gets or sets the alignment of items in the control.

AllowColumnReorderbool.

Gets or sets a value indicating whether the user can drag column headers to reorder columns in the control.

AutoArrangebool.

Gets or sets whether icons are automatically kept arranged.

override
BackColorSystem.Drawing.Color.

Gets or sets the background color.

BackgroundImageSystem.Drawing.Image. Documentation for this section has not yet been entered.
override
BackgroundImageLayoutImageLayout.

Gets or sets an System.Windows.Forms.ImageLayout value.

BackgroundImageTiledbool.

Gets or sets a value indicating whether the background image of the System.Windows.Forms.ListView should be tiled.

BorderStyleBorderStyle.

Gets or sets the border style of the control.

CheckBoxesbool.

Gets or sets a value indicating whether a check box appears next to each item in the control.

[read-only]
CheckedIndicesListView.CheckedIndexCollection.

Gets the indexes of the currently checked items in the control.

[read-only]
CheckedItemsListView.CheckedListViewItemCollection.

Gets the currently checked items in the control.

[read-only]
ColumnsListView.ColumnHeaderCollection.

Gets the collection of all column headers that appear in the control.

FocusedItemListViewItem.

Gets or sets the item in the control that currently has focus.

override
ForeColorSystem.Drawing.Color.

Gets or sets the foreground color.

FullRowSelectbool.

Gets or sets a value indicating whether clicking an item selects all its subitems.

GridLinesbool.

Gets or sets a value indicating whether grid lines appear between the rows and columns containing the items and subitems in the control.

[read-only]
GroupsListViewGroupCollection.

Gets the collection of System.Windows.Forms.ListViewGroup objects assigned to the control.

HeaderStyleColumnHeaderStyle.

Gets or sets the column header style.

HideSelectionbool.

Gets or sets a value indicating whether the selected item in the control remains highlighted when the control loses focus.

HotTrackingbool.

Gets or sets a value indicating whether the text of an item or subitem has the appearance of a hyperlink when the mouse pointer passes over it.

HoverSelectionbool.

Gets or sets a value indicating whether an item is automatically selected when the mouse pointer remains over the item for a few seconds.

[read-only]
InsertionMarkListViewInsertionMark.

Gets an object used to indicate the expected drop location when an item is dragged within a System.Windows.Forms.ListView control.

[read-only]
ItemsListView.ListViewItemCollection.

Gets a collection containing all items in the control.

LabelEditbool.

Gets or sets a value indicating whether the user can edit the labels of items in the control.

LabelWrapbool.

Gets or sets a value indicating whether item labels wrap when items are displayed in the control as icons.

LargeImageListImageList.

Gets or sets the System.Windows.Forms.ImageList to use when displaying items as large icons in the control.

ListViewItemSorterIComparer.

Gets or sets the sorting comparer for the control.

MultiSelectbool.

Gets or sets a value indicating whether multiple items can be selected.

OwnerDrawbool.

Gets or sets a value indicating whether the System.Windows.Forms.ListView control is drawn by the operating system or by code that you provide.

PaddingPadding.

Gets or sets the space between the System.Windows.Forms.ListView control and its contents.

RightToLeftLayoutbool.

Gets or sets a value indicating whether the control is laid out from right to left.

Scrollablebool.

Gets or sets a value indicating whether a scroll bar is added to the control when there is not enough room to display all items.

[read-only]
SelectedIndicesListView.SelectedIndexCollection.

Gets the indexes of the selected items in the control.

[read-only]
SelectedItemsListView.SelectedListViewItemCollection.

Gets the items that are selected in the control.

ShowGroupsbool.

Gets or sets a value indicating whether items are displayed in groups.

ShowItemToolTipsbool.

Gets or sets a value indicating whether ToolTips are shown for the System.Windows.Forms.ListViewItem objects contained in the System.Windows.Forms.ListView.

SmallImageListImageList.

Gets or sets the System.Windows.Forms.ImageList to use when displaying items as small icons in the control.

SortingSortOrder.

Gets or sets the sort order for items in the control.

StateImageListImageList.

Gets or sets the System.Windows.Forms.ImageList associated with application-defined states in the control.

override
Textstring.

This property is not relevant for this class.

TileSizeSystem.Drawing.Size.

Gets or sets the size of the tiles shown in tile view.

TopItemListViewItem.

Gets or sets the first visible item in the control.

UseCompatibleStateImageBehaviorbool.

Gets or sets a value indicating whether the System.Windows.Forms.ListView uses state image behavior that is compatible with the dnprdnshort 1.1 or the dnprdnshort 2.0.

ViewView.

Gets or sets how items are displayed in the control.

VirtualListSizeint.

Gets or sets the number of System.Windows.Forms.ListViewItem objects contained in the list when in virtual mode.

VirtualModebool.

Gets or sets a value indicating whether you have provided your own data-management operations for the System.Windows.Forms.ListView control.

Protected Properties

[read-only]
override
CreateParamsCreateParams.

This property is not relevant for this class.

[read-only]
override
DefaultSizeSystem.Drawing.Size.

Gets the default size of the control.

override
DoubleBufferedbool.

Gets or sets a value indicating whether this control should redraw its surface using a secondary buffer to reduce or prevent flicker.

Public Methods

ArrangeIcons()

Arranges items in the control when they are displayed as icons based on the value of the ListView.Alignment property.

ArrangeIcons(ListViewAlignment)

Arranges items in the control when they are displayed as icons with a specified alignment setting.

AutoResizeColumn(int, ColumnHeaderAutoResizeStyle)

Resizes the width of the given column as indicated by the resize style.

AutoResizeColumns(ColumnHeaderAutoResizeStyle)

Resizes the width of the columns as indicated by the resize style.

BeginUpdate()

Prevents the control from drawing until the ListView.EndUpdate method is called.

Clear()

Removes all items and columns from the control.

EndUpdate()

Resumes drawing of the list view control after drawing is suspended by the ListView.BeginUpdate method.

EnsureVisible(int)

Ensures that the specified item is visible within the control, scrolling the contents of the control if necessary.

FindItemWithText(string) : ListViewItem

Finds the first System.Windows.Forms.ListViewItem that begins with the specified text value.

FindItemWithText(string, bool, int) : ListViewItem

Finds the first System.Windows.Forms.ListViewItem or System.Windows.Forms.ListViewItem.ListViewSubItem, if indicated, that begins with the specified text value. The search starts at the specified index.

FindItemWithText(string, bool, int, bool) : ListViewItem

Finds the first System.Windows.Forms.ListViewItem or System.Windows.Forms.ListViewItem.ListViewSubItem, if indicated, that begins with the specified text value. The search starts at the specified index.

FindNearestItem(SearchDirectionHint, System.Drawing.Point) : ListViewItem

Finds the next item from the given point, searching in the specified direction

FindNearestItem(SearchDirectionHint, int, int) : ListViewItem

Finds the next item from the given x- and y-coordinates, searching in the specified direction.

GetItemAt(int, int) : ListViewItem

Retrieves the item at the specified location.

GetItemRect(int) : System.Drawing.Rectangle

Retrieves the bounding rectangle for a specific item within the list view control.

GetItemRect(int, ItemBoundsPortion) : System.Drawing.Rectangle

Retrieves the specified portion of the bounding rectangle for a specific item within the list view control.

HitTest(System.Drawing.Point) : ListViewHitTestInfo

Provides item information, given a point.

HitTest(int, int) : ListViewHitTestInfo

Provides item information, given x- and y-coordinates.

RedrawItems(int, int, bool)

Forces a range of System.Windows.Forms.ListViewItem objects to be redrawn.

Sort()

Sorts the items of the list view.

override
ToString() : string

Returns a string representation of the System.Windows.Forms.ListView control.

Protected Methods

override
CreateHandle()

Creates a handle for the control.

override
Dispose(bool)

Releases the unmanaged resources used by the System.Windows.Forms.ListView and optionally releases the managed resources.

override
IsInputKey(Keys) : bool

Determines whether the specified key is a regular input key or a special key that requires preprocessing.

OnAfterLabelEdit(LabelEditEventArgs)

Raises the ListView.AfterLabelEdit event.

override
OnBackgroundImageChanged(EventArgs)

Raises the Control.BackgroundImageChanged event.

OnBeforeLabelEdit(LabelEditEventArgs)

Raises the ListView.BeforeLabelEdit event.

OnCacheVirtualItems(CacheVirtualItemsEventArgs)

Raises the ListView.CacheVirtualItems event.

OnColumnClick(ColumnClickEventArgs)

Raises the ListView.ColumnClick event.

OnColumnReordered(ColumnReorderedEventArgs)

Raises the ListView.ColumnReordered event.

OnColumnWidthChanged(ColumnWidthChangedEventArgs)

Raises the ListView.ColumnWidthChanged event.

OnColumnWidthChanging(ColumnWidthChangingEventArgs)

Raises the ListView.ColumnWidthChanging event.

OnDrawColumnHeader(DrawListViewColumnHeaderEventArgs)

Raises the ListView.DrawColumnHeader event.

OnDrawItem(DrawListViewItemEventArgs)

Raises the ListView.DrawItem event.

OnDrawSubItem(DrawListViewSubItemEventArgs)

Raises the ListView.DrawSubItem event.

override
OnEnabledChanged(EventArgs)
Documentation for this section has not yet been entered.
override
OnFontChanged(EventArgs)

Raises the FontChanged event.

override
OnHandleCreated(EventArgs)

Raises the Control.HandleCreated event.

override
OnHandleDestroyed(EventArgs)

Raises the Control.HandleDestroyed event.

OnItemActivate(EventArgs)

Raises the ListView.ItemActivate event.

OnItemCheck(ItemCheckEventArgs)

Raises the ListView.ItemCheck event.

OnItemChecked(ItemCheckedEventArgs)

Raises the ListView.ItemChecked event.

OnItemDrag(ItemDragEventArgs)

Raises the ListView.ItemDrag event.

OnItemMouseHover(ListViewItemMouseHoverEventArgs)

Raises the ListView.ItemMouseHover event.

OnItemSelectionChanged(ListViewItemSelectionChangedEventArgs)

Raises the ListView.ItemSelectionChanged event.

override
OnMouseHover(EventArgs)

Raises the Control.MouseHover event.

override
OnMouseLeave(EventArgs)

Raises the Control.MouseLeave event.

override
OnParentChanged(EventArgs)

Raises the Control.ParentChanged event.

override
OnResize(EventArgs)

Raises the Control.Resize event.

OnRetrieveVirtualItem(RetrieveVirtualItemEventArgs)

Raises the ListView.RetrieveVirtualItem event.

OnRightToLeftLayoutChanged(EventArgs)

Raises the ListView.RightToLeftLayoutChanged event.

OnSearchForVirtualItem(SearchForVirtualItemEventArgs)

Raises the ListView.SearchForVirtualItem event.

OnSelectedIndexChanged(EventArgs)

Raises the ListView.SelectedIndexChanged event.

override
OnSystemColorsChanged(EventArgs)

Raises the Control.SystemColorsChanged event.

OnVirtualItemsSelectionRangeChanged(ListViewVirtualItemsSelectionRangeChangedEventArgs)

Raises the ListView.VirtualItemsSelectionRangeChanged event.

RealizeProperties()

Initializes the properties of the System.Windows.Forms.ListView control that manage the appearance of the control.

UpdateExtendedStyles()

Updates the extended styles applied to the list view control.

override
WndProc(ref Message)
Documentation for this section has not yet been entered.

Public Events

AfterLabelEdit

Occurs when the label for an item is edited by the user.

BackgroundImageChangedDocumentation for this section has not yet been entered.
BackgroundImageLayoutChanged

Occurs when the ListView.BackgroundImageLayout property changes.

BeforeLabelEdit

Occurs when the user starts editing the label of an item.

CacheVirtualItems

Occurs when the contents of the display area for a System.Windows.Forms.ListView in virtual mode has changed, and the System.Windows.Forms.ListView determines that a new range of items is needed.

ColumnClick

Occurs when the user clicks a column header within the list view control.

ColumnReordered

Occurs when the column header order is changed.

ColumnWidthChanged

Occurs after the width of a column is successfully changed.

ColumnWidthChanging

Occurs when the width of a column is changing.

DrawColumnHeader

Occurs when the details view of a System.Windows.Forms.ListView is drawn and the ListView.OwnerDraw property is set to true.

DrawItem

Occurs when a System.Windows.Forms.ListView is drawn and the ListView.OwnerDraw property is set to true.

DrawSubItem

Occurs when the details view of a System.Windows.Forms.ListView is drawn and the ListView.OwnerDraw property is set to true.

ItemActivate

Occurs when an item is activated.

ItemCheck

Occurs when the check state of an item changes.

ItemChecked

Occurs when the checked state of an item changes.

ItemDrag

Occurs when the user begins dragging an item.

ItemMouseHover

Occurs when the mouse hovers over an item.

ItemSelectionChanged

Occurs when the selection state of an item changes.

PaddingChanged

Occurs when the value of the ListView.Padding property changes.

Paint

Occurs when the System.Windows.Forms.ListView control is painted.

RetrieveVirtualItem

Occurs when the System.Windows.Forms.ListView is in virtual mode and requires a System.Windows.Forms.ListViewItem.

RightToLeftLayoutChanged

Occurs when the value of the ListView.RightToLeftLayout property changes.

SearchForVirtualItem

Occurs when the System.Windows.Forms.ListView is in virtual mode and a search is taking place.

SelectedIndexChanged

Occurs when the ListView.SelectedIndices collection changes.

TextChanged

Occurs when the ListView.Text property changes.

VirtualItemsSelectionRangeChanged

Occurs when a System.Windows.Forms.ListView is in virtual mode and the selection state of a range of items has changed.