Name Property
Collapse the table of content
Expand the table of content

FontInfo::Name Property

 

Gets or sets the primary font name.

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

public:
[TypeConverterAttribute((FontConverter::FontNameConverter^::typeid))]
property String^ Name {
	String^ get();
	void set(String^ value);
}

Property Value

Type: System::String^

The primary font name. The default value is String::Empty, which indicates that this property is not set.

Exception Condition
ArgumentNullException

The specified font name is null.

Use the Name property to specify or determine the primary font name. The primary font name determines the font that is used to display text in the control associated with the FontInfo.

System_CAPS_noteNote

When you set the Names property, the Name property is automatically updated with the first item in the Names property. If you set the Name property, the Names property is automatically updated with a single element array containing the value of the Name property.

The following example demonstrates how to use the Name property to programmatically specify the font name for a Label control.

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

.NET Framework
Available since 1.1
Return to top
Show:
© 2016 Microsoft