Esempio n. 1
0
        private static void OnTimeChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            AnimationImage obj = (AnimationImage)d;

            if (obj.Time != 300)
            {
                obj.dispatcherTimer.Interval = TimeSpan.FromMilliseconds(obj.Time);
            }
        }
Esempio n. 2
0
        private static void OnImagePathChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            AnimationImage obj = (AnimationImage)d;

            if (obj.ImagePath != null)
            {
                BitmapImage _BitmapImage = new BitmapImage();
                _BitmapImage.BeginInit();
                _BitmapImage.UriSource = new Uri(obj.ImagePath + "1.png", UriKind.Relative);
                obj.Source             = _BitmapImage;
                _BitmapImage.EndInit();
            }
        }