コード例 #1
0
        public static void PrepareStoryboard(Storyboard storyboard, AnimationProgress progress, string propertyName)
        {
            Timeline timeline = CreateTimeline();

            Storyboard.SetTarget(timeline, progress);
            Storyboard.SetTargetProperty(timeline, new PropertyPath(propertyName));
            storyboard.Children.Add(timeline);
            storyboard.BeginTime = TimeSpan.Zero;
        }
コード例 #2
0
        static void ProgressPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            AnimationProgress animationProgress = d as AnimationProgress;

            if (animationProgress != null)
            {
                animationProgress.RaiseProgressChanged();
            }
        }
コード例 #3
0
 public PhotoGalleryControl()
 {
     DefaultStyleKey = typeof(PhotoGalleryControl);
     progress        = new AnimationProgress(this);
 }