EN
Ce contenu n’est pas disponible dans votre langue. Voici la version anglaise.
Ce sujet n'a pas encore été évalué - Évaluez ce sujet

TextBlock.FontWeight Property

April 12, 2014

Gets or sets the top-level font weight for the TextBlock.

Namespace:  System.Windows.Controls
Assembly:  System.Windows (in System.Windows.dll)
XMLNS for XAML: Not mapped to an xmlns.
public FontWeight FontWeight { get; set; }
<TextBlock FontWeight="fontWeightsValue"/>

XAML Values

fontWeightsValue

A FontWeights property name, such as Light, Normal, or UltraBold.

Property Value

Type: System.Windows.FontWeight
The requested font weight, which is a FontWeight that is obtained from one of the FontWeights property values. The default is Normal.

Dependency property identifier field: FontWeightProperty

This property can select only from fonts that exist in a font family. It does not programmatically create alternative weights, with one exception: if a font family contains a regular weight and no bold weight, and you specify a bold weight. In this case, Windows Phone will simulate a bold weight by increasing the width of strokes by using a 2D graphic algorithm. Font fallback behavior does not change the property value, the property will remain as the value you set it to despite whatever visual behavior results due to font fallback.

The FontWeights values correspond to the usWeightClass definition in the OpenType specification. The usWeightClass represents an integer value between 1 and 999. Lower values indicate lighter weights, and higher values indicate heavier weights.

FontWeight settings for Run child elements override the settings on the containing TextBlock.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Cela vous a-t-il été utile ?
(1500 caractères restants)
Merci pour vos suggestions.
Afficher:
© 2014 Microsoft. Tous droits réservés.