ProfileStereotypeExtensions.ApplyStereotype Method

Applies the stereotype to element. Creates an IStereotypeInstance that represents the extension of the model element by the stereotype.

Namespace:  Microsoft.VisualStudio.ArchitectureTools.Extensibility.Uml
Assembly:  Microsoft.VisualStudio.ArchitectureTools.Extensibility (in Microsoft.VisualStudio.ArchitectureTools.Extensibility.dll)


<ExtensionAttribute> _
Public Shared Function ApplyStereotype ( _
    element As IElement, _
    stereotype As IStereotype _
) As IStereotypeInstance
public static IStereotypeInstance ApplyStereotype(
    this IElement element,
    IStereotype stereotype
static IStereotypeInstance^ ApplyStereotype(
    IElement^ element, 
    IStereotype^ stereotype
static member ApplyStereotype : 
        element:IElement * 
        stereotype:IStereotype -> IStereotypeInstance
public static function ApplyStereotype(
    element : IElement, 
    stereotype : IStereotype
) : IStereotypeInstance


Return Value

Type: Microsoft.VisualStudio.Uml.Classes.IStereotypeInstance
An IStereotypeInstance represents the link between a stereotype and an element.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IElement. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

.NET Framework Security

See Also


ProfileStereotypeExtensions Class

Microsoft.VisualStudio.ArchitectureTools.Extensibility.Uml Namespace