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

How to apply Fontsize in RadRichTexBbox

1 Answer 65 Views
SpellChecker
This is a migrated thread and some comments may be shown as answers.
Chandra Prakash
Top achievements
Rank 2
Chandra Prakash asked on 13 Mar 2011, 09:27 AM
Hi,

I have applied a RadRichTextBox in my application. But i m facing a problem that there is default font size is 12. I Want to reduce the font size on runtime application.

Can anyone suggest me for this problem.

Thank
CGupta
Sr. WebDesigner
India

1 Answer, 1 is accepted

Sort by
0
Alex
Telerik team
answered on 17 Mar 2011, 09:58 AM
Hi Chandra Prakash,

You can use the FontSize property of the rich text box to alter the default font size used in the control. If you are using this approach you will also have to set the DocumentInheritsDefaultStyleSettings to true. Here is an example:

<telerik:RadRichTextBox x:Name="editor" FontSize="8" DocumentInheritsDefaultStyleSettings="True"/>

You can also change the font size runtime, using the IncrementFontSize and DecrementFontSize methods in the RadRichTextBox. Here is a sample button event handler that will decrease the font size of the entire document:

private void DecrementFontSize_Click(object sender, RoutedEventArgs e)
{
    this.editor.Document.Selection.SelectAll();
    this.editor.DecrementFontSize();
    this.editor.Document.Selection.Clear();
}

I hope this was helpful. Please contact us if you have more questions.


Best wishes,
Alex
the Telerik team
Tags
SpellChecker
Asked by
Chandra Prakash
Top achievements
Rank 2
Answers by
Alex
Telerik team
Share this question
or