IWpfTextViewCreationListener Interface
Listens to text view created events.
Namespace: Microsoft.VisualStudio.Text.Editor
Assembly: Microsoft.VisualStudio.Text.UI.Wpf (in Microsoft.VisualStudio.Text.UI.Wpf.dll)
Syntax
'Dichiarazione
Public Interface IWpfTextViewCreationListener
public interface IWpfTextViewCreationListener
public interface class IWpfTextViewCreationListener
type IWpfTextViewCreationListener = interface end
public interface IWpfTextViewCreationListener
The IWpfTextViewCreationListener type exposes the following members.
Methods
Name | Description | |
---|---|---|
TextViewCreated | Called when a text view having matching roles is created over a text data model having a matching content type. |
Top
Remarks
Exporters must specify at least one ContentTypeAttribute and one TextViewRoleAttribute, and should mark their export using the following attribute:
[Export(typeof(IWpfTextViewCreationListener))]
[ContentType(....)]
[TextViewRole(....)]
Use this interface instead of IWpfTextViewConnectionListener if your extension does not depend on the content type of the text view. This is because SubjectBuffersConnected is called when the content type of an existing buffer is changed to the appropriate content type (as well as when it is connected to the view), while TextViewCreated is called only at the creation of a text view.
Examples
For an example of how to use this interface, see Walkthrough: Customizing the Text View.