Freigeben über


ShapeElement.CreateDecorators-Methode

Erstellt eine Sammlung von Decorator-Elementen für den Typ der Form.

Namespace:  Microsoft.VisualStudio.Modeling.Diagrams
Assembly:  Microsoft.VisualStudio.Modeling.Sdk.Diagrams.12.0 (in Microsoft.VisualStudio.Modeling.Sdk.Diagrams.12.0.dll)

Syntax

'Declaration
Protected Function CreateDecorators As List(Of Decorator)
protected List<Decorator> CreateDecorators()

Rückgabewert

Typ: System.Collections.Generic.List<Decorator>
Eine Sammlung von Decorator-Elementen für den Typ der Form.

Hinweise

Diese Methode ruft InitializeDecorators(), nachdem eine leere Decorator-Element-Auflistung instanziiert wurde. Wie sind Formfelder Decorator-Elemente instanziierter ProTyp, nicht pro Instanz.

Beispiele

public override global::System.Collections.Generic.IList<DslDiagrams::Decorator> Decorators
{
get 
{
if(decorators == null)
{
decorators = CreateDecorators();

// fire this event to allow the diagram to initialize decorator mappings for this shape type.
if(DecoratorsInitialized != null)
{
DecoratorsInitialized(this, global::System.EventArgs.Empty);
}
}

return decorators; 
}
}

.NET Framework-Sicherheit

Siehe auch

Referenz

ShapeElement Klasse

Microsoft.VisualStudio.Modeling.Diagrams-Namespace