ListView.Activation Property

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

Namespace:  System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

public ItemActivation Activation { get; set; }

Property Value

Type: System.Windows.Forms.ItemActivation
One of the ItemActivation values. The default is Standard.

ExceptionCondition
InvalidEnumArgumentException

The value specified is not one of the ItemActivation members.

The Activation property allows you to specify how the user will activate an item in the ListView control. Activating an item in a ListView differs from just selecting an item. When an item is activated, an action is typically performed in an event handler for the ItemActivate event. For example, when an item is activated you might open a file or display a dialog box that allows the item to be edited. Typically, an item is double-clicked by the user to activate it. If the Activation property is set to OneClick, clicking the item one time activates it. Setting the Activation property to TwoClick differs from the standard double-click because the two clicks can have any duration between them.

NoteNote

If the Activation property is set to OneClick or TwoClick, label editing will not be allowed regardless of the value of the LabelEdit property.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft