ShapeElement.InitializeResources Method
Initializes the resources for the shape.
Assembly: Microsoft.VisualStudio.Modeling.Sdk.Diagrams.10.0 (in Microsoft.VisualStudio.Modeling.Sdk.Diagrams.10.0.dll)
protected override void InitializeResources(DslDiagrams::StyleSet classStyleSet) { base.InitializeResources(classStyleSet); // Fill brush settings for this shape. DslDiagrams::BrushSettings backgroundBrush = new DslDiagrams::BrushSettings(); backgroundBrush.Color = global::System.Drawing.Color.FromKnownColor(global::System.Drawing.KnownColor.Blue); classStyleSet.OverrideBrush(DslDiagrams::DiagramBrushes.DiagramBackground, backgroundBrush); // Text brush settings for this shape. DslDiagrams::BrushSettings textBrush = new DslDiagrams::BrushSettings(); textBrush.Color = global::System.Drawing.Color.FromKnownColor(global::System.Drawing.KnownColor.Red); classStyleSet.OverrideBrush(DslDiagrams::DiagramBrushes.DiagramText, textBrush); }
- 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.