다음을 통해 공유


ShapeField.GetPen(DiagramClientView, ShapeElement, Color) Method

Definition

Gets the pen to draw with for the specified ShapeElement instance.

public:
 virtual System::Drawing::Pen ^ GetPen(Microsoft::VisualStudio::Modeling::Diagrams::DiagramClientView ^ view, Microsoft::VisualStudio::Modeling::Diagrams::ShapeElement ^ parentShape, System::Drawing::Color % oldColor);
public virtual System.Drawing.Pen GetPen (Microsoft.VisualStudio.Modeling.Diagrams.DiagramClientView view, Microsoft.VisualStudio.Modeling.Diagrams.ShapeElement parentShape, ref System.Drawing.Color oldColor);
abstract member GetPen : Microsoft.VisualStudio.Modeling.Diagrams.DiagramClientView * Microsoft.VisualStudio.Modeling.Diagrams.ShapeElement * Color -> System.Drawing.Pen
override this.GetPen : Microsoft.VisualStudio.Modeling.Diagrams.DiagramClientView * Microsoft.VisualStudio.Modeling.Diagrams.ShapeElement * Color -> System.Drawing.Pen
Public Overridable Function GetPen (view As DiagramClientView, parentShape As ShapeElement, ByRef oldColor As Color) As Pen

Parameters

view
DiagramClientView

Current view to check for highlighting list. This may be null.

parentShape
ShapeElement

The ShapeElement on which to draw.

oldColor
Color

Returns

Pen

The pen to draw with for the specified ShapeElement instance.

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.

Applies to