Font Font Struct

Definition

The font used to display text.

[Xamarin.Forms.TypeConverter(typeof(Xamarin.Forms.FontTypeConverter))]
public struct Font
type Font = struct
Inheritance
Attributes

Remarks

The available fonts, and the matching between Font and real displayed fonts is device-dependent.

Properties

Default Default

Gets the default font for the device.

FontAttributes FontAttributes

Gets a value that indicates whether the font is bold, italic, or neither.

FontFamily FontFamily

Gets the font family to which this font belongs.

FontSize FontSize

Gets the size of the font.

IsDefault IsDefault

Gets a value that tells whether this font has no attributes, belongs to the default family, and has no attributes set.

NamedSize NamedSize

Gets the named font size, such as "Large" or "Small".

UseNamedSize UseNamedSize

Gets a value that indicates whether the target operating system should use size that is specified by the NamedSize property.

Methods

BoldSystemFontOfSize(Double) BoldSystemFontOfSize(Double)

Returns a font instance that represents the default bold font, in the requested size, for the device.

BoldSystemFontOfSize(NamedSize) BoldSystemFontOfSize(NamedSize)

Returns an usable font instance representing the default bold font, in the requested NamedSize, for the device.

Equals(Object) Equals(Object)

Determine if the provided Object is equivalent to the current Font.

GetHashCode() GetHashCode()

Get the Hashcode for this Object.

OfSize(String, NamedSize) OfSize(String, NamedSize)

Returns an usable Font, with the requested font and NamedSize.

OfSize(String, Double) OfSize(String, Double)

Returns a Font structure with the requested font and size.

SystemFontOfSize(Double) SystemFontOfSize(Double)

Returns an usable font instance representing the default font, in the requested size, for the device and platform.

SystemFontOfSize(NamedSize) SystemFontOfSize(NamedSize)

Returns an usable font instance representing the default font, in the requested size, for the device and platform.

SystemFontOfSize(Double, FontAttributes) SystemFontOfSize(Double, FontAttributes)

Returns a font structure with the specified size and attributes.

SystemFontOfSize(NamedSize, FontAttributes) SystemFontOfSize(NamedSize, FontAttributes)

Returns a font structure with the specified size and attributes.

ToString() ToString()

Returns a string representation of this font structure.

WithAttributes(FontAttributes) WithAttributes(FontAttributes)

Returns a new font structure with the specified attributes.

WithSize(Double) WithSize(Double)

Returns a new font structure with the size that was specified with size.

WithSize(NamedSize) WithSize(NamedSize)

A new Font structure with the size that was specified with size.

Operators

Equality(Font, Font) Equality(Font, Font)

Returns true if left represents the same font that right represents. Otherwise, false.

Inequality(Font, Font) Inequality(Font, Font)

Returns true if left does not represent the same font that right represents. Otherwise, false.

Applies to