CharacterMetrics Constructor (String)
Collapse the table of content
Expand the table of content

CharacterMetrics Constructor (String)

Initializes a new instance of the CharacterMetrics class by specifying the metrics as a string.

Namespace:  System.Windows.Media
Assembly:  PresentationCore (in PresentationCore.dll)

public CharacterMetrics(
	string metrics
)

Parameters

metrics
Type: System.String
A comma-delimited String value that represents the metrics for the character.

The metrics parameter is a comma-delimited string that specifies the CharacterMetrics properties in the following order:

The first two properties, BlackBoxWidth and BlackBoxHeight, are required. However, the other five properties are optional, and will default to zero if not specified. For example, if you specify the string value of "0.75,0.75,,0.1" for the metrics parameter, the BlackBoxWidth, BlackBoxHeight, and LeftSideBearing properties are set—the unspecified properties are set to zero.

.NET Framework

Supported in: 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Community Additions

ADD
Show:
© 2016 Microsoft