Compartilhar via


TextField.GetFont(ShapeElement) Method

Definition

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

public:
 virtual System::Drawing::Font ^ GetFont(Microsoft::VisualStudio::Modeling::Diagrams::ShapeElement ^ parentShape);
public virtual System.Drawing.Font GetFont (Microsoft.VisualStudio.Modeling.Diagrams.ShapeElement parentShape);
abstract member GetFont : Microsoft.VisualStudio.Modeling.Diagrams.ShapeElement -> System.Drawing.Font
override this.GetFont : Microsoft.VisualStudio.Modeling.Diagrams.ShapeElement -> System.Drawing.Font
Public Overridable Function GetFont (parentShape As ShapeElement) As Font

Parameters

parentShape
ShapeElement

The ShapeElement on which to draw.

Returns

The font to draw with for the specified ShapeElement instance.

Remarks

By default, this method returns the default font of this ShapeField.

To dynamically change the pen for this ShapeField, consider overriding GetFontId first. If that method is inadequate, override this method.

Applies to