Compartir a través de


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)

Syntax

'Declaración
Function CreateTextView ( _
    dataModel As ITextDataModel, _
    roles As ITextViewRoleSet, _
    parentOptions As IEditorOptions _
) As IWpfTextView
IWpfTextView CreateTextView(
    ITextDataModel dataModel,
    ITextViewRoleSet roles,
    IEditorOptions parentOptions
)
IWpfTextView^ CreateTextView(
    ITextDataModel^ dataModel, 
    ITextViewRoleSet^ roles, 
    IEditorOptions^ parentOptions
)
abstract CreateTextView : 
        dataModel:ITextDataModel * 
        roles:ITextViewRoleSet * 
        parentOptions:IEditorOptions -> IWpfTextView 
function CreateTextView(
    dataModel : ITextDataModel, 
    roles : ITextViewRoleSet, 
    parentOptions : IEditorOptions
) : IWpfTextView

Parameters

Return Value

Type: Microsoft.VisualStudio.Text.Editor.IWpfTextView
An IWpfTextView.

Exceptions

Exception Condition
ArgumentNullException

dataModel or roles or parentOptions is nulla null reference (Nothing in Visual Basic).

Remarks

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

.NET Framework Security

See Also

Reference

ITextEditorFactoryService Interface

CreateTextView Overload

Microsoft.VisualStudio.Text.Editor Namespace