Exporter (0) Imprimer
Développer tout

Control.FontWeight, propriété

Gets or sets the weight or thickness of the specified font.

Espace de noms: System.Windows.Controls
Assembly : PresentationFramework (dans presentationframework.dll)
Espace de noms XML :  http://schemas.microsoft.com/winfx/2006/xaml/presentation

[BindableAttribute(true)] 
public FontWeight FontWeight { get; set; }
/** @property */
public FontWeight get_FontWeight ()

/** @property */
public void set_FontWeight (FontWeight value)

public function get FontWeight () : FontWeight

public function set FontWeight (value : FontWeight)

<object FontWeight="FontWeight" .../>

Valeur de la propriété

A FontWeights enumeration value. The default value is Normal.

The following example shows how to set the FontWeight property of a control.

<Button Name="btn5" FontWeight="Normal" Click="ChangeFontWeight">FontWeight</Button>

if (btn5.FontWeight == FontWeights.Bold)
{
    btn5.FontWeight = FontWeights.Normal;
    btn5.Content = "FontWeight";
}
else
{
    btn5.FontWeight = FontWeights.Bold;
    btn5.Content = "Control font weight changes from Normal to Bold.";
}

Microsoft .NET Framework 3.0 est pris en charge sur Windows Vista, Microsoft Windows XP SP2 et Windows Server 2003 SP1.

.NET Framework

Prise en charge dans : 3.0

Ajouts de la communauté

AJOUTER
Afficher:
© 2014 Microsoft