IVsTextViewCreationListener 인터페이스
텍스트 뷰 어댑터 때 발생 하는 이벤트를 수신기 (IVsTextView) 만들어지고 초기화 됩니다.
네임스페이스: Microsoft.VisualStudio.Editor
어셈블리: Microsoft.VisualStudio.Editor(Microsoft.VisualStudio.Editor.dll)
구문
‘선언
Public Interface IVsTextViewCreationListener
public interface IVsTextViewCreationListener
public interface class IVsTextViewCreationListener
type IVsTextViewCreationListener = interface end
public interface IVsTextViewCreationListener
IVsTextViewCreationListener 형식에서는 다음과 같은 멤버를 노출합니다.
메서드
이름 | 설명 | |
---|---|---|
![]() |
VsTextViewCreated | IVsTextView 어댑터가 만들어지고 초기화된 경우 호출됩니다. |
위쪽
설명
내보내기 다음 특성을 사용 하 여 내보내기를 표시 해야 합니다.
[Export(typeof(IVsTextViewCreationListener))]
이 수신기에 대 한 특정 필터 ContentTypeAttribute 및 TextViewRoleAttribute.
예를 들어,이 수신기에 보기를 편집할 수 있는 텍스트를 제한 하려면 다음 특성을 사용 합니다.
[Export(typeof(IVsTextViewCreationListener))]
[ContentType("text")]
[TextViewRole(PredefinedTextViewRoles.Editable)]
ContentTypeAttribute 및 TextViewRoleAttribute 사용에 대한 자세한 내용은 편집기 확장 지점을 참조하십시오.
확장에서 특정 키 입력을 처리 하려는 경우이 수신기를 사용할 수 있습니다. 이 텍스트 뷰 어댑터에 대 한 참조를 가져와서 작업 (IVsTextView) 명령 필터를 보기에 추가 하려면이 참조를 사용 하는 텍스트 보기를 만들 때 (를 사용 하 여 AddCommandFilter).
예제
다음 연습에서는이 인터페이스의 예를 찾을 수 있습니다.