Xamarin.Forms Guides | Samples

Xamarin.Forms.ProgressBar Class

A View control that displays progress.

See Also: ProgressBar

Syntax

[Xamarin.Forms.RenderWith(typeof(Xamarin.Forms.Platform._ProgressBarRenderer))]
public class ProgressBar : View, IElementConfiguration<ProgressBar>

Remarks

The following example shows the usage of a ProgressBar.

C# Example


//initial progress is 20%
var progressBar = new ProgressBar {
  Progress = .2,
};

// animate the progression to 80%, in 250ms
await progressBar.ProgressTo (.8, 250, Easing.Linear);

Debug.WriteLine ("Animation completed");

XAML for Xamarin.Forms supports the following property for the ProgressBar class:

PropertyValue
Progress

A decimal value between 0 and 1, inclusive, that specifies the fraction of the bar that is colored.

Requirements

Namespace: Xamarin.Forms
Assembly: Xamarin.Forms.Core (in Xamarin.Forms.Core.dll)
Assembly Versions: 1.0.0.0, 1.1.0.0, 1.2.0.0, 1.3.0.0, 1.4.0.0, 1.5.0.0, 2.0.0.0

The members of Xamarin.Forms.ProgressBar are listed below.

See Also: View

Public Constructors

Initializes a new instance of the ProgressBar class

Public Fields

static readonly
ProgressPropertyBindableProperty. Identifies the Progress bindable property.

Public Properties

ProgressDouble. Gets or sets the progress value. This is s bindable property.

Public Methods

On<T>() : IPlatformElementConfiguration<T, ProgressBar>
Returns the platform-specific instance of this ProgressBar, on which a platform-specific method may be called.
ProgressTo(Double, UInt32, Easing) : System.Threading.Tasks.Task<bool>
Animate the Progress property to value.