Control.FontStretch Propriedade
Importante
Algumas informações se referem a produtos de pré-lançamento que podem ser substancialmente modificados antes do lançamento. A Microsoft não oferece garantias, expressas ou implícitas, das informações aqui fornecidas.
Obtém ou define o grau de quão condensada ou expandida a fonte está na tela.
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
Um valor FontStretch. O padrão é Normal.
- Atributos
O exemplo a seguir mostra como definir a propriedade de alongamento de fonte de um controle. Para obter valores de alongamento possíveis, 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
Essa propriedade afeta apenas um controle cujo modelo usa a FontStretch propriedade como parâmetro. Em outros controles, essa propriedade não tem impacto.
Campo Identificador | FontStretchProperty |
Propriedades de metadados definidas como true |
AffectsMeasure, AffectsRender, Inherits |
Produto | Versões |
---|---|
.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 |
Comentários do .NET
O .NET é um projeto código aberto. Selecione um link para fornecer comentários: