ITextEditorFactoryService.CreateTextView Method

Definition

Overloads

CreateTextView()

Creates an IWpfTextView on a newly created ITextBuffer having content type Text.

CreateTextView(ITextBuffer)

Creates an IWpfTextView that displays the contents of textBuffer.

CreateTextView(ITextBuffer, ITextViewRoleSet)

Creates an IWpfTextView that displays the contents of textBuffer.

CreateTextView(ITextViewModel, ITextViewRoleSet, IEditorOptions)

Creates an IWpfTextView that displays the contents of viewModel.

CreateTextView(ITextBuffer, ITextViewRoleSet, IEditorOptions)

Creates an IWpfTextView that displays the contents of textBuffer.

CreateTextView(ITextDataModel, ITextViewRoleSet, IEditorOptions)

Creates an IWpfTextView that displays the contents of dataModel.

CreateTextView()

Creates an IWpfTextView on a newly created ITextBuffer having content type Text.

public:
 Microsoft::VisualStudio::Text::Editor::IWpfTextView ^ CreateTextView();
public:
 Microsoft::VisualStudio::Text::Editor::IWpfTextView ^ CreateTextView();
Microsoft::VisualStudio::Text::Editor::IWpfTextView CreateTextView();
public Microsoft.VisualStudio.Text.Editor.IWpfTextView CreateTextView ();
abstract member CreateTextView : unit -> Microsoft.VisualStudio.Text.Editor.IWpfTextView
Public Function CreateTextView () As IWpfTextView

Returns

A IWpfTextView.

Applies to

CreateTextView(ITextBuffer)

Creates an IWpfTextView that displays the contents of textBuffer.

public:
 Microsoft::VisualStudio::Text::Editor::IWpfTextView ^ CreateTextView(Microsoft::VisualStudio::Text::ITextBuffer ^ textBuffer);
public:
 Microsoft::VisualStudio::Text::Editor::IWpfTextView ^ CreateTextView(Microsoft::VisualStudio::Text::ITextBuffer ^ textBuffer);
Microsoft::VisualStudio::Text::Editor::IWpfTextView CreateTextView(Microsoft::VisualStudio::Text::ITextBuffer const & textBuffer);
public Microsoft.VisualStudio.Text.Editor.IWpfTextView CreateTextView (Microsoft.VisualStudio.Text.ITextBuffer textBuffer);
abstract member CreateTextView : Microsoft.VisualStudio.Text.ITextBuffer -> Microsoft.VisualStudio.Text.Editor.IWpfTextView
Public Function CreateTextView (textBuffer As ITextBuffer) As IWpfTextView

Parameters

textBuffer
ITextBuffer

The ITextBuffer that provides the text for the view.

Returns

An IWpfTextView having the default set of text view roles.

Exceptions

textBuffer is null.

Remarks

An ITextBuffer can be displayed in multiple views. A trivial ITextDataModel will be constructed and an ITextViewModel will be constructed based on the IContentType of the textBuffer.

Applies to

CreateTextView(ITextBuffer, ITextViewRoleSet)

Creates an IWpfTextView that displays the contents of textBuffer.

public:
 Microsoft::VisualStudio::Text::Editor::IWpfTextView ^ CreateTextView(Microsoft::VisualStudio::Text::ITextBuffer ^ textBuffer, Microsoft::VisualStudio::Text::Editor::ITextViewRoleSet ^ roles);
public Microsoft.VisualStudio.Text.Editor.IWpfTextView CreateTextView (Microsoft.VisualStudio.Text.ITextBuffer textBuffer, Microsoft.VisualStudio.Text.Editor.ITextViewRoleSet roles);
abstract member CreateTextView : Microsoft.VisualStudio.Text.ITextBuffer * Microsoft.VisualStudio.Text.Editor.ITextViewRoleSet -> Microsoft.VisualStudio.Text.Editor.IWpfTextView
Public Function CreateTextView (textBuffer As ITextBuffer, roles As ITextViewRoleSet) As IWpfTextView

Parameters

textBuffer
ITextBuffer

The ITextBuffer that provides the text for the view.

roles
ITextViewRoleSet

The set of roles filled by the view.

Returns

An IWpfTextView.

Exceptions

textBuffer or roles is null.

Remarks

An ITextBuffer can be displayed in multiple views. A trivial ITextDataModel will be constructed and an ITextViewModel will be constructed based on the IContentType of the textBuffer and the roles.

Applies to

CreateTextView(ITextViewModel, ITextViewRoleSet, IEditorOptions)

Creates an IWpfTextView that displays the contents of viewModel.

public:
 Microsoft::VisualStudio::Text::Editor::IWpfTextView ^ CreateTextView(Microsoft::VisualStudio::Text::Editor::ITextViewModel ^ viewModel, Microsoft::VisualStudio::Text::Editor::ITextViewRoleSet ^ roles, Microsoft::VisualStudio::Text::Editor::IEditorOptions ^ parentOptions);
public Microsoft.VisualStudio.Text.Editor.IWpfTextView CreateTextView (Microsoft.VisualStudio.Text.Editor.ITextViewModel viewModel, Microsoft.VisualStudio.Text.Editor.ITextViewRoleSet roles, Microsoft.VisualStudio.Text.Editor.IEditorOptions parentOptions);
abstract member CreateTextView : Microsoft.VisualStudio.Text.Editor.ITextViewModel * Microsoft.VisualStudio.Text.Editor.ITextViewRoleSet * Microsoft.VisualStudio.Text.Editor.IEditorOptions -> Microsoft.VisualStudio.Text.Editor.IWpfTextView
Public Function CreateTextView (viewModel As ITextViewModel, roles As ITextViewRoleSet, parentOptions As IEditorOptions) As IWpfTextView

Parameters

viewModel
ITextViewModel

The ITextViewModel that provides the text buffers for the view.

roles
ITextViewRoleSet

The set of roles filled by the view.

parentOptions
IEditorOptions

The options environment for the text view.

Returns

An IWpfTextView.

Exceptions

viewModel or roles or parentOptions is null.

Applies to

CreateTextView(ITextBuffer, ITextViewRoleSet, IEditorOptions)

Creates an IWpfTextView that displays the contents of textBuffer.

public:
 Microsoft::VisualStudio::Text::Editor::IWpfTextView ^ CreateTextView(Microsoft::VisualStudio::Text::ITextBuffer ^ textBuffer, Microsoft::VisualStudio::Text::Editor::ITextViewRoleSet ^ roles, Microsoft::VisualStudio::Text::Editor::IEditorOptions ^ parentOptions);
public Microsoft.VisualStudio.Text.Editor.IWpfTextView CreateTextView (Microsoft.VisualStudio.Text.ITextBuffer textBuffer, Microsoft.VisualStudio.Text.Editor.ITextViewRoleSet roles, Microsoft.VisualStudio.Text.Editor.IEditorOptions parentOptions);
abstract member CreateTextView : Microsoft.VisualStudio.Text.ITextBuffer * Microsoft.VisualStudio.Text.Editor.ITextViewRoleSet * Microsoft.VisualStudio.Text.Editor.IEditorOptions -> Microsoft.VisualStudio.Text.Editor.IWpfTextView
Public Function CreateTextView (textBuffer As ITextBuffer, roles As ITextViewRoleSet, parentOptions As IEditorOptions) As IWpfTextView

Parameters

textBuffer
ITextBuffer

The ITextBuffer that provides the text for the view.

roles
ITextViewRoleSet

The set of roles filled by the view.

parentOptions
IEditorOptions

The options environment for the text view.

Returns

An IWpfTextView.

Exceptions

textBuffer or roles or parentOptions is null.

Remarks

An ITextBuffer can be displayed in multiple views. A trivial ITextDataModel will be constructed and an ITextViewModel will be constructed based on the IContentType of the textBuffer and the roles.

Applies to

CreateTextView(ITextDataModel, ITextViewRoleSet, IEditorOptions)

Creates an IWpfTextView that displays the contents of dataModel.

public:
 Microsoft::VisualStudio::Text::Editor::IWpfTextView ^ CreateTextView(Microsoft::VisualStudio::Text::ITextDataModel ^ dataModel, Microsoft::VisualStudio::Text::Editor::ITextViewRoleSet ^ roles, Microsoft::VisualStudio::Text::Editor::IEditorOptions ^ parentOptions);
public Microsoft.VisualStudio.Text.Editor.IWpfTextView CreateTextView (Microsoft.VisualStudio.Text.ITextDataModel dataModel, Microsoft.VisualStudio.Text.Editor.ITextViewRoleSet roles, Microsoft.VisualStudio.Text.Editor.IEditorOptions parentOptions);
abstract member CreateTextView : Microsoft.VisualStudio.Text.ITextDataModel * Microsoft.VisualStudio.Text.Editor.ITextViewRoleSet * Microsoft.VisualStudio.Text.Editor.IEditorOptions -> Microsoft.VisualStudio.Text.Editor.IWpfTextView
Public Function CreateTextView (dataModel As ITextDataModel, roles As ITextViewRoleSet, parentOptions As IEditorOptions) As IWpfTextView

Parameters

dataModel
ITextDataModel

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

roles
ITextViewRoleSet

The set of roles filled by the view.

parentOptions
IEditorOptions

The options environment for the text view.

Returns

An IWpfTextView.

Exceptions

dataModel or roles or parentOptions is null.

Remarks

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

Applies to