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
'Declaration
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
- 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.