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

Font Size

1 Answer 304 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Chris
Top achievements
Rank 1
Chris asked on 24 Mar 2011, 07:40 AM
Hi,

I seem to have a probelm when trying to adjust the font size of the RadRichTextBox. If i set the FontSize attribute then it doesn't change the size of the text when entered. It always remains at size 12 which is to big for my UI.

What am i doing wrong?  

1 Answer, 1 is accepted

Sort by
0
Boby
Telerik team
answered on 25 Mar 2011, 03:25 PM
Hello Chris,

In Q3 2010 (2010.3 1110) we introduced a new boolean property called DocumentInheritsDefaultStyleSettings, which must be set to True, if you want to set some default font properties on a RadRichTextBox. Otherwise your settings for the following properties would be disregarded:
  • FontFamily;
  • FontSize;
  • FontStyle (Normal/Italic);
  • FontWeight (Normal/Bold).

Here is how you can do that in XAML:

<telerik:RadRichTextBox Name="editor" Grid.Row="1" FontFamily="Arial" FontSize="12"DocumentInheritsDefaultStyleSettings="True"/>

If you run that in an example with a RadRichTextBoxRibbonUI and/or SelectionMiniToolBar, you will notice that the value of the FontSize they show is 9. That is so, because the unit they use when measuring is points, as opposed to RadRichTextBox’s default measuring unit – DIP.
Note that the default values are considered only when you don't have any font settings specified in the HTML text that is the target of the binding.

If you have other questions, do not hesitate to contact us again.


All the best,
Boby
the Telerik team
Tags
RichTextBox
Asked by
Chris
Top achievements
Rank 1
Answers by
Boby
Telerik team
Share this question
or