DocumentList.OnDocumentActivated Method
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Raises the DocumentActivated event.
Namespace: Microsoft.WindowsCE.Forms
Assembly: Microsoft.WindowsCE.Forms (in Microsoft.WindowsCE.Forms.dll)
Syntax
'Declaration
Protected Overridable Sub OnDocumentActivated ( _
e As DocumentListEventArgs _
)
'Usage
Dim e As DocumentListEventArgs
Me.OnDocumentActivated(e)
protected virtual void OnDocumentActivated(
DocumentListEventArgs e
)
protected:
virtual void OnDocumentActivated(
DocumentListEventArgs^ e
)
abstract OnDocumentActivated :
e:DocumentListEventArgs -> unit
override OnDocumentActivated :
e:DocumentListEventArgs -> unit
Parameters
- e
Type: Microsoft.WindowsCE.Forms.DocumentListEventArgs
A DocumentListEventArgs that contains the event data.
Remarks
The DocumentActivated event occurs when a file is opened with a DocumentList control.
Raising an event invokes the event handler through a delegate. For more information, see Raising an Event.
The OnDocumentActivated method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
Notes to Inheritors
When overriding OnDocumentActivated in a derived class, be sure to call the base class’s OnDocumentActivated method so that registered delegates receive the event.
Examples
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.
' Handle the DocumentedActivated
' event with code to open the file.
Private Sub DocList_DocumentActivated(ByVal sender As Object, _
ByVal docevent As Microsoft.WindowsCE.Forms.DocumentListEventArgs) Handles DocumentList1.DocumentActivated
StatusBar1.Text = "Activated: " & docevent.Path
' Add code to open the selected file.
End Sub
private void OnDocActivated(object obj, DocumentListEventArgs docg)
{
statusBar1.Text = "Activated: " + docg.Path;
// Add code to open the selected file.
}
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
Platforms
Windows Mobile for Pocket PC
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Version Information
.NET Compact Framework
Supported in: 3.5, 2.0