System.Web.UI.WebControls.FontInfo.CopyFrom Method

Duplicates the font properties of the specified System.Web.UI.WebControls.FontInfo into the instance of the System.Web.UI.WebControls.FontInfo class that this method is called from.

Syntax

public void CopyFrom (FontInfo f)

Parameters

f
A System.Web.UI.WebControls.FontInfo that contains the font properties to duplicate.

Remarks

Use the FontInfo.CopyFrom(FontInfo) method to duplicate the font properties of the specified System.Web.UI.WebControls.FontInfo into the instance of the System.Web.UI.WebControls.FontInfo class that this method is called from.

Note:

All properties in the current instance of the System.Web.UI.WebControls.FontInfo class will be replaced by the associated property in the f parameter.

When a style is registered using System.Web.UI.IStyleSheet.RegisterStyle(Style, System.Web.UI.IUrlResolutionService), and then copied using Style.CopyFrom(Style), only the Style.CssClass property is copied to the destination, not all the individual properties. Therefore, if you are using FontInfo.CopyFrom(FontInfo) to copy font information from the Style.Font property of a System.Web.UI.WebControls.Style that is registered, you will not get the individual settings of the font from the style.

Requirements

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0