DocumentList.DocumentActivated イベント
[このドキュメントはプレビュー版であり、後のリリースで変更されることがあります。 空白のトピックは、プレースホルダーとして挿入されています。]
DocumentList コントロールでファイルが選択されたときに発生します。
名前空間: Microsoft.WindowsCE.Forms
アセンブリ: Microsoft.WindowsCE.Forms (Microsoft.WindowsCE.Forms.dll 内)
構文
'宣言
Public Event DocumentActivated As DocumentListEventHandler
'使用
Dim instance As DocumentList
Dim handler As DocumentListEventHandler
AddHandler instance.DocumentActivated, handler
public event DocumentListEventHandler DocumentActivated
public:
event DocumentListEventHandler^ DocumentActivated {
void add (DocumentListEventHandler^ value);
void remove (DocumentListEventHandler^ value);
}
member DocumentActivated : IEvent<DocumentListEventHandler,
DocumentListEventArgs>
解説
このイベントを処理すると、選択したファイルを開くことができます。ファイルへのパスを取得するには、Path プロパティを使用します。
ユーザーが DocumentList コントロールに関連付けられたショートカット メニューをアクティブにしたときには、このイベントは発生しません。
イベント処理の詳細については、「イベントの利用」を参照してください。
例
DocumentActivated イベントを処理するメソッドのコード例を次に示します。このコード例は、DocumentList クラスのトピックで取り上げているコード例の一部分です。
' Handle the DocumentedActivated ' event with code to open the file.PrivateSub DocList_DocumentActivated(ByVal sender AsObject, _
ByVal docevent As Microsoft.WindowsCE.Forms.DocumentListEventArgs) Handles DocumentList1.DocumentActivated
StatusBar1.Text = "Activated: " & docevent.Path
' Add code to open the selected file.EndSub
privatevoid OnDocActivated(object obj, DocumentListEventArgs docg)
{
statusBar1.Text = "Activated: " + docg.Path;
// Add code to open the selected file.
}
.NET Framework セキュリティ
- 直前の呼び出し元に対する完全な信頼。 このメンバーは、部分的に信頼されているコードから使用することはできません。 詳細については、「部分的に信頼される側のコードからライブラリの使用」を参照してください。
プラットフォーム
Windows Mobile for Pocket PC
.NET Framework および .NET Compact Framework では、各プラットフォームのすべてのバージョンはサポートしていません。 サポートされているバージョンについては、「.NET フレームワークのシステム要件」を参照してください。
バージョン情報
.NET Compact Framework
サポート対象 : 3.5、2.0