ISelectionService.SelectionChanging 이벤트
현재 선택이 변경되려 할 경우 발생합니다.
네임스페이스: System.ComponentModel.Design
어셈블리: System(system.dll)
구문
‘선언
Event SelectionChanging As EventHandler
‘사용 방법
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에서는 이벤트를 사용할 수 있지만 새로 선언할 수는 없습니다.
설명
이 이벤트 처리기 내에서 발생한 처리가 폼 디자이너의 전체 성능에 중요한 영향을 미칠 수 있으므로 해당 이벤트를 처리할 때 처리를 최소화합니다.
예제
다음 예제에서는 SelectionChanging 이벤트를 사용하는 방법을 보여 줍니다.
' 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
플랫폼
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에서 모든 플래폼의 모든 버전을 지원하지는 않습니다. 지원되는 버전의 목록은 시스템 요구 사항을 참조하십시오.
버전 정보
.NET Framework
2.0, 1.1, 1.0에서 지원
참고 항목
참조
ISelectionService 인터페이스
ISelectionService 멤버
System.ComponentModel.Design 네임스페이스
ISelectionService.SelectionChanged 이벤트
EventHandler