This documentation is archived and is not being maintained.

DocumentList.DocumentActivated Event

Occurs when a file is selected in a DocumentList control.

Namespace: Microsoft.WindowsCE.Forms
Assembly: Microsoft.WindowsCE.Forms (in microsoft.windowsce.forms.dll)

public event DocumentListEventHandler DocumentActivated
/** @event */
public void add_DocumentActivated (DocumentListEventHandler value)

/** @event */
public void remove_DocumentActivated (DocumentListEventHandler value)

In JScript, you can handle the events defined by a class, but you cannot define your own.
Not applicable.

You can handle this event to open the selected file. Use the Path property to get the path to the file.

This event does not occur when the user activates a shortcut menu associated with the DocumentList control.

For more information about handling events, see Consuming Events.

The following code example shows a method that handles the DocumentActivated event. This code example is part of a larger example provided for the DocumentList class.

private void OnDocActivated(object obj, DocumentListEventArgs docg)
{
    statusBar1.Text = "Activated: " + docg.Path;

    // Add code to open the selected file.
}

Windows Mobile for Pocket PC

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Compact Framework

Supported in: 2.0
Show: