Change default Font

2 posts, 1 answers
  1. Peter
    Peter avatar
    95 posts
    Member since:
    Mar 2009

    Posted 02 Oct 2012 Link to this post

    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
  2. Answer
    Petya
    Admin
    Petya avatar
    975 posts

    Posted 04 Oct 2012 Link to this post

    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.

  3. UI for WPF is Visual Studio 2017 Ready
Back to Top