Example #1
0
 private void listView_PullProgressChanged(object sender, RefreshableListView.RefreshProgressEventArgs e)
 {
     if (e.IsRefreshable)
     {
         if (e.PullProgress == 1)
         {
             // Progress = 1.0 means that the refresh has been triggered.
             if (SpinnerStoryboard.GetCurrentState() == Windows.UI.Xaml.Media.Animation.ClockState.Stopped)
             {
                 SpinnerStoryboard.Begin();
             }
         }
         else if (SpinnerStoryboard.GetCurrentState() != Windows.UI.Xaml.Media.Animation.ClockState.Stopped)
         {
             SpinnerStoryboard.Stop();
         }
         else
         {
             // Turn the indicator by an amount proportional to the pull progress.
             SpinnerTransform.Angle = e.PullProgress * 360;
         }
     }
 }
Example #2
0
 public static void StartSpinning()
 {
     SpinnerStoryboard.Begin();
     SpinnerGrid.Visibility = Visibility.Visible;
     SpinnerActive          = true;
 }