Control.FontStretch Propriété
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 le degré auquel une police est condensée ou étendue à l’écran.
public:
property System::Windows::FontStretch FontStretch { System::Windows::FontStretch get(); void set(System::Windows::FontStretch value); };
[System.ComponentModel.Bindable(true)]
public System.Windows.FontStretch FontStretch { get; set; }
[<System.ComponentModel.Bindable(true)>]
member this.FontStretch : System.Windows.FontStretch with get, set
Public Property FontStretch As FontStretch
Valeur FontStretch. La valeur par défaut est Normal.
- Attributs
L’exemple suivant montre comment définir la propriété stretch de police d’un contrôle. Pour connaître les valeurs d’étirement possibles, consultez FontStretches.
<Button Name="btn10" FontStretch ="Condensed"
Click="ChangeFontStretch" TabIndex="3">
FontStretch
</Button>
void ChangeFontStretch(object sender, RoutedEventArgs e)
{
if (btn10.FontStretch == FontStretches.Condensed)
{
btn10.FontStretch = FontStretches.Normal;
btn10.Content = "Control FontStretch changes from Condensed to Normal.";
}
else
{
btn10.FontStretch = FontStretches.Condensed;
btn10.Content = "FontStretch";
}
}
Private Sub ChangeFontStretch(ByVal Sender As Object, ByVal e As RoutedEventArgs)
If (btn10.FontStretch = FontStretches.Condensed) Then
btn10.FontStretch = FontStretches.Normal
btn10.Content = "Control FontStretch changes from Condensed to Normal."
Else
btn10.Content = "FontStretch"
btn10.FontStretch = FontStretches.Condensed
End If
End Sub
Cette propriété affecte uniquement un contrôle dont le modèle utilise la FontStretch propriété comme paramètre. Sur d’autres contrôles, cette propriété n’a aucun impact.
Champ Identificateur | FontStretchProperty |
Propriétés de métadonnées définies sur true |
AffectsMeasure, AffectsRender, Inherits |
Produit | Versions |
---|---|
.NET Framework | 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
Windows Desktop | 3.0, 3.1, 5, 6, 7, 8, 9 |
Commentaires sur .NET
.NET est un projet open source. Sélectionnez un lien pour fournir des commentaires: