FontSize
FontSize structure
Represents a font size as a special unit or a length value, which specifies the size of the font (historically the width of the capital “M”).
public struct FontSize : IEquatable<FontSize>
Properties
Name |
Description |
IsAbsoluteSize { get; } |
Indicates whether this font-size is defined with an absolute size as a keyword, based on the user’s default font size (which is medium) |
IsInitial { get; } |
Indicates whether this font-size has an initial value (Medium) |
IsLengthDefined { get; } |
Indicates whether this font-size is defined with a Length value |
IsRelativeSize { get; } |
Indicates whether this font-size is defined with an relative size as a keyword. The font will be larger or smaller relative to the parent element’s font size, roughly by the ratio used to separate the absolute-size keywords. |
Length { get; } |
A length value, if this font-size was defined with it, or throwed exception otherwise |
Value { get; } |
Returns a value of this font size as a string |
Methods
Name |
Description |
static FromLength(Length) |
Creates a font-size from specified length |
Equals(FontSize) |
Determines whether this font-size instance is equal to specified |
override Equals(object) |
Determines whether this font-size instance is equal to specified uncasted |
override GetHashCode() |
Returns a hash-code for this instance |
static TryParse(string, out FontSize) |
Tries to recognize a specified keyword as a proper keyword value of the ‘font-size’ and return it on success or NULL on failure. |
operator == |
Checks whether two “FontSize” values are equal |
operator != |
Checks whether two “FontSize” values are not equal |
Fields
Name |
Description |
static readonly Large |
The normally large absolute-size |
static readonly Larger |
Larger relative-size - font will be larger relative to the parent element’s font-size, roughly by the ratio used to separate the absolute-size keywords above. |
static readonly Medium |
Medium size. Initial value. |
static readonly Small |
The normally small absolute-size |
static readonly Smaller |
Smaller relative-size - font will be smaller relative to the parent element’s font-size, roughly by the ratio used to separate the absolute-size keywords above. |
static readonly XLarge |
The mediocre large absolute-size |
static readonly XSmall |
The mediocre small absolute-size |
static readonly XxLarge |
The very large absolute-size |
static readonly XxSmall |
The very small absolute-size |
See Also