This documentation is archived and is not being maintained.

Fonts.SystemFontFamilies Property

Gets the collection of FontFamily objects from the default system font location.

Namespace: System.Windows.Media
Assembly: PresentationCore (in presentationcore.dll)
XML Namespace:

public static ICollection<FontFamily> SystemFontFamilies { get; }
/** @property */
public static ICollection<FontFamily> get_SystemFontFamilies ()

public static function get SystemFontFamilies () : ICollection<FontFamily>

You cannot use this property in XAML.

Property Value

An ICollection of FontFamily objects that represent the fonts in the system fonts collection.

The following example shows how to enumerate the fonts in the system font collection. The font family name of each FontFamily within SystemFontFamilies is added as an item to a combo box.

public void FillFontComboBox(ComboBox comboBoxFonts)
    // Enumerate the current set of system fonts,
    // and fill the combo box with the names of the fonts.
    foreach (FontFamily fontFamily in Fonts.SystemFontFamilies)
        // FontFamily.Source contains the font family name.

    comboBoxFonts.SelectedIndex = 0;

If multiple versions of the same font family reside in the same directory, the Windows Presentation Foundation (WPF) font enumeration returns the most recent version of the font. If the version information does not provide resolution, the font with latest timestamp is returned. If the timestamp information is equivalent, the font file that is first in alphabetical order is returned.

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