Reputation: 9
I am trying to change the font in a WPF RichTextBox using .Net Framework 4.5.2 and Visual Basic.
All of the examples such as SelectionFont
give the error "SelectionFont is not a member of RichTextBox". Any advice on where to look would be helpful.
Upvotes: 0
Views: 812
Reputation: 1510
You can try with:
YourRichTextBox.Selection.ApplyPropertyValue(TextElement.FontFamilyProperty, new FontFamily("Comic Sans MS"))
Upvotes: 1