Kommentar
Åtkomst till den här sidan kräver auktorisering. Du kan prova att logga in eller ändra kataloger.
Åtkomst till den här sidan kräver auktorisering. Du kan prova att ändra kataloger.
Gets 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 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.ShapeElementThe ShapeElement on which to draw.
Return Value
Type: 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.