Migrate from Xamarin.Forms SfStepProgressBar to MAUI SfStepProgressBar

27 May 20243 minutes to read

To make the migration from the Xamarin SfStepProgressBar to .NET MAUI SfStepProgressBar easier, most of the APIs from the Xamarin SfStepProgressBar were kept in the .NET MAUI SfStepProgressBar. However, to maintain the consistency of API naming in the .NET MAUI SfStepProgressBar, some of the APIs have been renamed. Find the difference in the following topics.

Namespaces

Xamarin SfStepProgressBar .NET MAUI SfStepProgressBar
Syncfusion.XForms.ProgressBar Syncfusion.Maui.ProgressBar

Initialize control

To initialize the control, import the step progressbar namespace and initialize SfStepProgressBar as shown in the following code sample.

Xamarin SfStepProgressBar .NET MAUI SfStepProgressBar
<ContentPage
xmlns:progressBar="clr-namespace:Syncfusion.XForms.ProgressBar;assembly=Syncfusion.SfProgressBar.XForms">

    <progressBar:SfStepProgressBar />

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

SfStepProgressBar sfStepProgressBar = new SfStepProgressBar ();
this.Content = sfStepProgressBar ;
<ContentPage
xmlns:progressBar="clr-namespace:Syncfusion.Maui.ProgressBar;assembly=Syncfusion.Maui.ProgressBar">

    <progressBar:SfStepProgressBar />

</ContentPage>
using Syncfusion.Maui.ProgressBar;
...

SfStepProgressBar stepProgressBar = new SfStepProgressBar();
this.Content = stepProgressBar ;

Classes

Xamarin SfStepProgressBar .NET MAUI SfStepProgressBar Description

SfStepProgressBar

SfStepProgressBar

Represents a class which holds the step progressbar common properties in SfStepProgressBar.

StepView

StepProgressBarItem

Represents a class which is used to customize the step progress bar item.

IStepStyle

StepSettings

Represents a class which is used to customize the style of the step view.

StepTappedEventArgs

StepTappedEventArgs

Represents a class which is used to hold the step tapped event arguments.

StatusChangedEventArgs

StepStatusChangedEventArgs

Represents a class which is used to hold the status changed event arguments.

Properties

SfStepProgressBar

The following code example, explains how to initialize the properties of the Xamarin SfStepProgressBar and .NET MAUI SfStepProgressBar class.

Xamarin SfStepProgressBar .NET MAUI SfStepProgressBar Description

CompletedStepStyle

CompletedStepSettings

Gets or sets the completed step settings for the step progressbar.

InProgressStepStyle

InProgressStepSettings

Gets or sets the in progress step settings for the step progressbar.

NotStartedStepStyle

NotStartedStepSettings

Gets or sets the not started step settings for the step progressbar.

Orientation

Orientation

Gets or sets the orientation.

ProgressAnimationDuration

ProgressAnimationDuration

Gets or sets the progress animation duration.

TitleAlignment

LabelPosition

Gets or sets the label position for the step progress bar.

TitleSpace

LabelSpacing

Gets or sets the label spacing.

LayoutOption

Nil Not Supported.

MarkerSize

StepSize

Gets or sets the size of the step.

MarkerStrokeWidth

StepStrokeWidth

Gets or sets the stroke width of the step.

StepSettings

Xamarin SfStepProgressBar .NET MAUI SfStepProgressBar Description

FontAttributes

FontAttributes(From TextStyle property of StepSettings class)

Gets or sets the font attributes of the text style which is used to customize the primary and secondary text.

FontColor

TextColor(From TextStyle property of StepSettings class)

Gets or sets the text color of the text style which is used to customize the primary and secondary text.

FontFamily

FontFamily(From TextStyle property of StepSettings class)

Gets or sets the font family of the text style which is used to customize the primary and secondary text.

FontSize

FontSize(From TextStyle property of StepSettings class)

Gets or sets the font size of the text style which is used to customize the primary and secondary text.

GapWidth

Nil Not Supported.

MarkerContentFillColor

ContentFillColor

Gets or sets the content fill color of the step.

MarkerContentSize

StepContentSize(From SfStepProgressBar class)

Gets or sets the content size of the step.

MarkerContentType

ContentType

Gets or sets the content type of the step.

MarkerFillColor

Background

Gets or sets the background color of the step.

MarkerShapeType

ShapeType

Gets or sets the shape type of the step.

MarkerStrokeColor

Stroke

Gets or sets the stroke color of the step.

ProgressLineColor

ProgressColor

Gets or sets the track color of the progress line.

TrackColor

ProgressBarBackground

Gets or sets the progress background color of the progress line.

StepProgressBarItem

Xamarin SfStepProgressBar .NET MAUI SfStepProgressBar Description

ImageSource

ImageSource

Gets or sets the image source of the step.

PrimaryText

PrimaryText

Gets or sets the primary text of the step.

SecondaryText

SecondaryText

Gets or sets the secondary text of the step.

PrimaryFormattedText

PrimaryFormattedText

Gets or sets the primary formatted text of the step.

SecondaryFormattedText

SecondaryFormattedText

Gets or sets the secondary formatted text of the step.

ProgressValue

ActiveStepProgressValue

Gets or sets the progress value of the step.

Status

Nil By using ActiveStepIndex and ActiveStepProgressValue property, we can achieve the desired step status.

Enums

Xamarin SfStepProgressBar .NET MAUI SfStepProgressBar Description

StepTitleAlignment

LabelPosition

Defines the label text alignment for the SfStepProgressBar.

StepContentType

StepContentType

Defines the step content type for the SfStepProgressBar.

StepOrientation

StepProgressBarOrientation

Defines the step progressbar layout orientation for the SfStepProgressBar.

StepShapeType

StepShapeType

Defines the step shape type for the SfStepProgressBar.

StepStatus

StepStatus

Defines the step status for the SfStepProgressBar.

StepLayoutOptions

Nil Not Supported.

Events

Xamarin SfStepProgressBar .NET MAUI SfStepProgressBar Description

StepTapped

StepTapped

Occurs whenever the progressbar step is tapped.

StatusChanged

StepStatusChanged

Occurs whenever the step status is changed.

Upcoming Features

  • Mapping support
  • Template support