TextField.GetFont Method
Gets the font to draw with for the specified ShapeElement instance.
Namespace: Microsoft.VisualStudio.Modeling.Diagrams
Assembly: Microsoft.VisualStudio.Modeling.Sdk.Diagrams.10.0 (in Microsoft.VisualStudio.Modeling.Sdk.Diagrams.10.0.dll)
Syntax
'Declaração
Public Overridable Function GetFont ( _
parentShape As ShapeElement _
) As Font
public virtual Font GetFont(
ShapeElement parentShape
)
public:
virtual Font^ GetFont(
ShapeElement^ parentShape
)
abstract GetFont :
parentShape:ShapeElement -> Font
override GetFont :
parentShape:ShapeElement -> Font
public function GetFont(
parentShape : ShapeElement
) : Font
Parameters
- parentShape
Type: Microsoft.VisualStudio.Modeling.Diagrams.ShapeElement
The ShapeElement on which to draw.
Return Value
Type: System.Drawing.Font
Remarks
The default method looks up the font ID in the style set of the parent shape:
public virtual Font GetFont(ShapeElement parentShape)
{
StyleSet parentStyleSet = (parentShape != null) ? parentShape.StyleSet : ApplicationStyleSet.StyleSet;
return parentStyleSet.GetFont(GetFontId(parentShape));
}
For more information and examples, see TextField
.NET Framework Security
- 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.