Windows apps
Collapse the table of content
Expand the table of content
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)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

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
Available since 3.0
Return to top
Show:
© 2018 Microsoft