Compartilhar via


IViewElementFactory.CreateViewElement<TView>(ITextView, Object) 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 view 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.

Exceptions

Thrown if the conversion is unknown or unsupported.

Applies to