XAF (Cross-Platform .NET App UI & Web API Service) — Early Access Preview (v25.1)

21 April 2025

This post documents a few XAF-related features we expect to ship in early June and details what’s inside our Early Access Preview build. As you will note below, XAF-related focus areas remain Blazor, Entity Framework Core and Security. For additional information on what you can expect in v25.1, please refer to our June 2025 Roadmap.

If you own an active Universal Subscription, feel free to download this Early Access Preview (EAP) build at your convenience. If you own an active DXperience Subscription and would like to learn more about our Cross-Platform .NET App UI (XAF) or Web API Service, you can explore the features described herein by logging onto the DevExpress Download Manager and installing this EAP build in trial mode. Once you do, please tell us whether these new features address your business needs. Your feedback will help us fine-tune our implementation before official launch.

If you are using a trial and want to try these preview features today, you can purchase a DevExpress Universal license online (this will give you access to the early access preview build). If you own a non-Universal subscription and are ready to upgrade, email us at clientservices@devexpress.com for upgrade pricing.

ASP.NET Core Blazor UI

Grid List Editor Enhancements

The IModelSplitLayout.RelativePosition property determines the splitter's position in relation to the DetailView as a percentage. It is automatically set when a user adjusts the splitter and takes precedence over the pixel-based SplitterPosition property.

Our DxGridListEditor also adds new "Best Fit" and "Clear Sorting" context menu commands for grid column headers.


Masks for Date and Time properties

XAF Blazor Date and Time Property Editors support masked input. The `EditMask` property restricts user input and can be specified in the Application Model: BOModel > YourBusinessClass > Property > `EditMask`. You can also customize mask settings for `TimeOnly` - `TimeSpan` and `DateOnly` – `DateSpan` type pairs separately in code.

View.CustomizeViewItemControl<TimeSpanPropertyEditor>(this, editor => {
    // TimeSpan
    editor.DxTimeEditMaskProperties.DateTime.CaretMode = MaskCaretMode.Advancing;
    // TimeOnly
    editor.DxTimeEditMaskProperties.TimeOnly.CaretMode = MaskCaretMode.Regular;
});

ToolTip Attribute Enhancements

XAF Blazor v25.1 supports the following UI elements for the ToolTip attribute (and the IModelToolTip.ToolTip property in the Application Model):

  • Navigation groups and items
  • `DxGridListEditor` and `DxTreeListEditor` column headers
  • Layout group headers
[ToolTip("View, assign or remove employees for the current task")]
public virtual IList<Employee> Employees { get; set; }

Action Shortcuts

XAF Blazor v25.1 supports keyboard shortcuts for Toolbar and Context Menu Action Controls. You can specify appropriate keystroke combinations in the Model Editor or in code. Examples:

  • New: "Ctrl+Shift+A"
  • Save: "Ctrl+Shift+S"
  • Logon: "Enter"
  • DialogOK: "Ctrl+Shift+Enter"
  • Refresh: "Ctrl+Shift+R"
  • Delete: "Ctrl+Delete"
  • NextObject: "Ctrl+Alt+RightArrow"
  • PreviousObject: "Ctrl+Alt+LeftArrow"
  • SaveAndClose: "Ctrl+Shift+Enter"

Enhanced Filtering by Non-Persistent Fields

FilterController (and other XAF APIs working with server-side criteria) now better process non-persistent business class properties in Client data access mode for EF Core. Once non-persistent properties are detected in ListView criteria, we fully process it on the client side.

XAF Blazor v25.1 also removes non-persistent/non-aliased properties (see 1-2 below) from the FilterPropertyEditor menu/user selection for both EF Core and XPO ORM (for example, defined with the NotMapped attribute). Calculated properties defined with the PersistentAlias and Calculated attributes are NOT removed (see 3-4 below).

.NET Aspire Integration

Our team has spent some time considering the capabilities of Aspire, isolating the best integration points and allowing XAF developers to take advantage of Aspire orchestration features available out of the box. The team sees Aspire as a potential "1-click solution", a more modern alternative to some of the templates in the XAF Solution Wizard. Benefits include: 

  • Simplify long and error-prone setup processes like those we describe in our documentation for Azure App Service and Nginx support on Linux, as well as other popular web server configurations.
  • Provision required databases and other application resources for both development and deployment environments (for instance, using a Docker setup).

Our goal is to help save time, whether you're using XAF or not. Right now, much of this is a moving target, since Microsoft continues to evolve Aspire. At the same time, some functionality is already used and is considered stable. As such, we decided to publish details to help you make use of Aspire-specific tools in your own XAF project. Please refer to the following documents for additional information:

EF Core Enhancements

Concurrency Control for EF Core

XAF Blazor/Windows Forms EF-Core based apps support Optimistic Concurrency control (on par with existing XPO ORM functionality). This capability is enabled for all classes that implement the new `IOptimisticLock` interface (for example, all classes inherited from XAF’s `BaseObject`). You can use the OptimisticLockIgnore attribute to disable this capability for selected classes or properties.

With OptimisticLockDetection and OptimisticLockHandling options you can fine-tune collision detection and merge strategies both on object-level and field-level. You can set up a combination of these options either in the Application Builder for all classes or use OptimisticLockAttribute (to specify a custom strategy for a specific class).

builder.ObjectSpaceProviders
   .AddEFCore(options =>
   {
       options.PreFetchReferenceProperties();
       options.OptimisticLockDetection = OptimisticLockDetection.AllFields;
       options.OptimisticLockHandling = OptimisticLockHandling.Merge;
   })

No breaking changes are expected for existing EF Core projects when using the DevExpress Project Converter (to handle all the database changes automatically). See Also: T1273764 - Core - Database and data model code changes for XAF EF Core apps to support the Optimistic Locking

Clone Object Module for EF Core

In v25.1, XAF Blazor and Windows Forms EFCore-based apps support the Clone command. With this, you can quickly copy data records including aggregated detail collections.

We unified cloning functionality and APIs for both ORMs, so XAF developers can use a single DevExpress.ExpressApp.CloneObject package. For additional information, refer to T1276850 - Core - The DevExpress.ExpressApp.CloneObject.Xpo assembly and NuGet package have been renamed.


Easier Database Schema Updates When a New Class or Property Is Added (XPO Parity)

v25.1 simplifies database updates for EF Core developers (targeting XAF WinForms/Blazor or Web API Service-based apps). For instance, when you add a new business class or a property at design time, XAF will automatically apply EF Core migrations to the database in Debug mode (similar to XPO ORM functionality). This will save development time because no extra methods will be necessary, especially for frequent data model changes.

We also got rid of the redundant DBUpdater tool for .NET / .NET-based apps for EF Core and XPO ORM. XAF developers can now use the updateDatabase CLI command of the underlying application instead. This will simplify the developer experience for both deployment and maintenance because a single method will be used. For more information, refer to T1282681 - Database schema update behavior has changed for EF Core.

NOTE: Do not use this automatic update in Debug mode (or -updateDatabase -forceUpdate keys of the underlying application) with production databases or other important data (if you wish to make changes to a production database, be certain to backup your data). You, the developer, are responsible for the application, database, network, and other configurations and data safety/consistency based on client, security, and environment requirements. We recommend that you review relevant database update procedures with your database administrators (DBA) and always follow network/database best-practice standards.

Easier Connection to Middle-Tier Server in Non-XAF Apps for EF Core

In a Middle Tier server architecture, only the server has direct access to the database. DbContext and other EF Core CRUD APIs are still used in UI client app code (which interacts with the server remotely). Before passing data to the client’s DbContext, the server enforces security measures such as authentication, authorization, and data validation (powered by our .NET App Security API).

v25.1 includes our MiddleTierClientBuilder - designed to simplify boilerplate code needed to connect non XAF-powered WinForms/WPF apps to a Middle Tier Security Server (via XAF's Security System and EF Core). For additional information, check out our WinForms non-XAF example. Our new Template Kit will include non-XAF project templates for WinForms/WPF in our official release.

Cross-Platform Enhancements

Support DataSourceXXX attributes for Enumeration Property Editors

XAF Blazor/WinForms v25.1 support the following attributes for our Enumeration Property Editors:

For example, you can filter enumeration values with the DataSourceCriteria attribute and the following criteria: "Status != 0 and Status > 2", "Status In (0,1,2)", "Status != '@This.OtherSelectedStatus'", etc.

using DevExpress.Persistent.BaseImpl.EF;
using DevExpress.Data.Filtering;
using System.ComponentModel.DataAnnotations;

[DefaultClassOptions]
public class Order : BaseObject {
    [DataSourceCriteria("Status = ##Enum#MyNamespace.OrderStatus,Pending# || Status = ##Enum#MyNamespace.OrderStatus,Confirmed#")]
    public virtual OrderStatus Status { get; set; }
}
public enum OrderStatus { Pending, Confirmed, Processing, Shipped, Delivered, Canceled, Returned }

New Built-in Property Editors: TagBox and Checked ComboBox

XAF Blazor/WinForms v25.1 ship with built-in Tag Box and Checked ComboBox Property Editors. TagBox and Checked ComboBox are two popular options to save space in detail forms for collection data (as an alternative to large data grids).

All new Editors support CRUD operations, Security System, Application Model options such as `AllowEdit` or `AllowClear`, `DataSourceXXX` filtering attributes, ImmediatePostData and other standard XAF features.

Web API Service Enhancements

Our Backend Web API Service introduces the following highly-requested usability features (for EF Core in this EAP, for XPO in the final release):

  • OData Deep Insert and Deep Update  (for Post, Patch and Put HTTP verbs). You can now use the new Patch(DeltaSet<TEntity> deltaSet) method to create/update large amounts of objects.
  • OData Batch Operations (aka Batch Update support).

Your Feedback Matters!

Early Access and CTP builds are provided solely for early testing purposes and are not ready for production use. This build can be installed side by side with other major versions of DevExpress products. Please backup your project and other important data before installing Early Access and CTP builds. This EAP may not include all features/products we expect to ship in our v25.1 release cycle. As its name implies, the EAP offers an early preview of what we expect to ship in two months.

We recommend you try out the new features using Visual Studio 2022 and either MainDemo.NET.EFCore or MainDemo.NET.XPO demo (located in the following folder: "c:\Users\Public\Documents\DevExpress Demos 25.1\Components\XAF\"). You can also test the EAP build against your project, but please remember that this build is not ready for production use.

We will keep you posted about additional features we expect to ship in v25.1 (see our June 2025 Roadmap) as we get closer to official release. If you've had the opportunity to use the EAP build, please post your thoughts in our roadmap survey OR create a Support Center ticket. We will happily follow up.

Thanks,
Dennis Garavsky
Principal Product Manager
dennis@devexpress.com

Free DevExpress Products - Get Your Copy Today

The following free DevExpress product offers remain available. Should you have any questions about the free offers below, please submit a ticket via the DevExpress Support Center at your convenience. We'll be happy to follow-up.