Control.FontStretch Proprietà

Definizione

Recupera o imposta il livello di riduzione o espansione di un tipo di carattere sullo schermo.

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

Valore della proprietà

Valore FontStretch. Il valore predefinito è Normal.

Attributi

Esempio

Nell'esempio seguente viene illustrato come impostare la proprietà di estensione del tipo di carattere di un controllo . Per i possibili valori di estensione, vedere 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

Commenti

Questa proprietà influisce solo su un controllo il cui modello utilizza la FontStretch proprietà come parametro. In altri controlli questa proprietà non ha alcun impatto.

Informazioni proprietà di dipendenza

Campo Identificatore FontStretchProperty
Proprietà dei metadati impostate su true AffectsMeasure, AffectsRender, Inherits

Si applica a