Beispiel #1
0
        private void IsActivePropertyChanged(DependencyPropertyChangedEventArgs args)
        {
            if ((bool)args.NewValue)
            {
                if (Windows.Foundation.Metadata.ApiInformation.IsTypePresent("Windows.UI.Xaml.Media.Animation.RepeatBehavior"))
                {
                    DownloadingStory.RepeatBehavior = RepeatBehavior.Forever;
                }

                this.Visibility = Visibility.Visible;

                switch (Direction)
                {
                case AnimationDirection.Downloading:
                    StartDownloadAnimation();
                    break;

                case AnimationDirection.Uploading:
                    StartUploadAnimation();
                    break;

                default:
                    StartDownloadAnimation();
                    break;
                }
            }
            else
            {
                this.Visibility = Visibility.Collapsed;
                DownloadingStory.Stop();
            }
        }
Beispiel #2
0
        private void StartUploadAnimation()
        {
            if (DownloadingStory.GetCurrentState() == ClockState.Active)
            {
                DownloadingStory.Stop();
            }

            UploadingStory.RepeatBehavior = RepeatBehavior.Forever;
            UploadingStory.BeginTime      = TimeSpan.Zero;
            UploadingStory.Begin();
        }