Control.FontStretch Vlastnost

Definice

Získá nebo nastaví stupeň, do kterého je písmo zhuštěno nebo rozbalené na obrazovce.

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

Hodnota vlastnosti

FontStretch

Hodnota FontStretch . Výchozí formát je Normal.

Atributy

Příklady

Následující příklad ukazuje, jak nastavit vlastnost roztažení písma ovládacího prvku. Možné roztažené hodnoty naleznete v tématu 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

Poznámky

Tato vlastnost má vliv pouze na ovládací prvek, jehož šablona používá FontStretch vlastnost jako parametr. U jiných ovládacích prvků tato vlastnost nemá žádný vliv.

Informace o vlastnosti závislosti

Pole identifikátoru FontStretchProperty
Vlastnosti metadat nastavené na true AffectsMeasure, AffectsRender, Inherits

Platí pro