.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+

RichEditControlCompatibility.DefaultFontSize Property

Gets or sets the size of the font which is the default font size for RichEdit controls in the application.

Namespace: DevExpress.XtraRichEdit

Assembly: DevExpress.RichEdit.v20.1.Core.dll

Declaration

[DefaultValue(11F)]
public static float DefaultFontSize { get; set; }
<DefaultValue(11F)>
Public Shared Property DefaultFontSize As Single

Property Value

Type Description
Single

A Single value that specifies the font size in points.

Examples

The static RichEditControlCompatibility.DefaultFontSize and RichEditControlCompatibility.DefaultFontName properties set the default font settings for all RichEditControl instances in the application. It is recommended to place them before initialization of all controls, in the Main method, as illustrated in the following code.

static void Main() {
    Application.EnableVisualStyles();
    Application.SetCompatibleTextRenderingDefault(false);
    DevExpress.XtraRichEdit.RichEditControlCompatibility.DefaultFontSize = 8;
    DevExpress.XtraRichEdit.RichEditControlCompatibility.DefaultFontName = "Tahoma";
    Application.Run(new Form1());
}
See Also