ITextEditorFactoryService::CreateTextView Method (ITextDataModel^, ITextViewRoleSet^, IEditorOptions^)

 

Creates an IWpfTextView that displays the contents of the data model.

Namespace:   Microsoft.VisualStudio.Text.Editor
Assembly:  Microsoft.VisualStudio.Text.UI.Wpf (in Microsoft.VisualStudio.Text.UI.Wpf.dll)

IWpfTextView^ CreateTextView(
	ITextDataModel^ dataModel,
	ITextViewRoleSet^ roles,
	IEditorOptions^ parentOptions
)

Parameters

dataModel
Type: Microsoft.VisualStudio.Text::ITextDataModel^

The ITextDataModel that provides the text buffers over which an ITextViewModel will be built for the view.

roles
Type: Microsoft.VisualStudio.Text.Editor::ITextViewRoleSet^

The set of roles filled by the view.

parentOptions
Type: Microsoft.VisualStudio.Text.Editor::IEditorOptions^

The options environment for the text view.

Exception Condition
ArgumentNullException

dataModel or roles or parentOptions is null.

An ITextDataModel can be displayed in multiple views. An ITextViewModel is constructed based on the IContentType of the dataModel and the roles.

Return to top
Show: