Search code examples
mvvmxamarin.formsxamarin.forms.labs

Activity Indicator in Xamarin.Forms.Labs


I am using Xamarin.Forms and Xamarin.Forms.Labs 1.2.1 and it's MVVM framework. If I set the IsBusy property of my model view to true to display activity(long-process) indicator, I see indicator on toolbar. How can I display of the activity indicator in the middle of my content page? I don't like to add ActivityIndicator explicitly on my Xaml page and bind with custom IsLoading property of view model. But when I set IsBusy property of my view model to true, it displays indicator on toolbar.


Solution

  • Page.IsBusy is only responsible for status bar indicator. So if you need progress ring in the middle of your page put ActivityIndicator on it. You can use AbsoluteLayout to adjust position. XAML should be like this:

    <ActivityIndicator AbsoluteLayout.LayoutFlags="PositionProportional" LayoutBounds="0.5, 0.5, AutoSize, AutoSize" />