Blogs

Rachel Reese - DevExpress Scheduler & RichEdit Blog

Rich Text Editor: Changing the Default Font

     

I was chatting with a customer this afternoon who was having trouble setting the default font on his XtraRichEdit. Sure, changing it at runtime using the Font drop down on the Ribbon bar works completely fabulously ;) but he wanted his users to start just typing away in Century Gothic.

Easy peasy, says I: we have a property for that.

image

This is also accomplishable via code:

richEditControl1.Document.DefaultCharacterProperties.FontSize = 12;
richEditControl1.Document.DefaultCharacterProperties.FontName = "Century Gothic";

For more information, check out the documentation.

Hope this helps!

Published Aug 04 2011, 04:48 PM by Rachel Reese (DevExpress)
Technorati tags: WinForms, RichEdit, XtraRichEdit
Bookmark and Share

Comments

 

Rachel Reese - DevExpress Scheduler & RichEdit Blog said:

I've had a couple questions lately on how to update paragraph styles after a document has been loaded

October 5, 2011 5:26 PM
More from DevExpress
Live Chat
Have a pre-sales question?
Need assistance with your evaluation?
We are here to help.
Chat is one of the many ways you can contact members of the DevExpress Team. We are available Monday-Friday between 8:30am and 5:00pm Pacific Time.
If you need additional product information, require pre-sales assistance, or want help with your order, write to us at info@devexpress.com or call us at
+1 (818) 844-3383.