Skip to main content

DevExpress v24.1 Update — Your Feedback Matters

Our What's New in v24.1 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

Migrate from Xamarin.Forms to .NET MAUI

  • 6 minutes to read

.NET MAUI is an evolution of the Xamarin.Forms platform. Most DevExpress components for Xamarin.Forms have counterparts in .NET MAUI. If your Xamarin.Forms application is based on DevExpress components, you can follow the steps in this article to create a similar .NET MAUI application.

To migrate from the DevExpress Xamarin.Forms Controls to DevExpress .NET MAUI Controls, follow the steps below:

  1. Convert the projects from .NET Framework to .NET SDK Style
  2. Update NuGet packages
  3. Update code namespaces
  4. Address breaking API changes

View Example: Migrate a DevExpress Xamarin.Forms Application to .NET MAUI

See the following Microsoft topics for more information: Migrate your app from Xamarin.Forms and Xamarin.Forms Support Policy.

#Step 1: Create a New Project

Refer to the following Microsoft topic for information on how to create a .NET MAUI project: Migrating from Xamarin.Forms - Create a New Project.

#Step 2: Update DevExpress NuGet Package References

The following table lists DevExpress Xamarin.Forms NuGet packages and their equivalents in DevExpress .NET MAUI:

DevExpress Xamarin.Forms Controls NuGet Package DevExpress .NET MAUI Controls NuGet Package
DevExpress.XamarinForms.Charts DevExpress.Maui.Charts
DevExpress.XamarinForms.CollectionView DevExpress.Maui.CollectionView
DevExpress.XamarinForms.Editors DevExpress.Maui.Editors
DevExpress.XamarinForms.Grid DevExpress.Maui.DataGrid
DevExpress.XamarinForms.Navigation DevExpress.Maui.Controls
DevExpress.XamarinForms.Scheduler DevExpress.Maui.Scheduler

#Step 3: Update Code Namespaces

#Step 3.1: Update Framework Namespaces

Refer to the following Microsoft topic for information on how to update framework namespaces: Migrating from Xamarin.Forms - Source Code Updates.

#Step 3.2: Update DevExpress Namespaces

#XAML Namespaces

The following table lists DevExpress Xamarin.Forms XAML namespaces and their equivalents in DevExpress .NET MAUI:

DevExpress Xamarin.Forms Controls Namespace DevExpress .NET MAUI Controls Namespace
http://schemas.devexpress.com/xamarin/2014/forms/charts clr-namespace:DevExpress.Maui.Charts;assembly=DevExpress.Maui.Charts
http://schemas.devexpress.com/xamarin/2014/forms/collectionview clr-namespace:DevExpress.Maui.CollectionView;assembly=DevExpress.Maui.CollectionView
http://schemas.devexpress.com/xamarin/2014/forms/editors clr-namespace:DevExpress.Maui.Editors;assembly=DevExpress.Maui.Editors
http://schemas.devexpress.com/xamarin/2014/forms/datagrid clr-namespace:DevExpress.Maui.DataGrid;assembly=DevExpress.Maui.DataGrid
http://schemas.devexpress.com/xamarin/2014/forms/navigation clr-namespace:DevExpress.Maui.Controls;assembly=DevExpress.Maui.Controls
http://schemas.devexpress.com/xamarin/2014/forms/scheduler clr-namespace:DevExpress.Maui.Scheduler;assembly=DevExpress.Maui.Scheduler

#Code-Behind Namespaces

The following table lists DevExpress Xamarin.Forms namespaces and their equivalents in DevExpress .NET MAUI:

DevExpress Xamarin.Forms Controls Namespace DevExpress .NET MAUI Controls Namespace
DevExpress.XamarinForms.Charts DevExpress.Maui.Charts
DevExpress.XamarinForms.CollectionView DevExpress.Maui.CollectionView
DevExpress.XamarinForms.Editors DevExpress.Maui.Editors
DevExpress.XamarinForms.Grid DevExpress.Maui.DataGrid
DevExpress.XamarinForms.Navigation DevExpress.Maui.Controls
DevExpress.XamarinForms.Scheduler DevExpress.Maui.Scheduler

#Step 3.3: Replace Initializers with the UseDevExpress Method

If you use DevExpress Xamarin.Forms Controls, your code calls the Initializer.Init() method for each DevExpress namespace you reference in the application:

using System.ComponentModel;
using Xamarin.Forms;
namespace DataGrid_Columns {
    public partial class MainPage : ContentPage {
        public MainPage() {
            DevExpress.XamarinForms.DataGrid.Initializer.Init();
            DevExpress.XamarinForms.Charts.Initializer.Init();
            // other DevExpress Xamarin.Forms Control Initializers
            InitializeComponent();
        }
    }
}

If you migrate to DevExpress .NET MAUI Controls, replace those method calls with a single call to the UseDevExpress(MauiAppBuilder, Boolean) method. It registers all DevExpress MAUI controls:

using DevExpress.Maui;

namespace DataForm_GettingStarted;
public static class MauiProgram {
    public static MauiApp CreateMauiApp() {
        var builder = MauiApp.CreateBuilder();
        builder
            .UseMauiApp<App>()
            .UseDevExpress()
            .ConfigureFonts(fonts => {
                fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
            });
        return builder.Build();
    }
}

You can also pass true to the UseDevExpress() method as a parameter to localize DevExpress .NET MAUI Controls. Refer to the following topic for more information: Localization.

#Step 3.4: Update the DevExpress Xamarin.Forms Types to Their .NET MAUI Equivalents

This section lists DevExpress Xamarin.Forms types that we renamed in DevExpress .NET MAUI. Rename the types in your applications and review related breaking API changes listed in footnotes.

The table below lists types available in the DevExpress.XamarinForms.Navigation namespace and their .NET MAUI counterparts. Note that the types from the DevExpress.XamarinForms.Navigation namespace now belong to the DevExpress.Maui.Controls namespace.

Xamarin.Forms Type .NET MAUI Type
Navigation.ContentAlignment Controls.HeaderContentAlignment[1]
Navigation.HeaderElements Controls.HeaderElements
Navigation.ItemHeaderPlacement Controls.ItemHeaderPlacement
Navigation.ItemHeaderTappedEventArgs Controls.ItemHeaderTappedEventArgs
Navigation.Position Controls.HeaderContentPosition[1]
Navigation.TabHeaderUnitType Controls.TabHeaderUnitType
Navigation.TabItem Controls.TabItem
Navigation.TabItemLengthUnitType Controls.TabItemLengthUnitType
Navigation.TabView Controls.TabView
Navigation.TabViewItem Controls.TabViewItem

The table below lists types available in the DevExpress.XamarinForms.Popup namespace and their .NET MAUI counterparts.

Note

All types from the DevExpress.XamarinForms.Popup namespace now belong to the DevExpress.Maui.Controls namespace.

Xamarin.Forms Type .NET MAUI Type
Popup.DXPopup Controls.DXPopup
Popup.Placement Core.Placement
Popup.PopupHorizontalAlignment Controls.PopupHorizontalAlignment
Popup.PopupVerticalAlignment Controls.PopupVerticalAlignment

#Data Editors

The table below lists types available in the DevExpress.XamarinForms.Editors namespace and their .NET MAUI counterparts.

Note

Certain types from the DevExpress.XamarinForms.Editors namespace now belong to the DevExpress.Maui.Controls namespace.

Xamarin.Forms Type .NET MAUI Type
CalendarCellStyle CalendarCellAppearance[2]
CalendarDayCellStyle CalendarDayCellAppearance[2]
CalendarDayOfWeekCellStyle CalendarDayOfWeekCellAppearance[2]
CalendarHeaderStyle CalendarHeaderAppearance[2]
CalendarMonthCellStyle CalendarMonthCellAppearance[2]
CalendarSelectableCellStyle CalendarSelectableCellAppearance[2]
CalendarYearCellStyle CalendarYearCellAppearance[2]
Editors.CornerMode Core.CornerMode
CustomDayOfWeekCellStyleEventArgs CustomDayOfWeekCellAppearanceEventArgs[2]
CustomSelectableCellStyleEventArgs CustomSelectableCellAppearanceEventArgs[2]
Editors.FilterMode Core.DataFilterCondition[3]
Editors.IconHorizontalPosition Controls.IconHorizontalPosition
Editors.IconVisibility Core.IconVisibility
Editors.Localization.EditorsLocalizer Editors.EditorLocalizer[4]
Editors.SimpleButton Core.DXButton

#Data Grid

The table below lists types available in the DevExpress.XamarinForms.DataGrid namespace and their .NET MAUI counterparts.

Xamarin.Forms Type .NET MAUI Type
CellStyle CellAppearance[2]
ColumnHeaderStyle ColumnHeaderAppearance[2]
CustomCellStyleEventArgs CustomCellAppearanceEventArgs[2]
CustomSummaryProcess DataSummaryProcess[3]
DataGridValidationEventArgs ValidateCellEventArgs[3]
GridColumnDataEventArgs CustomUnboundDataEventArgs[3]
GridLocalizerExtension GridLocalizer[4]
GroupRowStyle GroupRowAppearance[2]
RowAllowEventArgs CancelRowEventArgs[3]
RowStyleBase CellAppearanceBase[2]
StyleBase AppearanceBase[2]
SummaryType DataSummaryType[3]
SwipeItemEventArgs SwipeItemShowingEventArgs[3]
SwipeItemStyle SwipeItemAppearance[2]
TotalSummaryStyle TotalSummaryAppearance[2]

#Charts

The table below lists types available in the DevExpress.XamarinForms.Charts namespace and their .NET MAUI counterparts.

Xamarin.Forms Type .NET MAUI Type
ChartBaseView ChartBaseView[5]

#Scheduler

The table below lists types available in the DevExpress.XamarinForms.Scheduler namespace and their .NET MAUI counterparts.

Xamarin.Forms Type .NET MAUI Type
AllDayAreaCellStyle AllDayAreaCellAppearance[2]
AppointmentStyle AppointmentAppearance[2]
CellStyle SchedulerCellAppearance[2]
DayViewCellStyle DayViewCellAppearance[2]
DayViewHeaderItemStyle DayViewHeaderItemAppearance[2]
HeaderItemStyle HeaderItemAppearance[2]
ItemStyle AppearanceBase[2]
SchedulerLocalizer SchedulerLocalizer[4]
MonthViewCellStyle MonthViewCellAppearance[2]
MonthViewHeaderItemStyle MonthViewHeaderItemAppearance[2]
TextStyle Members of this class and its descendants are now stored in the Appearance class of the Scheduler elements.[2]
TimeIndicatorStyle TimeIndicatorAppearance[2]
TimeRulerCellStyle TimeRulerCellAppearance[2]
TimeRulerHeaderStyle TimeRulerHeaderAppearance[2]

#Step 4: Address Breaking API Changes

To migrate your application from the DevExpress Xamarin.Forms Controls to DevExpress .NET MAUI Controls, you need to address the following breaking API changes:

See Also