Expand Minimize
This topic has not yet been rated - Rate this topic

ShapeElement.CreateDecorators Method

Creates a collection of decorators for the shape type.

Namespace:  Microsoft.VisualStudio.Modeling.Diagrams
Assembly:  Microsoft.VisualStudio.Modeling.Sdk.Diagrams.11.0 (in Microsoft.VisualStudio.Modeling.Sdk.Diagrams.11.0.dll)
protected List<Decorator> CreateDecorators()

Return Value

Type: List<Decorator>
A collection of decorators for the shape type.

This method calls InitializeDecorators() after instantiating an empty decorator collection. Like shape fields, decorators are instantiated per-type, not per-instance.

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; 
}
}
Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.