Compartir vía


ISelectionService.SelectionChanged Evento

Definición

Se produce cuando cambia la selección actual.

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

Tipo de evento

Ejemplos

En el ejemplo siguiente se muestra cómo usar el SelectionChanged evento .

// 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

Comentarios

Minimice el procesamiento al controlar este evento, ya que el procesamiento que se produce dentro de este controlador de eventos puede afectar significativamente al rendimiento general del diseñador de formularios.

Se aplica a

Consulte también