FontUnit Structure
Represents the size of a font.
Assembly: System.Web (in System.Web.dll)
The FontUnit type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | FontUnit(Double) | Initializes a new instance of the FontUnit class with the specified font size in points. |
![]() | FontUnit(FontSize) | Initializes a new instance of the FontUnit class with the specified FontSize. |
![]() | FontUnit(Int32) | Initializes a new instance of the FontUnit class with the specified font size. |
![]() | FontUnit(String) | Initializes a new instance of the FontUnit class with the specified string. |
![]() | FontUnit(Unit) | Initializes a new instance of the FontUnit class with the specified Unit. |
![]() | FontUnit(Double, UnitType) | Initializes a new instance of the FontUnit class with the specified font size and UnitType value. |
![]() | FontUnit(String, CultureInfo) | Initializes a new instance of the FontUnit class with the specified string using the specified System.Globalization::CultureInfo object. |
| Name | Description | |
|---|---|---|
![]() | Equals | Determines whether the specified System::Object is equivalent to the instance of the FontUnit class that this method is called from. (Overrides ValueType::Equals(Object).) |
![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
![]() | GetHashCode | Returns the hash code for this instance. (Overrides ValueType::GetHashCode().) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() ![]() | Parse(String) | Converts the specified string to its FontUnit equivalent. |
![]() ![]() | Parse(String, CultureInfo) | Converts the specified string to its FontUnit equivalent in the specified culture. |
![]() ![]() | Point | Creates a FontUnit of type System.Drawing::Point from an integer value. |
![]() | ToString() | Converts the FontUnit object to the default string representation. (Overrides ValueType::ToString().) |
![]() | ToString(CultureInfo) | Converts the FontUnit object to a string representation, using the specified System.Globalization::CultureInfo. |
![]() | ToString(IFormatProvider) | Converts a FontUnit object to a string equivalent using the specified format provider. |
| Name | Description | |
|---|---|---|
![]() ![]() | Equality | Compares two FontUnit objects for equality. |
![]() ![]() | Implicit(Int32 to FontUnit) | Implicitly creates a FontUnit of type System.Drawing::Point from an integer value. |
![]() ![]() | Inequality | Compares two FontUnit objects for inequality. |
| Name | Description | |
|---|---|---|
![]() ![]() | Empty | Represents an empty FontUnit object. |
![]() ![]() | Large | Represents a FontUnit object with the Type property set to FontSize.Large. |
![]() ![]() | Larger | Represents a FontUnit object with the Type property set to FontSize.Larger. |
![]() ![]() | Medium | Represents a FontUnit object with the Type property set to FontSize.Medium. |
![]() ![]() | Small | Represents a FontUnit object with the Type property set to FontSize.Small. |
![]() ![]() | Smaller | Represents a FontUnit object with the Type property set to FontSize.Smaller. |
![]() ![]() | XLarge | Represents a FontUnit object with the Type property set to FontSize.XLarge. |
![]() ![]() | XSmall | Represents a FontUnit object with the Type property set to FontSize.XSmall. |
![]() ![]() | XXLarge | Represents a FontUnit object with the Type property set to FontSize.XXLarge. |
![]() ![]() | XXSmall | Represents a FontUnit object with the Type property set to FontSize.XXSmall. |
For a list of initial property values for an instance of FontUnit, see the FontUnit constructor.
The following code example demonstrates how to use a Style object to change the style properties for multiple controls at one time. Each time one of the Style property values changes, each control must call its ApplyStyle method. Not all the controls included in this example support all the properties that are demonstrated. If a control does not support a particular property, the appearance of the control will not change when the property value is changed.
Security Note |
|---|
This example has a text box that accepts user input, which is a potential security threat. By default, ASP.NET Web pages validate that user input does not include script or HTML elements. For more information, see Script Exploits Overview. |
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.






Security Note