Questa documentazione è stata archiviata e non viene gestita.

Proprietà Control.FontWeight

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

Spazio dei nomi: System.Windows.Controls
Assembly: PresentationFramework (in presentationframework.dll)
Spazio dei nomi XML:

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" .../>

Valore proprietà

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";
    btn5.FontWeight = FontWeights.Bold;
    btn5.Content = "Control font weight changes from Normal to Bold.";

Microsoft .NET Framework 3.0 è supportato in Windows Vista, Microsoft Windows XP SP2 e Windows Server 2003 SP1.

.NET Framework

Supportato in: