DocumentList.DeletingDocument イベント

[このドキュメントはプレビュー版であり、後のリリースで変更されることがあります。 空白のトピックは、プレースホルダーとして挿入されています。]

DocumentList コントロールでファイルが削除されたときに発生します。

名前空間:  Microsoft.WindowsCE.Forms
アセンブリ:  Microsoft.WindowsCE.Forms (Microsoft.WindowsCE.Forms.dll 内)

構文

'宣言
Public Event DeletingDocument As DocumentListEventHandler
'使用
Dim instance As DocumentList
Dim handler As DocumentListEventHandler

AddHandler instance.DeletingDocument, handler
public event DocumentListEventHandler DeletingDocument
public:
 event DocumentListEventHandler^ DeletingDocument {
    void add (DocumentListEventHandler^ value);
    void remove (DocumentListEventHandler^ value);
}
member DeletingDocument : IEvent<DocumentListEventHandler,
    DocumentListEventArgs>

解説

必要に応じてファイルを閉じることができるように、DocumentList コントロールは、ファイルが削除されたときにこのイベントを発生させます。ファイルへのパスを取得するには、Path プロパティを使用します。

イベント処理の詳細については、「イベントの利用」を参照してください。

DeletingDocument イベントを処理するメソッドのコード例を次に示します。このコード例は、DocumentList クラスのトピックで取り上げているコード例の一部分です。

' Handle the DeletingDocument ' event with code to close the file.PrivateSub DocList_DeletingDocument(ByVal sender AsObject, _
 ByVal docevent As Microsoft.WindowsCE.Forms.DocumentListEventArgs) _
 Handles DocumentList1.DeletingDocument

     StatusBar1.Text = "Deleted: " & docevent.Path
     ' Add code to close any instances of the file.EndSub
privatevoid OnDelDoc(object obj, DocumentListEventArgs docg)
{
    statusBar1.Text += "Deleted: " + docg.Path;

    // Add code to close any instances of the file.
}

.NET Framework セキュリティ

プラットフォーム

Windows Mobile for Pocket PC

.NET Framework および .NET Compact Framework では、各プラットフォームのすべてのバージョンはサポートしていません。 サポートされているバージョンについては、「.NET フレームワークのシステム要件」を参照してください。

バージョン情報

.NET Compact Framework

サポート対象 : 3.5、2.0

参照

参照

DocumentList クラス

DocumentList メンバー

Microsoft.WindowsCE.Forms 名前空間