WindowsFormsSettings.LoadApplicationSettings() Method

Loads application settings and updates the corresponding CLR properties accordingly.

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.Utils.v21.2.dll


public static void LoadApplicationSettings()


The LoadApplicationSettings method loads application settings stored in the App.config file and updates the corresponding CLR properties accordingly. Call the LoadApplicationSettings method before the main application form is created.

static class Program {
    /// <summary>
    /// The main entry point for the application.
    /// </summary>
    static void Main() {
        Application.Run(new Form1());

The given approach applies to standard forms only. Since DevExpress forms load App.config settings automatically, you do not need to call the LoadApplicationSettings method.

In the figure below, you can see how the App.config file can be accessed using Solution Explorer in Visual Studio.


In the sample configuration file below, the application settings specify the Segoe UI font as a default font for DevExpress controls and the Visual Studio 2013 Blue skin is applied. These settings are automatically applied at design time. Note that you need to re-start Visual Studio to apply these settings.

<?xml version="1.0" encoding="utf-8" ?>
    <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System" >
      <section name="DevExpress.LookAndFeel.Design.AppSettings" type="System.Configuration.ClientSettingsSection" requirePermission="false" />
        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
      <setting name="DefaultAppSkin" serializeAs="String">
        <value>Skin/Visual Studio 2013 Blue</value>
      <setting name="DefaultAppFont" serializeAs="String">
        <value>Segoe UI;11</value>

The table below lists the settings exposed by the AppSettings class that you can declare in your configuration file. You can launch the DevExpress Project Settings dialog to modify these settings.

Setting name Description Affected property Available values or Example
DefaultAppSkin Specifies the style (and if the skin style is applied, the skin name) used to render DevExpress controls. For instance, to draw controls using flat borders, set this setting to Flat. To draw controls using a particular skin, this setting should contain the skin name after a slash symbol, e.g., to display controls using the Visual Studio 2013 Blue skin, set this setting to Skin/Visual Studio 2013 Blue. UserLookAndFeel.Style and UserLookAndFeel.SkinName Skin/Visual Studio 2013 Blue
DefaultAppFont Specifies the default font for DevExpress controls that support the appearance mechanism. The font should be specified using the font family name and font size separated with a semicolon. For instance, to use the Segoe UI font, 11 points, set this setting to Segoe UI;11. If the font size is not specified, the default font size is used. WindowsFormsSettings.DefaultFont Segoe UI;11
FontBehavior Specifies the font used by DevExpress controls, and depending on the specified value, can force standard .Net controls to use the same font. See the WindowsFormsSettings.FontBehavior property to learn about the provided behaviors. If the DefaultAppFont setting is specified, the FontBehavior setting is not in effect. WindowsFormsSettings.FontBehavior Default, UseControlFont, UseTahoma, UseWindowsFont, ForceWindowsFont, ForceTahoma
TouchUI Specifies whether touch UI mode is enabled, in which controls automatically increase their size and the distance between some of their elements. WindowsFormsSettings.TouchUIMode True, False
TouchScaleFactor Specifies the scale factor used to calculate the size and distance between specific control elements when touch UI mode is enabled. WindowsFormsSettings.TouchScaleFactor 1.5
RegisterUserSkins Specifies whether to register custom user skins for design time use. Set this setting to True to enable using custom user skins at design time. True, False
See Also