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
'宣言
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
- 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.
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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.