다음을 통해 공유


ISelectionService.SelectionChanged 이벤트

정의

현재 선택이 변경될 때 발생합니다.

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

이벤트 유형

예제

다음 예제에서는 사용 하는 방법을 보여 줍니다는 SelectionChanged 이벤트입니다.

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

설명

이 이벤트 처리기 내에서 발생하는 처리는 양식 디자이너의 전반적인 성능에 크게 영향을 줄 수 있으므로 이 이벤트를 처리할 때 처리를 최소화합니다.

적용 대상

추가 정보