ISelectionService.SelectionChanging-Ereignis
Tritt ein, wenn sich die aktuelle Auswahl gerade ändert.
Namespace: System.ComponentModel.Design
Assembly: System (in system.dll)
Syntax
'Declaration
Event SelectionChanging As EventHandler
'Usage
Dim instance As ISelectionService
Dim handler As EventHandler
AddHandler instance.SelectionChanging, handler
event EventHandler SelectionChanging
event EventHandler^ SelectionChanging {
void add (EventHandler^ value);
void remove (EventHandler^ value);
}
/** @event */
void add_SelectionChanging (EventHandler value)
/** @event */
void remove_SelectionChanging (EventHandler value)
JScript unterstützt die Verwendung von Ereignissen, aber nicht die Deklaration von neuen Ereignissen.
Hinweise
Verringern Sie die für die Behandlung dieses Ereignisses erforderlichen Verarbeitungsvorgänge, da die Gesamtleistung des Formular-Designers durch die Verarbeitungsprozesse in diesem Ereignishandler erheblich beeinträchtigt werden kann.
Beispiel
Im folgenden Beispiel wird die Verwendung des SelectionChanging-Ereignisses veranschaulicht.
' 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.
Private Sub OnSelectionChanging(ByVal sender As Object, ByVal args As EventArgs)
OnUserChange("OnSelectionChanging", args.ToString())
End Sub 'OnSelectionChanging
// Add SelectionChanging event handler to event
m_selectionService.SelectionChanging += new EventHandler(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. */
private void OnSelectionChanging(object sender, EventArgs args)
{
OnUserChange("OnSelectionChanging", args.ToString());
}
// Add SelectionChanging event handler to event
m_selectionService->SelectionChanging += gcnew EventHandler( this, &ComponentClass::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() );
}
// Add SelectionChanging event handler to event
mSelectionService.add_SelectionChanging(
new EventHandler(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.
*/
private void OnSelectionChanging(Object sender, EventArgs args)
{
OnUserChange("OnSelectionChanging", args.ToString());
} //OnSelectionChanging
Plattformen
Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
.NET Framework unterstützt nicht alle Versionen sämtlicher Plattformen. Eine Liste der unterstützten Versionen finden Sie unter Systemanforderungen.
Versionsinformationen
.NET Framework
Unterstützt in: 2.0, 1.1, 1.0
Siehe auch
Referenz
ISelectionService-Schnittstelle
ISelectionService-Member
System.ComponentModel.Design-Namespace
ISelectionService.SelectionChanged-Ereignis
EventHandler