3
votes

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.

1
can you post your xaml or code which you have written for showing ActivityIndicator? - SoftSan
there is nothing special. [ViewType(typeof(LoginPage))] public class LoginViewModel : ViewModel{...} - it's my viewmodel. Here is inherited IsBusy property which I set to true or false to show/hide indicator. In Xaml I do nothing, I mean, I don't add own ActivityIndicator. But when I set IsBusy=true in Command handler, this "embedded" indicator is shown on right-top of screen. Why actually this place and how to change? - lapsick

1 Answers

2
votes

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" />