Returns an array of strings specifying all supported fonts. These fonts depend on the formatting device set with the WPF.TextControl.FormattingPrinter or TextControl.FormattingPrinter property and on attributes set with the WPF.TextControl.FontSettings or TextControl.FontSettings property.

GetFontFamilies()

public string[] GetFontFamilies()
Public Function GetFontFamilies() As String()

Return Value

The return value is the list of available fonts.

Examples

The following examples in CSharp, VBNET and XAML show how to bind a combo box to the FontFamily property using GetFontFamilies to fill the combo box with available font names.

private void cbFontFamily_DropDownOpened(object sender, EventArgs e) {
    cbFontFamily.ItemsSource = textControl1.InputFormat.GetFontFamilies();
}
Private Sub cbFontFamily_DropDownOpened(sender As Object, e As EventArgs)
    cbFontFamily.ItemsSource = TextControl1.InputFormat.GetFontFamilies()
End Sub