This documentation is archived and is not being maintained.

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 */
public ItemActivation get_Activation ()

/** @property */
public void set_Activation (ItemActivation value)

public function get Activation () : ItemActivation

public function set Activation (value : ItemActivation)

Property Value

One of the ItemActivation values. The default is Standard.

Exception typeCondition

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 is different from simply 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 once activates it. Setting the Activation property to TwoClick is different 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.

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

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

.NET Framework

Supported in: 2.0, 1.1, 1.0

.NET Compact Framework

Supported in: 2.0, 1.0
Show: