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.12.0 (in Microsoft.VisualStudio.Modeling.Sdk.Diagrams.12.0.dll)
'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
parentShape
Type: Microsoft.VisualStudio.Modeling.Diagrams.ShapeElementThe ShapeElement on which to draw.
Type: Microsoft.VisualStudio.Modeling.Diagrams.StyleSetResourceId
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.
- 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.