ISelectionService.SelectionChanged Event
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Occurs when the current selection changes.
public:
event EventHandler ^ SelectionChanged;
event EventHandler SelectionChanged;
member this.SelectionChanged : EventHandler
Event SelectionChanged As EventHandler
Event Type
Examples
The following example illustrates how to use the SelectionChanged event.
// 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
Remarks
Minimize processing when handling this event, because processing that occurs within this event handler can significantly affect the overall performance of the form designer.
Applies to
See also
Samarbeid med oss på GitHub
Du finner kilden for dette innholdet på GitHub. Der du også kan opprette og se gjennom problemer og pull-forespørsler. Hvis du vil ha mer informasjon, kan du se vår bidragsyterveiledning.