Share via


ShapeField.GetPen Method

Gets the pen that draws the shape element to which the shape field is assigned.

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

Syntax

'Declaration
Public Overridable Function GetPen ( _
    view As DiagramClientView, _
    parentShape As ShapeElement, _
    ByRef oldColor As Color _
) As Pen
public virtual Pen GetPen(
    DiagramClientView view,
    ShapeElement parentShape,
    ref Color oldColor
)
public:
virtual Pen^ GetPen(
    DiagramClientView^ view, 
    ShapeElement^ parentShape, 
    Color% oldColor
)
abstract GetPen : 
        view:DiagramClientView * 
        parentShape:ShapeElement * 
        oldColor:Color byref -> Pen  
override GetPen : 
        view:DiagramClientView * 
        parentShape:ShapeElement * 
        oldColor:Color byref -> Pen
public function GetPen(
    view : DiagramClientView, 
    parentShape : ShapeElement, 
    oldColor : Color
) : Pen

Parameters

  • oldColor
    Type: Color%

    The color of the pen that is being used for the shape field.

Return Value

Type: Pen
The pen that draws the shape element to which the shape field is assigned.

Remarks

By default, this method returns the default pen of this ShapeField. To dynamically change the pen for this ShapeField, consider overriding GetPenId first. If that method is inadequate, override this method.

.NET Framework Security

See Also

Reference

ShapeField Class

Microsoft.VisualStudio.Modeling.Diagrams Namespace