Applications Windows
Réduire la table des matières
Développer la table des matières
Informations
Le sujet que vous avez demandé est indiqué ci-dessous. Toutefois, ce sujet ne figure pas dans la bibliothèque.

Control.FontFamily, propriété

Gets or sets the name 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)] 
[LocalizabilityAttribute(LocalizationCategory.Font)] 
public FontFamily FontFamily { get; set; }
/** @property */
public FontFamily get_FontFamily ()

/** @property */
public void set_FontFamily (FontFamily value)

public function get FontFamily () : FontFamily

public function set FontFamily (value : FontFamily)

<object>
  <object.FontFamily>
    <FontFamily .../>
  </object.FontFamily>
</object>
<object FontFamily="FontFamily" .../>

Valeur de la propriété

A font family. The default value is the system dialog font.

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

<Button Name="btn2" FontFamily="Arial" Click="ChangeFontFamily">FontFamily</Button>


ffamily = btn2.FontFamily;
str = ffamily.ToString();
if (str == ("Arial Black"))
{
    btn2.FontFamily = new FontFamily("Arial");
    btn2.Content = "FontFamily";
}
else
{
    btn2.FontFamily = new FontFamily("Arial Black");
    btn2.Content = "Control font family changes from Arial to Arial Black.";

}

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é

Afficher:
© 2016 Microsoft