TextField.GetFont(ShapeElement) 方法

定义

获取用于指定的 ShapeElement 实例的要绘制的字体。

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

参数

parentShape
ShapeElement

要在其上绘制的 ShapeElement。

返回

Font

要用于指定的 ShapeElement 实例的字体。

注解

默认情况下,此方法返回此 ShapeField 的默认字体。

若要为此 ShapeField 动态更改笔,请考虑首先重写 GetFontId。 如果该方法不充分,请重写此方法。

适用于