次の方法で共有


EventBindingService クラス

更新 : 2008 年 7 月

現在の編集コンテキストでイベント処理クラスの内容を作成、削除、表示、および照会するメソッドを定義します。

名前空間 :  Microsoft.Windows.Design.Services
アセンブリ :  Microsoft.Windows.Design.Extensibility (Microsoft.Windows.Design.Extensibility.dll 内)

構文

'宣言
Public MustInherit Class EventBindingService
'使用
Dim instance As EventBindingService
public abstract class EventBindingService
public ref class EventBindingService abstract
public abstract class EventBindingService

解説

Visual Studio には、イベントをイベント ハンドラと関連付ける方法が 2 つあります。最初の方法では Handles キーワードを使用し、2 番目の方法では AddHandler メソッドと RemoveHandler メソッドを使用します。C# では、EventHandler での += と -= の使用は、AddHandlerRemoveHandler に対応します。Visual Basic では、どちらの方法も使用できます。C# では、2 番目の方法のみ使用できます。詳細については、次のトピックを参照してください。

Visual Basic におけるイベント

イベント (C# プログラミング ガイド)

Windows フォーム内でのイベント ハンドラの作成

イベント (WPF)

EventBindingService クラスを使用して、この動作を拡張できます。

継承階層

System.Object
  Microsoft.Windows.Design.Services.EventBindingService

スレッド セーフ

この型のすべてのパブリック static (Visual Basic では Shared) メンバは、スレッド セーフです。インスタンス メンバの場合は、スレッド セーフであるとは限りません。

参照

参照

EventBindingService メンバ

Microsoft.Windows.Design.Services 名前空間

ModelEditingScope

ModelEvent

ModelEventCollection

その他の技術情報

WPF デザイナの機能拡張アーキテクチャ

履歴の変更

日付

履歴

理由

2008 年 7 月

新しいメンバを追加 : OnEventHandlerGeneratedRemoveHandlesForNameEventHandlerGenerated

SP1 機能変更