Windows Dev Center

Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

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.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft