Skip to main content

DXRichEditBehaviorOptions.FontSource Property

Gets or sets the default font settings of the RichEditControl. This is a dependency property.

Namespace: DevExpress.Xpf.RichEdit

Assembly: DevExpress.Xpf.RichEdit.v24.1.dll

NuGet Package: DevExpress.Wpf.RichEdit

Declaration

public RichEditBaseValueSource FontSource { get; set; }

Property Value

Type Description
RichEditBaseValueSource

A RichEditBaseValueSource enumeration value indicating the font settings’s provider.

Available values:

Name Description
Auto

The property value is obtained from the corresponding property of the control if it is different from default.

Document

The property value is obtained from the corresponding property of the document.

Control

The property value is obtained from the corresponding property of the control.

Property Paths

You can access this nested property as listed below:

Object Type Path to FontSource
RichEditControl
.BehaviorOptions .FontSource

Remarks

Set the FontSource property to the RichEditBaseValueSource.Control to use the RichEditControl.FontFamily, RichEditControl.FontSize, RichEditControl.FontStyle properties’ values as the text’s font settings. The RichEditBaseValueSource.Auto value indicates that if the Font control’s properties have values different from the default, these values are applied. The font settings are applied to the text with no direct font formatting or style applied.

Note

If you use an integrated Ribbon UI, the font options specified by the RichEditControl.FontFamily, RichEditControl.FontSize, RichEditControl.FontStyle properties are applied to the ribbon as well. We recommend you to specify the document’s default settings (returned by the Document.DefaultCharacterProperties property) to change the text appearance.

Important

Starting with v19.2, the RichEditControl uses document themes to retrieve default font information. As such, the RichEditControl.FontFamily property does no longer affect the default document font. Set the RichEditControlCompatibility.UseThemeFonts property to false to restore previous behavior and use the RichEditControl.FontFamily property.

See Also