This is a migrated thread and some comments may be shown as answers.

Change default Font

1 Answer 242 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Peter
Top achievements
Rank 1
Peter asked on 03 Oct 2012, 02:30 AM
Hi,

I simply want to change the default font of my RadRichTextBox from Times New Roman to Calibri. How do I do this?

My RTB uses a HtmlDataProvider which converts html correctly, however I'm wanting Calibri for the instance where just plain text it set.

From this post, I've tried:
<telerikHtml:HtmlDataProvider Html="{Binding WorkCompleted, Mode=TwoWay}"
RichTextBox="{Binding ElementName=radRichTextBox1}" />
<telerik:RadRichTextBox x:Name="radRichTextBox1"
FontFamily="Calibri" FontSize="16" DocumentInheritsDefaultStyleSettings="True" />
This changes the font size but not the fontfamily.

Thanks

1 Answer, 1 is accepted

Sort by
0
Accepted
Petya
Telerik team
answered on 04 Oct 2012, 10:21 AM
Hello Peter,

The code you sent us seems to work as expected. Please, find attached a sample project demonstrating the behavior on our end.

As stated in the forum thread you found, if the paragraphs or spans in the HTML you are importing already have а font setting, the ones you set as default will be ignored. That said, in what way is the HTML you are trying to import created? Has it been exported from RadRichTextBox?


Kind regards,
Petya
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
RichTextBox
Asked by
Peter
Top achievements
Rank 1
Answers by
Petya
Telerik team
Share this question
or