Remarks
The property returns null when the text selection contains multiple characters with mixed font names.
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.
public string FontFamily { get; set; }
Public Property FontFamily() As String
The following XAML example shows how to bind a combo box to the Font
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
The property returns null when the text selection contains multiple characters with mixed font names.