ISelectionService.SelectionChanging 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 is about to change.
public:
event EventHandler ^ SelectionChanging;
event EventHandler SelectionChanging;
member this.SelectionChanging : EventHandler
Event SelectionChanging As EventHandler
Event Type
Examples
The following example illustrates how to use the SelectionChanging event.
// 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
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
Sodelujte z nami v storitvi GitHub
Vir za to vsebino najdete v storitvi GitHub, kjer lahko tudi ustvarite in pregledate težave in zahtevke za uveljavitev sprememb. Če želite več informacij, glejte naš vodnik za sodelavce.