共用方式為


IUIElementProvider<TItem, TContext> Interface

Defines the provider of WPF UIElements for objects of a certain type, for a specified context.

Namespace:  Microsoft.VisualStudio.Language.Intellisense
Assembly:  Microsoft.VisualStudio.Language.Intellisense (in Microsoft.VisualStudio.Language.Intellisense.dll)

Syntax

'宣告
Public Interface IUIElementProvider(Of TItem, TContext)
public interface IUIElementProvider<TItem, TContext>
generic<typename TItem, typename TContext>
public interface class IUIElementProvider
type IUIElementProvider<'TItem, 'TContext> =  interface end
JScript does not support generic types or methods.

Type Parameters

  • TItem
    The type of the item.
  • TContext
    The type of the context.

The IUIElementProvider<TItem, TContext> type exposes the following members.

Methods

  Name Description
Public method GetUIElement Gets a UIElement to display an item for the specified context.

Top

Remarks

This is a MEF component part, and should be exported with the NameAttribute, ContentTypeAttribute, and OrderAttribute attributes.

Examples

The following is an example of the use of these attributes

[Export(typeof(IIntellisensePresenterProvider))]
[Export(typeof(IUIElementProvider<CompletionSet, ICompletionSession>))]
[Name("Test Completion Presenter")]
[Order(After="Default Completion Presenter")]
[ContentType("code")]

See Also

Reference

Microsoft.VisualStudio.Language.Intellisense Namespace