ShapeElement.CreateDecorators Method
Creates a collection of decorators for the shape type.
Namespace: Microsoft.VisualStudio.Modeling.Diagrams
Assembly: Microsoft.VisualStudio.Modeling.Sdk.Diagrams.10.0 (in Microsoft.VisualStudio.Modeling.Sdk.Diagrams.10.0.dll)
Syntax
‘선언
Protected Function CreateDecorators As List(Of Decorator)
protected List<Decorator> CreateDecorators()
protected:
List<Decorator^>^ CreateDecorators()
member CreateDecorators : unit -> List<Decorator>
protected function CreateDecorators() : List<Decorator>
Return Value
Type: System.Collections.Generic.List<Decorator>
A collection of decorators for the shape type.
Remarks
This method calls InitializeDecorators() after instantiating an empty decorator collection. Like shape fields, decorators are instantiated per-type, not per-instance.
Examples
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 Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.