ISelectionService.SelectionChanging 事件
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
發生於目前的選取將要變更時。
public:
event EventHandler ^ SelectionChanging;
event EventHandler SelectionChanging;
member this.SelectionChanging : EventHandler
Event SelectionChanging As EventHandler
事件類型
範例
下列範例說明如何使用 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
備註
在處理此事件時將處理最小化,因為此事件處理程式中發生的處理可能會大幅影響表單設計工具的整體效能。