title: How do you show the loading animation for windows phone 8.1 universal store apps?
body: <p>When performing an async function to either get local data, access a file, or call an API, how do you trigger the loading animation during this, possibly, long routine?</p>
  
  <p>Here's an example:</p>
  
  <pre><code>&lt;Button onClick="Button_Click" /&gt;
  
  public async void Button_Click(object sender, RoutedEventArgs e)
  {
      var myData = await MyDataManager.GetMyData();
      await new MessageDiaglog("Data Loaded!").ShowAsync();
  }
  </code></pre>
  
  <p>Since it's a universal store app, I assume it should work the same in both windows 8.1 and windows phone 8.1.</p>
  
  <p><strong>UPDATE FROM SOLUTION</strong></p>
  
  <p>Per igrali answer, I updated my code for future reference:</p>
  
  <pre><code>&lt;ProgressBar x:Name="LoadingBar" Visibility="Collapsed" IsEnabled="False" IsIndeterminate="true" Height="4" HorizontalAlignment="Stretch"/&gt;
  &lt;Button onClick="Button_Click" /&gt;
  
  public async void Button_Click(object sender, RoutedEventArgs e)
  {
      LoadingBar.IsEnabled = true;
      LoadingBar.Visibility = Visibility.Visible;
      var myData = await MyDataManager.GetMyData();
      await new MessageDiaglog("Data Loaded!").ShowAsync();
      LoadingBar.IsEnabled = false;
      LoadingBar.Visibility = Visibility.Collapsed;
  }
  </code></pre>
  
  <p>This code will work on both the Phone and Tablet.</p>