ShapeElement.InitializeInstanceResources Method

Initializes the resources for an instance of the shape.

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

Syntax

'Declaration
Protected Overridable Sub InitializeInstanceResources
'Usage
Me.InitializeInstanceResources()
protected virtual void InitializeInstanceResources()
protected:
virtual void InitializeInstanceResources()
protected function InitializeInstanceResources()

Remarks

This method is called after the style set has been initialized for the shape instance.

You can override this method to initialize other resources for the shape instance. To override the method in your custom code, you must set the Generates Double Derived property on your shape class in DSL Definition, and then click Transform All Templates in Solution Explorer.

Always call the base method.

Examples

protected override void InitializeInstanceResources()
{
    base.InitializeInstanceResources();
    SetArrowDecorator();
    
}

.NET Framework Security

See Also

Reference

ShapeElement Class

ShapeElement Members

Microsoft.VisualStudio.Modeling.Diagrams Namespace