title: Xamarin Forms Activity Indicator not showing
body: <p>I'm developing a Xamarin Forms application. I want to show an ActivityIndicator while getting data &amp; binding it to a ListView control from web API. In my code, ActivityIndicator doesn't show at all. I'm using Visual Studio 2017 with Xamarin 4.10. </p>
  
  <p>Following is my code.</p>
  
  <p><strong>Code Behind</strong></p>
  
  <pre><code>[XamlCompilation(XamlCompilationOptions.Compile)]
  public partial class TestPage : ContentPage
  {
      private SfListView listView;
      private ActivityIndicator activityIndicator;
  
      public TestPage()
      {
          InitializeComponent();
  
          StackLayout mainStackLayout = new StackLayout();
  
          activityIndicator = new ActivityIndicator()
          {
              IsRunning = true,
              IsEnabled = true,
              IsVisible = true
          };
          listView = new SfListView()
          {
              SelectionMode = SelectionMode.None,
              BackgroundColor = Color.White
          };
  
          mainStackLayout.Children.Add(activityIndicator);
          mainStackLayout.Children.Add(listView);
  
          this.Content = mainStackLayout;
          this.Title = "Dashboard";
      }
  
      protected override void OnAppearing()
      {
          SummaryRepository viewModel = new SummaryRepository();
  
          listView.ItemsSource = viewModel.Summary;
          listView.ItemTemplate = new DataTemplate(() =&gt;
          {
              var grid = new Grid();
  
              var bookName = new Label
              {
                  BackgroundColor = Color.White,
                  FontSize = 16,
                  TextColor = Color.FromHex("#1A237E")
              };
              var bookDescription = new Label
              {
                  BackgroundColor = Color.White,
                  FontSize = 16,
                  HorizontalTextAlignment = TextAlignment.End,
                  TextColor = Color.FromHex("#EC407A")
              };
  
              bookName.SetBinding(Label.TextProperty, new Binding("Name"));
              bookDescription.SetBinding(Label.TextProperty, new Binding("Amount"));
  
              grid.Children.Add(bookName);
              grid.Children.Add(bookDescription, 1, 0);
  
              return grid;
          });
  
          activityIndicator.IsRunning = false;
  
          base.OnAppearing();
      }
  }
  </code></pre>
  
  <p><strong>XAML File</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt;
  &lt;ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
           xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
           x:Class="eWallet.Pages.TestPage"&gt;
  &lt;ContentPage.Content&gt;
      &lt;StackLayout&gt;
  
      &lt;/StackLayout&gt;
  &lt;/ContentPage.Content&gt;
  </code></pre>
  
  <p></p>
  
  <p>Any help is highly appreciated.</p>