Version

Height Property (FormattedFontBase)

Gets or sets the height of the font.
Syntax
'Declaration
 
Public Property Height As Integer
public int Height {get; set;}

Property Value

The height of the font.
Exceptions
ExceptionDescription
System.ArgumentOutOfRangeException The value assigned is positive and outside the valid font height range of 20 and 8180.
System.InvalidOperationException The formatted string or text associated with the font is not assigned to a cell, comment, or shape.
System.InvalidOperationException The font's selection range is outside the valid character range of the associated formatted string or text.
Remarks

All characters in the selection range of this font will be affected by setting this property. Getting this property will return a value which indicates the formatting of the first character in this font's range.

Note: default values cannot be used in FormattedString values applied to cells. If this font belongs to a FormattedString which is the value of a cell, and a default value is assigned, it will be ignored.

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, 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

See Also