Migrate from Xamarin.Forms SfExpander to .NET MAUI SfExpander

16 Jul 20261 minute to read

Migrating from Xamarin.Forms SfExpander to .NET MAUI SfExpander is straightforward because many APIs remain familiar. However, to align with .NET MAUI naming conventions and API consistency, some namespaces, properties, and enums have been renamed.

This topic documents the API changes currently identified for SfExpander migration. If an API is not listed here, it is either unchanged or not currently documented as changed.

Namespaces

Xamarin.Forms SfExpander .NET MAUI SfExpander
Syncfusion.XForms.Expander Syncfusion.Maui.Expander

Properties

NOTE

The DynamicSizeMode property available in Xamarin.Forms SfExpander is not supported in .NET MAUI SfExpander. Use the default layout and sizing behavior provided by the MAUI control.

Important: Before migrating your code, ensure that the Syncfusion .NET MAUI Expander package is installed and that your application targets a supported .NET MAUI version.

Xamarin.Forms SfExpander .NET MAUI SfExpander Description

HeaderBackgroundColor

HeaderBackground

Gets or sets the background appearance of the expander header.

IconColor

HeaderIconColor

Gets or sets the color of the expander header icon.

Enums

Xamarin.Forms SfExpander .NET MAUI SfExpander Description

IconPosition

ExpanderIconPosition

Specifies the position of the expander icon within an SfExpander control.

AnimationEasing

ExpanderAnimationEasing

Specifies the easing function used for expander animations.

NOTE

The enum types have been renamed in .NET MAUI. When migrating, verify the enum member names used in your application and update them if required. Refer to the API reference documentation for the complete list of available enum members.

Events and methods

At the time of writing, no additional events or methods renames are documented for SfExpander migration. If your application uses events, commands, behaviors, or custom styling, verify those APIs against the corresponding .NET MAUI documentation during migration.

Summary

The primary migration changes for SfExpander involve:

  • Namespace change from Syncfusion.XForms.Expander to Syncfusion.Maui.Expander.
  • Property rename:
    • HeaderBackgroundColorHeaderBackground
    • IconColorHeaderIconColor
  • Enum rename:
    • IconPositionExpanderIconPosition
    • AnimationEasingExpanderAnimationEasing
  • Removal of the DynamicSizeMode property.

Review and update these APIs during migration to ensure a smooth transition to .NET MAUI SfExpander.