ITextEditorFactoryService::CreateTextView Method (ITextBuffer^)
Visual Studio 2015
Creates an IWpfTextView that displays the contents of the specified text buffer.
Assembly: Microsoft.VisualStudio.Text.UI.Wpf (in Microsoft.VisualStudio.Text.UI.Wpf.dll)
Parameters
- textBuffer
-
Type:
Microsoft.VisualStudio.Text::ITextBuffer^
The ITextBuffer that provides the text for the view.
Return Value
Type: Microsoft.VisualStudio.Text.Editor::IWpfTextView^An IWpfTextView having all predefined text view roles.
| Exception | Condition |
|---|---|
| ArgumentNullException | textBuffer is null. |
An ITextBuffer can be displayed in multiple views. A trivial ITextDataModel is constructed, and an ITextViewModel is constructed based on the IContentType of the textBuffer.
Show: