New to Telerik UI for WinFormsStart a free 30-day trial

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

Definition

Namespace:Telerik.WinControls.UI.Diagrams

Assembly:Telerik.WinControls.RadDiagram.dll

Syntax:

C#
[TypeConverter(typeof(FontWeightConverter))]
public struct FontWeight : IFormattable

Implements: IFormattable

Methods

Compares two instances of FontWeight.

C#
public static int Compare(FontWeight left, FontWeight right)
Parameters:leftFontWeight

The first FontWeight object to compare.

rightFontWeight

The second FontWeight object to compare.

Returns:

int

An int value that indicates the relationship between the two instances of FontWeight. When the return value is less than zero, left is less than right. When this value is zero, it indicates that both operands are equal. When the value is greater than zero, it indicates that left is greater than right.

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

C#
public bool Equals(FontWeight obj)
Parameters:objFontWeight

The instance of FontWeight to compare for equality.

Returns:

bool

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

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

C#
public override bool Equals(object obj)
Parameters:objobject

The object to compare for equality.

Returns:

bool

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

Overrides: ValueType.Equals(object)

Creates a new instance of FontWeight that corresponds to the OpenType usWeightClass value.

C#
public static FontWeight FromOpenTypeWeight(int weightValue)
Parameters:weightValueint

An integer value between 1 and 999 that corresponds to the usWeightClass definition in the OpenType specification.

Returns:

FontWeight

A new instance of FontWeight.

Retrieves the hash code for this object.

C#
public override int GetHashCode()
Returns:

int

A 32-bit hash code, which is a signed integer.

Overrides: ValueType.GetHashCode()

Returns a value that represents the OpenType usWeightClass for the FontWeight object.

C#
public int ToOpenTypeWeight()
Returns:

int

An integer value between 1 and 999 that corresponds to the usWeightClass definition in the OpenType specification.

Returns a text string that represents the value of the FontWeight object and is based on the CurrentCulture property information.

C#
public override string ToString()
Returns:

string

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

Overrides: ValueType.ToString()

Operators

Evaluates two instances of FontWeight to determine inequality.

C#
public static bool operator !=(FontWeight left, FontWeight right)
Parameters:leftFontWeight

The first instance of FontWeight to compare.

rightFontWeight

The second instance of FontWeight to compare.

Returns:

bool

false if left is equal to right; otherwise, true.

Evaluates two instances of FontWeight to determine whether one instance is less than the other.

C#
public static bool operator <(FontWeight left, FontWeight right)
Parameters:leftFontWeight

The first instance of FontWeight to compare.

rightFontWeight

The second instance of FontWeight to compare.

Returns:

bool

true if left is less than right; otherwise, false.

Evaluates two instances of FontWeight to determine whether one instance is less than or equal to the other.

C#
public static bool operator <=(FontWeight left, FontWeight right)
Parameters:leftFontWeight

The first instance of FontWeight to compare.

rightFontWeight

The second instance of FontWeight to compare.

Returns:

bool

true if left is less than or equal to right; otherwise, false.

Compares two instances of FontWeight for equality.

C#
public static bool operator ==(FontWeight left, FontWeight right)
Parameters:leftFontWeight

The first instance of FontWeight to compare.

rightFontWeight

The second instance of FontWeight to compare.

Returns:

bool

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

Evaluates two instances of FontWeight to determine whether one instance is greater than the other.

C#
public static bool operator >(FontWeight left, FontWeight right)
Parameters:leftFontWeight

The first instance of FontWeight to compare.

rightFontWeight

The second instance of FontWeight to compare.

Returns:

bool

true if left is greater than right; otherwise, false.

Evaluates two instances of FontWeight to determine whether one instance is greater than or equal to the other.

C#
public static bool operator >=(FontWeight left, FontWeight right)
Parameters:leftFontWeight

The first instance of FontWeight to compare.

rightFontWeight

The second instance of FontWeight to compare.

Returns:

bool

true if left is greater than or equal to right; otherwise, false.