Struct FontWeight
Refers to the density of a typeface, in terms of the lightness or heaviness of the strokes.
Implements
Inherited Members
Namespace: System.Windows
Assembly: OpenSilver.dll
Syntax
public struct FontWeight : IFormattable
Methods
| Improve this Doc View SourceCompare(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. |
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
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. |
GetHashCode()
Retrieves the hash code for this object.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 | An integer hash value. |
Overrides
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
Operators
| Improve this Doc View SourceEquality(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. |
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 |
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 |
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. |
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 |
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 SourceIFormattable.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 |