windowsforms-devexpress-dot-utils-dot-appearanceobject-92bdf9c9.md
Gets or sets the default font for controls.
Namespace : DevExpress.Utils
Assembly : DevExpress.Utils.v25.2.dll
NuGet Packages : DevExpress.Utils, DevExpress.Wpf.Core
[DXCategory("Appearance")]
public static Font DefaultFont { get; set; }
<DXCategory("Appearance")>
Public Shared Property DefaultFont As Font
| Type | Description |
|---|---|
| Font |
A Font object which is the default font for controls. The default value is the Tahoma font.
|
This property is in sync with the WindowsFormsSettings.DefaultFont property. See this topic to learn more.
The following code snippets (auto-collected from DevExpress Examples) contain references to the DefaultFont property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
winforms-grid-print-custom-draw-content/CS/MyXtraGrid/Form1.cs#L42
e.Cache.DrawEllipse(e.Cache.GetPen(Color.Red, 3), rect);
e.Cache.DrawString("Custom Draw", AppearanceObject.DefaultFont, Brushes.Black, e.Bounds);
}
winforms-grid-update-row-style-on-cell-value-change/CS/Form1.cs#L37
{
AppearanceObject.DefaultFont = new Font(AppearanceObject.DefaultFont.FontFamily, 14, FontStyle.Bold);
InitializeComponent();
winforms-grid-print-custom-draw-content/VB/MyXtraGrid/Form1.vb#L42
e.Cache.DrawEllipse(e.Cache.GetPen(Color.Red, 3), rect)
e.Cache.DrawString("Custom Draw", AppearanceObject.DefaultFont, Brushes.Black, e.Bounds)
End Sub
winforms-grid-update-row-style-on-cell-value-change/VB/Form1.vb#L36
Public Sub New()
AppearanceObject.DefaultFont = New Font(AppearanceObject.DefaultFont.FontFamily, 14, FontStyle.Bold)
InitializeComponent()
See Also