ISelectionService.SelectionChanging イベント

定義

現在選択されている対象がこれから変更されるときに発生します。

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

イベントの種類

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

// Add SelectionChanging event handler to event
m_selectionService->SelectionChanging += gcnew EventHandler( this, &ComponentClass::OnSelectionChanging );
// Add SelectionChanging event handler to event
m_selectionService.SelectionChanging += new EventHandler(OnSelectionChanging);
' Add SelectionChanging event handler to event
AddHandler m_selectionService.SelectionChanging, AddressOf OnSelectionChanging
/* This is the OnSelectionChanging 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 OnSelectionChanging( Object^ /*sender*/, EventArgs^ args )
{
   OnUserChange( "OnSelectionChanging", args->ToString() );
}
/* This is the OnSelectionChanging 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 OnSelectionChanging(object sender, EventArgs args) 
{
    OnUserChange("OnSelectionChanging", args.ToString());
}
' This is the OnSelectionChanging 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 OnSelectionChanging(ByVal sender As Object, ByVal args As EventArgs)
    OnUserChange("OnSelectionChanging", args.ToString())
 End Sub

注釈

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

適用対象

こちらもご覧ください