Back to Devexpress

FrameworkSettings.DefaultSettingsCompatibilityMode Property

expressappframework-devexpress-dot-expressapp-dot-frameworksettings.md

latest15.1 KB
Original Source

FrameworkSettings.DefaultSettingsCompatibilityMode Property

Sets configuration options and feature toggles to match the default behavior of the specified version of DevExpress frameworks and libraries.

Namespace : DevExpress.ExpressApp

Assembly : DevExpress.ExpressApp.v25.2.dll

NuGet Package : DevExpress.ExpressApp

Declaration

csharp
public static FrameworkSettingsCompatibilityMode DefaultSettingsCompatibilityMode { get; set; }
vb
Public Shared Property DefaultSettingsCompatibilityMode As FrameworkSettingsCompatibilityMode

Property Value

TypeDescription
FrameworkSettingsCompatibilityMode

The version of DevExpress frameworks and libraries. XAF sets configuration options and feature toggles to match the selected version’s default behavior.

|

Available values:

Show 12 items

NameDescription
v20_1

Does not enable any configuration options or feature toggles.

| | v20_2 |

Enables the following configuration options and feature toggles:

| | v21_1 |

Extends v20_2 with the following configuration options and feature toggles:

| | v21_2 |

Extends the v21_1 with the following configuration options and feature toggles:

| | v22_1 |

Extends v21_2 with the following configuration options and feature toggles:

| | v22_2 |

Enables the same configuration options and feature toggles as v22_1.

| | v23_1 |

Extends v22_2 with the following configuration options and feature toggles:

  • DevExpress.ExpressApp.Blazor.SystemModule.BlazorModificationsController.ShowSaveAndCloseActionInDetailView = true
  • DevExpress.ExpressApp.Blazor.SystemModule.BlazorModificationsController.ShowSaveAndNewActionInDetailView = true
  • DevExpress.ExpressApp.Blazor.SystemModule.CloseDetailViewController.ShowCloseActionInDetailView = false
  • DevExpress.ExpressApp.Blazor.SystemModule.BlazorNewObjectViewController.ShowNewObjectActionInDetailView = false

| | v23_2 |

Extends v23_1 with the following configuration options and feature toggles:

  • DevExpress.ExpressApp.Blazor.SystemModule.BlazorModificationsController.ShowSaveButtonsInPopup = true
  • DevExpress.ExpressApp.Blazor.SystemModule.PopupWindowTemplateClosingController.ShowCloseButtonInPopup = true
  • DevExpress.ExpressApp.Blazor.SystemModule.PopupWindowTemplateSizeController.AllowPopupDragAndResize = true

| | v24_1 |

Extends v23_2 with the following configuration options and feature toggles:

  • DevExpress.ExpressApp.ReportsV2.Blazor.ReportsBlazorModuleV2.ReportViewerType = DxReportViewer
  • DevExpress.Persistent.AuditTrail.ObjectAuditProcessor.ExcludeNonPersistentFromAudit = true

| | v24_2 |

Sets the following configuration options and feature toggles:

| | v25_1 |

Does not set any additional configuration options or feature toggles.

| | Latest |

Enables configuration options and feature toggles that correspond to the latest version. We update this value with each release.

|

Remarks

When you upgrade your application to DevExpress frameworks and libraries v20.2 , the Project Converter sets the DefaultSettingsCompatibilityMode property to v20_1. This allows you to avoid breaking changes or unexpected behavior that new feature toggles and configuration options may cause. You can also set the DefaultSettingsCompatibilityMode property to another DevExpress version to retain this version’s feature toggles and configuration options when you update an application.

If you want to automatically enable all the options for the latest version, set the DefaultSettingsCompatibilityMode to Latest (the Template Kit sets this value for all applications created in v20.2 or later). In this case, you do not need to specify the options individually or check their compatibility. If some of these options cause issues with your application, you can change their values after you initialize the application. Options specified directly in code have a higher priority than DefaultSettingsCompatibilityMode.

The following code snippets specify this property in your applications:

WinForms Application

File : _MySolution.Win_Program.cs

csharp
using DevExpress.ExpressApp;
// ...
public class Program {
    static void Main(string[] arguments) {
        FrameworkSettings.DefaultSettingsCompatibilityMode = FrameworkSettingsCompatibilityMode.v20_2;
        // ...
        MySolutionWinApplication winApplication = new MySolutionWinApplication();
        // change a feature toggle value here
        // ...
    }
    // ...
}

ASP.NET Core Blazor Application

File : MySolution.Blazor_Program.cs_

csharp
using DevExpress.ExpressApp;
// ...
public class Program {
    public static void Main(string[] arguments) {
        FrameworkSettings.DefaultSettingsCompatibilityMode = FrameworkSettingsCompatibilityMode.v20_2;
        // change a feature toggle value here
        // ...
    }
    // ...
}

The following code snippets (auto-collected from DevExpress Examples) contain references to the DefaultSettingsCompatibilityMode 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.

xaf-how-to-use-data-from-security-in-criterion/CS/EF/CustomOperatorEF/CustomOperatorEF.WebApi/Program.cs#L27

csharp
else {
    DevExpress.ExpressApp.FrameworkSettings.DefaultSettingsCompatibilityMode = DevExpress.ExpressApp.FrameworkSettingsCompatibilityMode.Latest;
    IHost host = CreateHostBuilder(args).Build();

xaf-how-to-change-connection-to-the-database-at-runtime/CS/XPO/NET_Framework/RuntimeDbChooser.Win/Program.cs#L19

csharp
static void Main() {
            DevExpress.ExpressApp.FrameworkSettings.DefaultSettingsCompatibilityMode = DevExpress.ExpressApp.FrameworkSettingsCompatibilityMode.Latest;
#if EASYTEST

xaf-custom-logon-parameters/CS/EF/EFCoreCustomLogonAll.Win/Program.cs#L16

csharp
DevExpress.ExpressApp.FrameworkSettings.DefaultSettingsCompatibilityMode = DevExpress.ExpressApp.FrameworkSettingsCompatibilityMode.Latest;
DevExpress.ExpressApp.Security.SecurityStrategy.AutoAssociationReferencePropertyMode = DevExpress.ExpressApp.Security.ReferenceWithoutAssociationPermissionsMode.AllMembers;

XAF_how-to-add-custom-buttons-actions-to-the-lookup-and-popup-windows/CS/EFCore/PopupActionEF/PopupActionEF.Blazor.Server/Program.cs#L28

csharp
else {
    DevExpress.ExpressApp.FrameworkSettings.DefaultSettingsCompatibilityMode = DevExpress.ExpressApp.FrameworkSettingsCompatibilityMode.Latest;
    IHost host = CreateHostBuilder(args).Build();

xaf-how-to-import-data-in-xaf/CS/EFCore/ImportDataEF/ImportDataEF.Blazor.Server/Program.cs#L28

csharp
else {
    DevExpress.ExpressApp.FrameworkSettings.DefaultSettingsCompatibilityMode = DevExpress.ExpressApp.FrameworkSettingsCompatibilityMode.Latest;
    IHost host = CreateHostBuilder(args).Build();

xaf-how-to-prevent-altering-the-legacy-database-schema-when-creating-an-xaf-application/VB/WinWebSolution.Win/Program.vb#L21

vb
Shared Sub Main()
                        DevExpress.ExpressApp.FrameworkSettings.DefaultSettingsCompatibilityMode = DevExpress.ExpressApp.FrameworkSettingsCompatibilityMode.v20_1
Application.EnableVisualStyles()

xaf-win-add-custom-button-to-form-using-custom-view-item/VB/MySolution.Web/Global.asax.vb#L22

vb
Protected Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)
                        DevExpress.ExpressApp.FrameworkSettings.DefaultSettingsCompatibilityMode = DevExpress.ExpressApp.FrameworkSettingsCompatibilityMode.v20_1
AddHandler ASPxWebControl.CallbackError, AddressOf Application_Error

XAF-CRUD-for-Non-Persistent-Objects-Stored-Remotely/VB/NonPersistentObjectsDemo.Win/Program.vb#L19

vb
Sub Main()
            DevExpress.ExpressApp.FrameworkSettings.DefaultSettingsCompatibilityMode = DevExpress.ExpressApp.FrameworkSettingsCompatibilityMode.v20_1
#If EASYTEST Then

xaf-how-to-display-a-collection-property-as-a-checked-list-box/VB/DXExample.Win/Program.vb#L21

vb
Shared Sub Main()
            DevExpress.ExpressApp.FrameworkSettings.DefaultSettingsCompatibilityMode = DevExpress.ExpressApp.FrameworkSettingsCompatibilityMode.v20_1
#If EASYTEST Then

xaf-how-to-show-a-custom-form-as-the-winforms-dashboard-designer/VB/CustomDashboardDesignerForm.Win/Program.vb#L22

vb
Shared Sub Main()
            DevExpress.ExpressApp.FrameworkSettings.DefaultSettingsCompatibilityMode = DevExpress.ExpressApp.FrameworkSettingsCompatibilityMode.v20_1
#If EASYTEST Then

See Also

FrameworkSettings Class

FrameworkSettings Members

DevExpress.ExpressApp Namespace