|
| 1 | +--- |
| 2 | +layout: post |
| 3 | +title: Animation in .NET MAUI Circular ProgressBar control | Syncfusion<sup>®</sup> |
| 4 | +description: Learn here all about animation support in Syncfusion<sup>®</sup> .NET MAUI Circular ProgressBar control, its elements and more. |
| 5 | +platform: MAUI |
| 6 | +control: SfCircularProgressBar |
| 7 | +documentation: ug |
| 8 | +--- |
| 9 | + |
| 10 | +# Animation in .NET MAUI Circular ProgressBar (SfCircularProgressBar) |
| 11 | + |
| 12 | +The circular progress bar provides animation support to visualize the progress value changes in an interactive way. |
| 13 | + |
| 14 | +The following properties are used to define the duration of animation for the specific states. |
| 15 | + |
| 16 | +* [`AnimationDuration:`](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.ProgressBar.ProgressBarBase.html#Syncfusion_Maui_Toolkit_ProgressBar_ProgressBarBase_AnimationDuration) Represents animation duration of the determinate state’s progress indicator. |
| 17 | +* [`IndeterminateAnimationDuration:`](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.ProgressBar.ProgressBarBase.html#Syncfusion_Maui_Toolkit_ProgressBar_ProgressBarBase_IndeterminateAnimationDuration) Represents animation duration of the indeterminate state’s indicator. |
| 18 | + |
| 19 | +## Easing effects |
| 20 | + |
| 21 | +The [`AnimationEasing`](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.ProgressBar.ProgressBarBase.html#Syncfusion_Maui_Toolkit_ProgressBar_ProgressBarBase_AnimationEasing) property allows you specify the transfer function that controls animation speed when they run. |
| 22 | + |
| 23 | +The following code sample demonstrates the `CubicInOut` easing function of the circular progress bar. |
| 24 | + |
| 25 | +{% tabs %} |
| 26 | + |
| 27 | +{% highlight xaml %} |
| 28 | + |
| 29 | +<progressBar:SfCircularProgressBar Progress="75" |
| 30 | + AnimationEasing="{x:Static Easing.CubicInOut}"/> |
| 31 | + |
| 32 | +{% endhighlight %} |
| 33 | + |
| 34 | +{% highlight c# %} |
| 35 | + |
| 36 | +SfCircularProgressBar circularProgressBar = new SfCircularProgressBar(); |
| 37 | +circularProgressBar.Progress = 75; |
| 38 | +circularProgressBar.AnimationEasing = Easing.CubicInOut; |
| 39 | +this.Content = circularProgressBar; |
| 40 | + |
| 41 | + |
| 42 | +{% endhighlight %} |
| 43 | + |
| 44 | +{% endtabs %} |
| 45 | + |
| 46 | + |
| 47 | + |
| 48 | +The [`SetProgress()`](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.ProgressBar.ProgressBarBase.html#Syncfusion_Maui_Toolkit_ProgressBar_ProgressBarBase_SetProgress_System_Double_System_Nullable_System_Double__Microsoft_Maui_Easing_) method in the progress bar is used to set progress value along with animation duration and easing effect applicable for the specific method call. |
| 49 | + |
| 50 | +{% highlight c# %} |
| 51 | + |
| 52 | +void SetProgress(double progress, double? animationDuration = null, Easing? easing = null) |
| 53 | + |
| 54 | +{% endhighlight %} |
| 55 | + |
| 56 | +N> The animation duration and easing effect parameters will not affect the configuration of the [`AnimationDuration`](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.ProgressBar.ProgressBarBase.html#Syncfusion_Maui_Toolkit_ProgressBar_ProgressBarBase_AnimationDuration) and [`AnimationEasing`](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.ProgressBar.ProgressBarBase.html#Syncfusion_Maui_Toolkit_ProgressBar_ProgressBarBase_AnimationEasing) properties. |
| 57 | + |
| 58 | +## Indeterminate Easing Effects |
| 59 | + |
| 60 | +The [`IndeterminateAnimationEasing`](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.ProgressBar.ProgressBarBase.html#Syncfusion_Maui_Toolkit_ProgressBar_ProgressBarBase_IndeterminateAnimationEasing) property allows you to specify a transfer function for indeterminate state, which controls animation speed when they run. |
| 61 | + |
| 62 | +The following code sample demonstrates the `BounceIn` easing function of the circular progress bar. |
| 63 | + |
| 64 | +{% tabs %} |
| 65 | + |
| 66 | +{% highlight xaml %} |
| 67 | + |
| 68 | +<progressBar:SfCircularProgressBar IsIndeterminate="True" |
| 69 | + IndeterminateAnimationEasing="{x:Static Easing.BounceIn}" /> |
| 70 | + |
| 71 | +{% endhighlight %} |
| 72 | + |
| 73 | +{% highlight c# %} |
| 74 | + |
| 75 | +SfCircularProgressBar circularProgressBar = new SfCircularProgressBar(); |
| 76 | +circularProgressBar.IsIndeterminate = true; |
| 77 | +circularProgressBar.IndeterminateAnimationEasing = Easing.BounceIn; |
| 78 | +this.Content = circularProgressBar; |
| 79 | + |
| 80 | +{% endhighlight %} |
| 81 | + |
| 82 | +{% endtabs %} |
| 83 | + |
| 84 | + |
0 commit comments