8 Answers, 1 is accepted
The DefaultStyleSettings property is of type StyleDefinition and is manipulated through the GetPropertyValue and SetPropertyValue methods. It has to do with the style settings that are applied to paragraphs and spans that have not been set values for the following properties:
- FontFamily;
- FontSize;
- FontStyle;
- FontWeight.
StyleDefinition style =
this
.radRichTextBox.Document.DefaultStyleSettings;
double
? leftIndent = (
double
?)style.GetPropertyValue(Paragraph.LeftIndentProperty);
style.SetPropertyValue(Span.FontFamilyProperty,
new
FontFamily(
"Comic Sans MS"
));
style.SetPropertyValue(Paragraph.FontSizeProperty, Unit.PointToDip(4));
Iva
the Telerik team

How to set fontsize to radRichTextbox using style ?.. I mean to say using setter property.
I can set font writing this code in xaml. But i have many such richtextbox used in my application. I want to set the font using Style.
<
telerik:RadRichTextBox.Document>
<telerik:RadDocument>
<telerik:Section>
<telerik:Paragraph FontSize="12"/>
</telerik:Section>
</telerik:RadDocument>
</telerik:RadRichTextBox.Document>
Can anyone plz help me out ?
Thanks,
Dinesh Patel
Please refer to this article regarding the setting of default style settings on the document.
You can also set these properties in a Style and apply it to all RadRichTextBoxes in your application.
Iva
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

- Dinesh Patel

As suggested in the article link, it just initially sets font properties. Once I saved and open again default Verdana font gets set.
Pls help???/
Please take a look at my reply in the other thread you posted about this in.
Regards,
Petya
Telerik
See What's Next in App Development. Register for TelerikNEXT.

Hi dear Admin
I have a problem about radrichtexteditor, I set something such as margin, font page size and so on but when this code is executed
Radrichtexteditor1.Document=document;
all of the setting that i have set on radRichTextEditor dont work what is the problem?!?
Each of these is property of the RadDocument itself, or part of the document model. So when you change the current document with another instance of document, it carries all these properties with itself. Depending on your scenario, you can use RadRichTextBox.DocumentChanged event and apply the needed formatting just after the document is changed.
Regards,
Boby
Telerik by Progress