Control.FontStretch Propiedad
Importante
Parte de la información hace referencia a la versión preliminar del producto, que puede haberse modificado sustancialmente antes de lanzar la versión definitiva. Microsoft no otorga ninguna garantía, explícita o implícita, con respecto a la información proporcionada aquí.
Obtiene o establece el grado al que se condensa o expande la fuente en la pantalla.
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
Valor FontStretch. De manera predeterminada, es Normal.
- Atributos
En el ejemplo siguiente se muestra cómo establecer la propiedad stretch de fuente de un control . Para conocer los valores extendidos posibles, consulte 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
Esta propiedad solo afecta a un control cuya plantilla usa la FontStretch propiedad como parámetro. En otros controles, esta propiedad no tiene ningún impacto.
Campo identificador | FontStretchProperty |
Propiedades de metadatos establecidas en true |
AffectsMeasure, AffectsRender, Inherits |
Producto | Versiones |
---|---|
.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 |
Comentarios de .NET
.NET es un proyecto de código abierto. Seleccione un vínculo para proporcionar comentarios: