Migrate from Xamarin.Forms SfParallaxView to .NET MAUI SfParallaxView

18 Mar 20241 minute to read

The SfParallaxView is created from scratch using the upgraded APIs and performance of the .NET MAUI graphics library and framework layouts. However, to maintain the consistency of the API naming in MAUI SfParallaxView, we renamed some of the APIs. The APIs changed in MAUI SfParallaxView from Xamarin SfParallaxView are detailed as follows:

Namespaces

Xamarin .NET MAUI
Syncfusion.XForms.ParallaxView
Syncfusion.Maui.ParallaxView

To make the migration easier, the most of the APIs from the Xamarin SfParallaxView were kept in the .NET MAUI SfParallaxView. Please refer to the following details and the API migration information available below.

Initialize control

To initialize the control, import the parallax view namespace and Initialize SfParallaxView as shown in the following code sample.

Xamarin
<ContentPage
    . . .
    xmlns:parallax="clr-namespace:Syncfusion.XForms.ParallaxView;assembly=Syncfusion.XForms.ParallaxView">

    <parallax:SfParallaxView/>

</ContentPage>
using Syncfusion.XForms.ParallaxView;
...

SfParallaxView parallax = new SfParallaxView();
this.Content = parallax;
.NET MAUI
<ContentPage
    . . .    
    xmlns:parallax="clr-namespace:Syncfusion.Maui.ParallaxView;assembly=Syncfusion.Maui.ParallaxView">

    <parallax:SfParallaxView/>

</ContentPage>
using Syncfusion.Maui.ParallaxView;
. . .
SfParallaxView parallax = new SfParallaxView();
this.Content = parallax;

Classes

Namespace Class
Syncfusion.Maui.ParallaxView SfParallaxView
Syncfusion.Maui.Core ParallaxScrollingEventArgs
Xamarin .NET MAUI Description
SfParallaxView SfParallaxView SfParallaxView control provides scrolling for any control that implements the IParallaxView.
ParallaxScrollingEventArgs ParallaxScrollingEventArgs Defines the scrolling Event args

Interface

Namespace Interface
Syncfusion.Maui.Core IParallaxView
Xamarin .NET MAUI Description
IParallaxView IParallaxView Defines a event and a property to perform parallax scrolling.

Enums

Namespace Enums
Syncfusion.Maui.ParallaxView Orientation
Xamarin .NET MAUI Description
Orientation Orientation Defines the orientation of the view

API Migration

Parallax View

The following table illustrates the API migration for the parallax view.

Xamarin .NET MAUI
Content Content
Source Source
Speed Speed
Orientation Orientation
Scrolling Scrolling
ScrollX ScrollX
ScrollY ScrollY
CanAnimate CanAnimate
ScrollContentSize ScrollContentSize

Support and feedback

If you are unable to find the migration information you require in the self-help resources listed above, please contact us by creating a support ticket. If you don’t find what you need, please request it from our feedback portal.