TextField.GetFontId Method
Gets the id of the font to draw with for the specified ShapeElement instance.
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 GetFontId ( _
parentShape As ShapeElement _
) As StyleSetResourceId
public virtual StyleSetResourceId GetFontId(
ShapeElement parentShape
)
public:
virtual StyleSetResourceId^ GetFontId(
ShapeElement^ parentShape
)
abstract GetFontId :
parentShape:ShapeElement -> StyleSetResourceId
override GetFontId :
parentShape:ShapeElement -> StyleSetResourceId
public function GetFontId(
parentShape : ShapeElement
) : StyleSetResourceId
Parameters
parentShape
Type: Microsoft.VisualStudio.Modeling.Diagrams.ShapeElementThe ShapeElement on which to draw.
Return Value
Type: Microsoft.VisualStudio.Modeling.Diagrams.StyleSetResourceId
Remarks
By default, this method returns the default font id of this ShapeField. To dynamically change the font for this ShapeField, override this method. Adapt the example at TextField.
The default value is DiagramFonts.ShapeText.
.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.