다음을 통해 공유


Font Struct

Definition

The font used to display text.

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

Remarks

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

Properties

Default

Gets the default font for the device.

FontAttributes

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

FontFamily

Gets the font family to which this font belongs.

FontSize

Gets the size of the font.

IsDefault

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

NamedSize

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

UseNamedSize

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

Methods

BoldSystemFontOfSize(Double)
Obsolete.

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

BoldSystemFontOfSize(NamedSize)
Obsolete.

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

Equals(Object)

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

GetHashCode()

Get the Hashcode for this System.Object.

OfSize(String, Double)

Returns a Font structure with the requested font and size.

OfSize(String, NamedSize)

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

SystemFontOfSize(Double, FontAttributes)

Returns a font structure with the specified size and attributes.

SystemFontOfSize(Double)

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

SystemFontOfSize(NamedSize, FontAttributes)

Returns a font structure with the specified size and attributes.

SystemFontOfSize(NamedSize)

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

ToString()

Returns a string representation of this font structure.

WithAttributes(FontAttributes)

Returns a new font structure with the specified attributes.

WithSize(Double)

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

WithSize(NamedSize)

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

Operators

Equality(Font, Font)

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

Inequality(Font, Font)

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

Applies to