次の方法で共有


ISelectionService.SelectionChanged イベント

定義

現在の選択が変更したときに発生します。

public:
 event EventHandler ^ SelectionChanged;
event EventHandler SelectionChanged;
member this.SelectionChanged : EventHandler 
Event SelectionChanged As EventHandler 

イベントの種類

次の例は、 イベントの使用方法を SelectionChanged 示しています。

// Add SelectionChanged event handler to event
m_selectionService->SelectionChanged += gcnew EventHandler( this, &ComponentClass::OnSelectionChanged );
// Add SelectionChanged event handler to event
m_selectionService.SelectionChanged += new EventHandler(OnSelectionChanged);
' Add SelectionChanged event handler to event
AddHandler m_selectionService.SelectionChanged, AddressOf OnSelectionChanged
/* This is the OnSelectionChanged handler method.  This method calls
    OnUserChange to display a message that indicates the name of the
    handler that made the call and the type of the event argument. */
void OnSelectionChanged( Object^ /*sender*/, EventArgs^ args )
{
   OnUserChange( "OnSelectionChanged", args->ToString() );
}
/* This is the OnSelectionChanged handler method.  This method calls
    OnUserChange to display a message that indicates the name of the
    handler that made the call and the type of the event argument. */
private void OnSelectionChanged(object sender, EventArgs args) 
{
    OnUserChange("OnSelectionChanged", args.ToString());
}
' This is the OnSelectionChanged handler method.  This method calls
'  OnUserChange to display a message that indicates the name of the
'  handler that made the call and the type of the event argument. 
Private Sub OnSelectionChanged(ByVal sender As Object, ByVal args As EventArgs)
   OnUserChange("OnSelectionChanged", args.ToString())
End Sub

注釈

このイベント ハンドラー内で発生する処理はフォーム デザイナーの全体的なパフォーマンスに大きな影響を与える可能性があるため、このイベントを処理するときに処理を最小限に抑えます。

適用対象

こちらもご覧ください