FontUnit.FontUnit(String, CultureInfo) Constructor

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
)
public FontUnit (
	String value, 
	CultureInfo culture
)
public function FontUnit (
	value : String, 
	culture : CultureInfo
)
Not applicable.

Parameters

value

A string to specify the font size.

culture

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.

Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0

Community Additions

ADD
Show: