Forum Xamarin.Forms

Announcement:

The Xamarin Forums have officially moved to the new Microsoft Q&A experience. Microsoft Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

To create new threads and ask questions head over to Microsoft Q&A for .NET and get involved today.

Is there the Indeterminate attribute for the ProgressBar in Xamarin.Forms?

DariushMoshiriDariushMoshiri ITMember
edited April 2015 in Xamarin.Forms

Hi all,

I would like to understand how to create a indeterminate progressbar in Xamarin.Forms since I haven't foud the Indeterminate property.

Thanks in advance

Answers

  • laygrlaygr MXMember, University

    If the provided ProgressBar doesn't support indeterminate progress, you will have to roll your own with a custom renderer. It's not very hard.

  • curtis.ehrhartcurtis.ehrhart USMember ✭✭

    any tips on how? Currently I have

    pbProgress.Animate("SetProgress", (arg) => { pbProgress.Progress = arg; }, 100, 10000, Easing.Linear, null, null);

    I know the last one is for repeat, but I have no idea how to

    [System.Func<bool.> repeat = null]

    My Android prototype had a circular one, but I'm not sure how to achieve the same thing in a cross app version.

  • BrunoSerranoBrunoSerrano BRMember ✭✭
    edited September 2016

    You can use the ActivityIndicator.

  • Rasheed_ITLecRasheed_ITLec USMember ✭✭

    Here is the Easiest Way To Implement #ProgressBar Inside #Xamarin.Forms Using #NuGet By #ITLec

    http://www.itlec.com/2017/08/easiest-way-to-implement-progress-bar-xamarin.html

  • ruisantosruisantos USMember

    I doing that way

       private void OnBufferProgressBarPropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
        {
            switch (e.PropertyName)
            {
                case nameof(ProgressBar.IsVisible):
                    OnBufferProgressBarVisibilityChanged();
                    break;
            }
        }
    
        private async void OnBufferProgressBarVisibilityChanged()
        {
            while (bufferProgressBar.IsVisible)
            {
                bufferProgressBar.Rotation = 0;
                await bufferProgressBar.ProgressTo(1, 1500, Easing.Linear);
    
                bufferProgressBar.Rotation = 180;
                await bufferProgressBar.ProgressTo(0, 1500, Easing.Linear);
    
                await Task.Yield();
            }
    
            bufferProgressBar.CancelAnimations();
        }
    
Sign In or Register to comment.