Compartilhar via


ShapeElement.InitializeInstanceResources Method

Initializes the resources for an instance of the shape.

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

Syntax

'Declaração
Protected Overridable Sub InitializeInstanceResources
protected virtual void InitializeInstanceResources()
protected:
virtual void InitializeInstanceResources()
abstract InitializeInstanceResources : unit -> unit 
override InitializeInstanceResources : unit -> unit 
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

Microsoft.VisualStudio.Modeling.Diagrams Namespace