ITextBufferFactoryService Interface

The factory service for ordinary text buffers.

Namespace:  Microsoft.VisualStudio.Text
Assembly:  Microsoft.VisualStudio.Text.Data (in Microsoft.VisualStudio.Text.Data.dll)

public interface ITextBufferFactoryService

The ITextBufferFactoryService type exposes the following members.

Public propertyInertContentTypeA content type for which no associated artifacts are automatically created.
Public propertyPlaintextContentTypePredefined content type for plain text files.
Public propertyTextContentTypeThe text content type.

Public methodCreateTextBuffer()Creates an empty ITextBuffer with IContentType "text".
Public methodCreateTextBuffer(IContentType)Creates an empty ITextBuffer with the specified IContentType.
Public methodCreateTextBuffer(TextReader, IContentType)Creates an ITextBuffer with the given content type and populates it by reading data from the specified text reader.
Public methodCreateTextBuffer(String, IContentType)Creates an ITextBuffer with the specified IContentType and populates it with the given text.

Public eventTextBufferCreatedRaised when any ITextBuffer is created.

This is a MEF Component, and should be imported with the following syntax:

ITextBufferFactoryService TextBufferFactoryService =null;
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
© 2015 Microsoft