Export (0) Print
Expand All

FontUnit Constructor (String, CultureInfo)

Initializes a new instance of the FontUnit class with the specified string using the specified System.Globalization.CultureInfo object.

Namespace:  System.Web.UI.WebControls
Assembly:  System.Web (in System.Web.dll)

public FontUnit(
	string value,
	CultureInfo culture
)

Parameters

value
Type: System.String

A string to specify the font size.

culture
Type: System.Globalization.CultureInfo

A CultureInfo used to make string comparisons.

The FontUnit constructor recognizes the strings for value that are shown in the following table to create a new instance of the FontUnit class.

String value

FontUnit

xx-small, xxsmall

XXSmall

x-small, xsmall

XSmall

x-large, xlarge

XLarge

xx-large, xxlarge

XXLarge

small

Small

smaller

Smaller

large

Large

larger

Larger

medium

Medium

In all cases, the Type property has the value NotSet. The string comparison is case insensitive.

For all other values of value, a new instance of the FontUnit class is created by treating value as a font size and setting the Type property to Point.

.NET Framework

Supported in: 4.5, 4, 3.5, 3.0, 2.0, 1.1, 1.0

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

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

Show:
© 2014 Microsoft