FontFamily.FamilyTypefaces Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets a collection of typefaces for the FontFamily object.
public:
property System::Windows::Media::FamilyTypefaceCollection ^ FamilyTypefaces { System::Windows::Media::FamilyTypefaceCollection ^ get(); };
public System.Windows.Media.FamilyTypefaceCollection FamilyTypefaces { get; }
member this.FamilyTypefaces : System.Windows.Media.FamilyTypefaceCollection
Public ReadOnly Property FamilyTypefaces As FamilyTypefaceCollection
Property Value
A FamilyTypefaceCollection that represents a collection of typefaces for the FontFamily object.
Examples
// 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;
' Return the font family for the selected font name.
Dim fontFamily As New FontFamily("Arial Narrow")
' Return the family typeface collection for the font family.
Dim familyTypefaceCollection As FamilyTypefaceCollection = fontFamily.FamilyTypefaces
' Enumerate the family typefaces in the collection.
For Each typeface As FamilyTypeface In familyTypefaceCollection
' Add the typeface style values to the styles combo box.
comboBoxStyles.Items.Add(typeface.Style)
Next typeface
comboBoxStyles.SelectedIndex = 0
Remarks
XAML Property Element Usage
<object>
<object.FamilyTypefaces>
<OneOrMoreFontFamilyTypefaces/>
</object.FamilyTypefaces>
</object>
XAML Values
OneOrMoreFontFamilyTypefaces
One or more of typefaces for the FontFamily object.
Applies to
Совместная работа с нами на GitHub
Источник этого содержимого можно найти на GitHub, где также можно создавать и просматривать проблемы и запросы на вытягивание. Дополнительные сведения см. в нашем руководстве для участников.