FontWeight Struktur
Definition
Verweist auf die Dichte einer Schriftart, d. h. darauf, wie fein oder breit die Striche sind.Refers to the density of a typeface, in terms of the lightness or heaviness of the strokes.
public value class FontWeight : IFormattable
[System.ComponentModel.TypeConverter(typeof(System.Windows.FontWeightConverter))]
[System.Windows.Localizability(System.Windows.LocalizationCategory.None)]
public struct FontWeight : IFormattable
type FontWeight = struct
interface IFormattable
Public Structure FontWeight
Implements IFormattable
- Vererbung
- Attribute
- Implementiert
Beispiele
Im folgenden Codebeispiel FontWeight wird auf "UltraBold" festgelegt.In the following code example, the FontWeight is set to "UltraBold".
<TextBlock FontWeight="UltraBold" FontFamily="Gil Sans MT">Hello, world</TextBlock>
Hinweise
Gewichtungs Unterschiede unterscheiden sich in der Regel durch einen vergrößerter Strich oder eine Dicke, der einem gegebenen Zeichen in einer Schriftart zugeordnet ist, im Vergleich zu einem "normalen" Zeichen aus derselben Schriftart.Weight differences are generally differentiated by an increased stroke or thickness that is associated with a given character in a typeface, as compared to a "normal" character from that same typeface.
Hinweis Nicht alle Gewichtungen sind für alle typegesichter verfügbar.Note Not all weights are available for all typefaces. Wenn für eine Schriftart keine Gewichtung verfügbar ist, wird die nächste übereinstimmende Gewichtung zurückgegeben.When a weight is not available for a typeface, the closest matching weight is returned.
Verwendung von XAML-AttributenXAML Attribute Usage
<object fontWeightProperty="fontWeightsValue"/>
XAML-WerteXAML Values
fontWeightsValuefontWeightsValue
Ein FontWeights Eigenschaftsname, z. b. "Light", "Normal" oder "UltraBold".A FontWeights property name, such as "Light", "Normal", or "UltraBold".
Methoden
Compare(FontWeight, FontWeight) |
Vergleicht zwei Instanzen von FontWeight.Compares two instances of FontWeight. |
Equals(FontWeight) |
Bestimmt, ob das aktuelle FontWeight-Objekt einem angegebenen FontWeight-Objekt entspricht.Determines whether the current FontWeight object is equal to a specified FontWeight object. |
Equals(Object) |
Bestimmt, ob das aktuelle FontWeight-Objekt einem angegebenen Objekt entspricht.Determines whether the current FontWeight object is equal to a specified object. |
FromOpenTypeWeight(Int32) |
Erstellt eine neue Instanz von FontWeight, die dem OpenTypeOpenType |
GetHashCode() |
Ruft den Hashcode für dieses Objekt ab.Retrieves the hash code for this object. |
ToOpenTypeWeight() |
Gibt einen Wert zurück, der die OpenTypeOpenType |
ToString() |
Gibt eine Textzeichenfolge zurück, die den Wert des FontWeight-Objekts darstellt und auf den CurrentCulture-Eigenschafteninformationen basiert.Returns a text string that represents the value of the FontWeight object and is based on the CurrentCulture property information. |
Operatoren
Equality(FontWeight, FontWeight) |
Prüft zwei Instanzen von FontWeight auf Gleichheit.Compares two instances of FontWeight for equality. |
GreaterThan(FontWeight, FontWeight) |
Wertet zwei Instanzen von FontWeight aus, um zu bestimmen, ob eine Instanz größer als die andere ist.Evaluates two instances of FontWeight to determine whether one instance is greater than the other. |
GreaterThanOrEqual(FontWeight, FontWeight) |
Wertet zwei Instanzen von FontWeight aus, um zu bestimmen, ob eine Instanz größer oder gleich der anderen ist.Evaluates two instances of FontWeight to determine whether one instance is greater than or equal to the other. |
Inequality(FontWeight, FontWeight) |
Wertet zwei Instanzen von FontWeight aus, um zu bestimmen, ob sie ungleich sind.Evaluates two instances of FontWeight to determine inequality. |
LessThan(FontWeight, FontWeight) |
Wertet zwei Instanzen von FontWeight aus, um zu bestimmen, ob eine Instanz kleiner als die andere ist.Evaluates two instances of FontWeight to determine whether one instance is less than the other. |
LessThanOrEqual(FontWeight, FontWeight) |
Wertet zwei Instanzen von FontWeight aus, um zu bestimmen, ob eine Instanz kleiner oder gleich der anderen ist.Evaluates two instances of FontWeight to determine whether one instance is less than or equal to the other. |
Explizite Schnittstellenimplementierungen
IFormattable.ToString(String, IFormatProvider) |
Eine Beschreibung dieses Elements finden Sie unter ToString(String, IFormatProvider).For a description of this member, see ToString(String, IFormatProvider). |