FlowDocument.FontSize Propriété
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Obtient ou définit la taille de police de niveau supérieur pour le FlowDocument.
public:
property double FontSize { double get(); void set(double value); };
[System.ComponentModel.TypeConverter(typeof(System.Windows.FontSizeConverter))]
[System.Windows.Localizability(System.Windows.LocalizationCategory.None)]
public double FontSize { get; set; }
[<System.ComponentModel.TypeConverter(typeof(System.Windows.FontSizeConverter))>]
[<System.Windows.Localizability(System.Windows.LocalizationCategory.None)>]
member this.FontSize : double with get, set
Public Property FontSize As Double
Valeur de propriété
Taille de police souhaitée à utiliser, en pixels indépendants de l’appareil). La valeur par défaut est déterminée par la MessageFontSize valeur.
- Attributs
Exemples
L’exemple suivant montre comment définir l’attribut FontSize d’un FlowDocument élément.
<FlowDocumentReader>
<FlowDocument
FontFamily="Century Gothic"
FontSize="12"
FontStretch="UltraExpanded"
FontStyle="Italic"
FontWeight="UltraBold"
>
<Paragraph>
Any font settings on this paragraph would override the font settings
for the FlowDocument.
</Paragraph>
</FlowDocument>
</FlowDocumentReader>
L’exemple suivant montre comment définir la FontSize propriété par programmation.
FlowDocument flowDoc = new FlowDocument(new Paragraph(new Run("A bit of text content...")));
// Set the desired column gap to 10 device independend pixels.
flowDoc.FontFamily = new FontFamily("Century Gothic");
flowDoc.FontSize = 12.0;
flowDoc.FontStretch = FontStretches.UltraExpanded;
flowDoc.FontStyle = FontStyles.Italic;
flowDoc.FontWeight = FontWeights.UltraBold;
Dim flowDoc As New FlowDocument(New Paragraph(New Run("A bit of text content...")))
' Set the desired column gap to 10 device independend pixels.
flowDoc.FontFamily = New FontFamily("Century Gothic")
flowDoc.FontSize = 12.0
flowDoc.FontStretch = FontStretches.UltraExpanded
flowDoc.FontStyle = FontStyles.Italic
flowDoc.FontWeight = FontWeights.UltraBold
Remarques
Tous les FontSize paramètres des éléments enfants remplacent ce paramètre de niveau supérieur.
Utilisation des attributs XAML
<object FontSize="double"/>
- or -
<object FontSize="qualifiedDouble"/>
Valeurs XAML
DoubleDouble
Représentation sous forme de chaîne d’une Double valeur égale ou supérieure à 0,0, mais inférieure à Double.PositiveInfinity. Une valeur non qualifiée est mesurée en pixels indépendants de l’appareil. Les chaînes n’ont pas besoin d’inclure explicitement les décimales.
qualifiedDouble Valeur double comme décrit ci-dessus, suivie de l’un des spécificateurs d’unités suivants : px, , incm, pt.
px (valeur par défaut) est des unités indépendantes de l’appareil (1/96e pouce par unité)
in est pouces ; 1in==96px
cm est en centimètres ; 1cm==(96/2.54) px
pt est des points ; 1pt==(96/72) px
Informations sur les propriétés de dépendance
| Élément | Valeur |
|---|---|
| Champ d’identificateur | FontSizeProperty |
Propriétés de métadonnées définies sur true |
AffectsMeasure, , AffectsRenderInherits |