Gets or sets the font family at the current input position. If text is selected, the property specifies the font family of the whole selected text.

Syntax

public string FontFamily { get; set; }
Public Property FontFamily() As String

Examples

The following XAML example shows 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

Remarks

The property returns null when the text selection contains multiple characters with mixed font names.