Show / Hide Table of Contents

Struct FontWeight

Refers to the density of a typeface, in terms of the lightness or heaviness of the strokes.

Implements
System.IFormattable
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: System.Windows
Assembly: OpenSilver.dll
Syntax
public struct FontWeight : IFormattable

Methods

| Improve this Doc View Source

Compare(FontWeight, FontWeight)

Compares two font weight values and returns an indication of their relative values.

Declaration
public static int Compare(FontWeight left, FontWeight right)
Parameters
Type Name Description
FontWeight left

First object to compare.

FontWeight right

Second object to compare.

Returns
Type Description
System.Int32

A 32-bit signed integer indicating the lexical relationship between the two comparands. When the return value is less than zero this means that left is less than right. When the return value is zero this means that left is equal to right. When the return value is greater than zero this means that left is greater than right.

| Improve this Doc View Source

Equals(Object)

Determines whether the current FontWeight object is equal to a specified object.

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
System.Object obj

The object to compare for equality.

Returns
Type Description
System.Boolean

true if the values are equal; otherwise, false.

Overrides
System.ValueType.Equals(System.Object)
| Improve this Doc View Source

Equals(FontWeight)

Compares this FontWeight structure to another FontWeight structure for equality.

Declaration
public bool Equals(FontWeight fontWeight)
Parameters
Type Name Description
FontWeight fontWeight

An instance of FontWeight to compare for equality.

Returns
Type Description
System.Boolean

true if the two instances of FontWeight are equal; otherwise, false.

| Improve this Doc View Source

GetHashCode()

Retrieves the hash code for this object.

Declaration
public override int GetHashCode()
Returns
Type Description
System.Int32

An integer hash value.

Overrides
System.ValueType.GetHashCode()
| Improve this Doc View Source

ToString()

Returns a text string that represents the value of the FontWeight object.

Declaration
public override string ToString()
Returns
Type Description
System.String

A string that represents the value of the FontWeight object, such as "Light" or "Normal".

Overrides
System.ValueType.ToString()

Operators

| Improve this Doc View Source

Equality(FontWeight, FontWeight)

Compares two instances of FontWeight for equality.

Declaration
public static bool operator ==(FontWeight left, FontWeight right)
Parameters
Type Name Description
FontWeight left

The first instance of FontWeight to compare.

FontWeight right

The second instance of FontWeight to compare.

Returns
Type Description
System.Boolean

true if the values of FontWeight are equal; otherwise, false.

| Improve this Doc View Source

GreaterThan(FontWeight, FontWeight)

Declaration
public static bool operator>(FontWeight left, FontWeight right)
Parameters
Type Name Description
FontWeight left
FontWeight right
Returns
Type Description
System.Boolean
| Improve this Doc View Source

GreaterThanOrEqual(FontWeight, FontWeight)

Declaration
public static bool operator >=(FontWeight left, FontWeight right)
Parameters
Type Name Description
FontWeight left
FontWeight right
Returns
Type Description
System.Boolean
| Improve this Doc View Source

Inequality(FontWeight, FontWeight)

Evaluates two instances of FontWeight to determine inequality.

Declaration
public static bool operator !=(FontWeight left, FontWeight right)
Parameters
Type Name Description
FontWeight left

The first instance of FontWeight to compare.

FontWeight right

The second instance of FontWeight to compare.

Returns
Type Description
System.Boolean

false if values of left are equal to right; otherwise, true.

| Improve this Doc View Source

LessThan(FontWeight, FontWeight)

Declaration
public static bool operator <(FontWeight left, FontWeight right)
Parameters
Type Name Description
FontWeight left
FontWeight right
Returns
Type Description
System.Boolean
| Improve this Doc View Source

LessThanOrEqual(FontWeight, FontWeight)

Declaration
public static bool operator <=(FontWeight left, FontWeight right)
Parameters
Type Name Description
FontWeight left
FontWeight right
Returns
Type Description
System.Boolean

Explicit Interface Implementations

| Improve this Doc View Source

IFormattable.ToString(String, IFormatProvider)

Declaration
string IFormattable.ToString(string format, IFormatProvider formatProvider)
Parameters
Type Name Description
System.String format
System.IFormatProvider formatProvider
Returns
Type Description
System.String

Implements

System.IFormattable
  • Improve this Doc
  • View Source