FontFamily.FamilyTypefaces 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得 FontFamily 物件的字樣集合。
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
屬性值
FamilyTypefaceCollection,表示 FontFamily 物件的字樣集合。
範例
// 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
備註
XAML 屬性項目用法
<object>
<object.FamilyTypefaces>
<OneOrMoreFontFamilyTypefaces/>
</object.FamilyTypefaces>
</object>
XAML 值
OneOrMoreFontFamilyTypefaces
物件的一或多個字樣 FontFamily 。