Condividi tramite


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.10.0 (in Microsoft.VisualStudio.Modeling.Sdk.Diagrams.10.0.dll)

Syntax

'Dichiarazione
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

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

See Also

Reference

TextField Class

Microsoft.VisualStudio.Modeling.Diagrams Namespace