This documentation is archived and is not being maintained.

FontFamily.FamilyTypefaces Property

Gets a collection of typefaces for the FontFamily object.

Namespace: System.Windows.Media
Assembly: PresentationCore (in presentationcore.dll)
XML Namespace:  http://schemas.microsoft.com/winfx/2006/xaml/presentation

public FamilyTypefaceCollection FamilyTypefaces { get; }
/** @property */
public FamilyTypefaceCollection get_FamilyTypefaces ()

public function get FamilyTypefaces () : FamilyTypefaceCollection

<object>
  <object.FamilyTypefaces>
    <OneOrMoreFontFamilyTypefaces/>
  </object.FamilyTypefaces>
</object>
 OneOrMoreFontFamilyTypefaces  One or more of typefaces for the FontFamily object. 

Property Value

A FamilyTypefaceCollection that represents a collection of typefaces for the FontFamily object.

// Return the font family for the selected font name.
FontFamily fontFamily = new FontFamily("Arial Narrow");

// Return the family typeface collection for the font family.
FamilyTypefaceCollection familyTypefaceCollection = fontFamily.FamilyTypefaces;

// Enumerate the family typefaces in the collection.
foreach (FamilyTypeface typeface in familyTypefaceCollection)
{
    // Add the typeface style values to the styles combo box.
    comboBoxStyles.Items.Add(typeface.Style);
}

comboBoxStyles.SelectedIndex = 0;

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0
Show: