Compartilhar via


IViewElementFactoryService.CreateViewElement<TView> Method

Definition

Converts model into an equivalent object of type TView.

public:
generic <typename TView>
 where TView : class TView CreateViewElement(Microsoft::VisualStudio::Text::Editor::ITextView ^ textView, System::Object ^ model);
public TView CreateViewElement<TView> (Microsoft.VisualStudio.Text.Editor.ITextView textView, object model) where TView : class;
abstract member CreateViewElement : Microsoft.VisualStudio.Text.Editor.ITextView * obj -> 'View (requires 'View : null)
Public Function CreateViewElement(Of TView As Class) (textView As ITextView, model As Object) As TView

Type Parameters

TView

The base type of the view element on the specific platform.

Parameters

textView
ITextView

The textView that owns the control that will host this view element.

model
Object

The object to convert to a view element.

Returns

TView

A new object of type TView or null if the conversion is unknown.

Applies to