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