Animation in .NET MAUI Linear ProgressBar (SfLinearProgressBar)

The linear progress bar provides animation support to visualize the progress value changes in an interactive way.

The following properties are used to define the duration of animation for the specific states.

Easing effects

The AnimationEasing property allows you specify the transfer function that controls animation speed when they run.

The following code sample demonstrates the CubicInOut easing function of the linear progress bar.

<progressBar:SfLinearProgressBar Progress="75" 
                                 AnimationEasing="{x:Static Easing.CubicInOut}" />
SfLinearProgressBar linearProgressBar = new SfLinearProgressBar();
linearProgressBar.Progress = 75;
linearProgressBar.AnimationEasing = Easing.CubicInOut;
this.Content = linearProgressBar;

.NET MAUI Linear ProgressBar with CubicInOut animation

The SetProgress() method in the progress bar is used to set progress value along with animation duration and easing effect applicable for the specific method call.

  • C#
  • void SetProgress(double progress, double? animationDuration = null, Easing? easing = null)

    NOTE

    The animation duration and easing effect parameters will not affect the configuration of the AnimationDuration and AnimationEasing properties.

    Indeterminate Easing Effects

    The IndeterminateAnimationEasing property allows you to specify a transfer function for indeterminate state, which controls animation speed when they run.

    The following code sample demonstrates the BounceIn easing function of the linear progress bar.

    <progressBar:SfLinearProgressBar IsIndeterminate="True" 
                                     IndeterminateAnimationEasing="{x:Static Easing.BounceIn}" />
    SfLinearProgressBar linearProgressBar = new SfLinearProgressBar();
    linearProgressBar.IsIndeterminate = true;
    linearProgressBar.IndeterminateAnimationEasing = Easing.BounceIn;
    this.Content = linearProgressBar;

    .NET MAUI Linear ProgressBar with indeterminate animation

    NOTE

    Refer to our .NET MAUI Linear ProgressBar feature tour page for its groundbreaking feature representations. Also explore our .NET MAUI Linear ProgressBar example that shows how to configure a SfLinearProgressBar in .NET MAUI.