DocumentListEventArgs.Path Property
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Gets or sets the path to the file being deleted or selected in a DocumentList control.
Namespace: Microsoft.WindowsCE.Forms
Assembly: Microsoft.WindowsCE.Forms (in Microsoft.WindowsCE.Forms.dll)
Syntax
'Declaration
Public ReadOnly Property Path As String
Get
'Usage
Dim instance As DocumentListEventArgs
Dim value As String
value = instance.Path
public string Path { get; }
public:
property String^ Path {
String^ get ();
}
member Path : string
Property Value
Type: System.String
The path to the file. The default is an empty string ("").
Remarks
You can use this property to close any instances of an open file in response to the DeletingDocument event, and for opening the file in response to the DocumentActivated event.
Examples
The following code example defines a method that handles the DeletingDocument event. It uses the Path property of the DocumentListEventArgs to get the path to the deleted file. This code example is part of a larger example provided for the DocumentList class.
' Handle the DeletingDocument
' event with code to close the file.
Private Sub DocList_DeletingDocument(ByVal sender As Object, _
ByVal docevent As Microsoft.WindowsCE.Forms.DocumentListEventArgs) _
Handles DocumentList1.DeletingDocument
StatusBar1.Text = "Deleted: " & docevent.Path
' Add code to close any instances of the file.
End Sub
private void OnDelDoc(object obj, DocumentListEventArgs docg)
{
statusBar1.Text += "Deleted: " + docg.Path;
// Add code to close any instances of the 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