FormattedText.SetFontSize Method (Double, Int32, Int32)


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

Sets the font size for a specified subset of characters in the FormattedText object.

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

member SetFontSize : 
        emSize:float *
        startIndex:int *
        count:int -> unit


Type: System.Double

The font 'em' measure size, provided in device-independent units (1/96th inch per unit).

Type: System.Int32

The start index of the initial character to apply the font size to.

Type: System.Int32

The number of characters to apply the font size to.

To set the font size value for the entire text string, use the SetFontSize method.

The following example creates a FormattedText object and then applies several formatting styles to the text, including SetFontSize.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 3.0
Return to top