Condividi tramite


ISelectionService.SelectionChanging Evento

Definizione

Viene generato quando sta per cambiare la selezione corrente.

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

Tipo evento

Esempio

Nell'esempio seguente viene illustrato come usare l'evento 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

Commenti

Ridurre al minimo l'elaborazione durante la gestione di questo evento, perché l'elaborazione che si verifica all'interno di questo gestore eventi può influire significativamente sulle prestazioni complessive della finestra di progettazione moduli.

Si applica a

Vedi anche