Example #1
0
		public WpfSpinButton ()
		{
			Width = 25;
			Height = 25;
			Background = new SolidColorBrush (Colors.Transparent);
			Storyboard = new Storyboard { RepeatBehavior = RepeatBehavior.Forever, Duration = TimeSpan.FromMilliseconds (Duration) };

			for (int i = 0; i < 360; i += 30) {
				// Create the rectangle and centre it in our widget
				var rect = new WpfRectangle { Width = 2, Height = 8, Fill = new SolidColorBrush (Colors.Black), RadiusX = 1, RadiusY = 1, Opacity = Values[0] };
				WpfCanvas.SetTop (rect, (Height - rect.Height) / 2);
				WpfCanvas.SetLeft (rect, Width / 2);

				// Rotate the element by 'i' degrees, creating a circle out of all the elements
				var group = new TransformGroup ();
				group.Children.Add (new RotateTransform (i, 0.5, -6));
				group.Children.Add (new TranslateTransform (0, 10));
				rect.RenderTransform = group;

				// Set the animation
				var timeline = new DoubleAnimationUsingKeyFrames ();
				Storyboard.SetTarget (timeline, rect);
				Storyboard.SetTargetProperty (timeline, new PropertyPath ("Opacity"));

				var offset = Duration * (i / 360.0);
				for (int j = 0; j < StartTimes.Length; j++) {
					var start = (StartTimes[j] + offset) % Duration;
					timeline.KeyFrames.Add (new EasingDoubleKeyFrame { KeyTime = KeyTime.FromTimeSpan (TimeSpan.FromMilliseconds (start)), Value = Values[j] });
				}
				Storyboard.Children.Add (timeline);
				Children.Add (rect);
			}
		}
        public static DoubleAnimationUsingKeyFrames CreateAnim(this Storyboard sb, DependencyObject target,
            string propertyPath, IEasingFunction easing, double value, TimeSpan keyTime)
        {
            var doubleAnim = (from anim in sb.Children.OfType<DoubleAnimationUsingKeyFrames>()
                     where GetSBExtTarget(anim) == target
                     let prop = Storyboard.GetTargetProperty(anim)
                     where prop.Path == propertyPath
                     select anim).FirstOrDefault();

            if (doubleAnim == null)
            {
                doubleAnim = new DoubleAnimationUsingKeyFrames();
                SetSBExtTarget(doubleAnim, target);
                Storyboard.SetTarget(doubleAnim, target);
                Storyboard.SetTargetProperty(doubleAnim, new System.Windows.PropertyPath(propertyPath));
                sb.Children.Add(doubleAnim);
            }

            EasingDoubleKeyFrame kf = new EasingDoubleKeyFrame();
            kf.EasingFunction = easing;
            kf.KeyTime = keyTime;
            kf.Value = value;
            doubleAnim.KeyFrames.Add(kf);

            return doubleAnim;
        }
        public static void PlayControlAnimation(UIElement controlToAnimate, double factor)
        {
            Storyboard story = new Storyboard();

            //stretch horizontally
            DoubleAnimationUsingKeyFrames scaleXAnimation = new DoubleAnimationUsingKeyFrames();
            scaleXAnimation.BeginTime = TimeSpan.FromMilliseconds(0);
            scaleXAnimation.KeyFrames.Add(CreateFrame(factor, 100));
            Storyboard.SetTarget(scaleXAnimation, controlToAnimate);
            Storyboard.SetTargetProperty(scaleXAnimation, new PropertyPath("(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)"));
            story.Children.Add(scaleXAnimation);

            //stretch vertically
            DoubleAnimationUsingKeyFrames scaleYAnimation = new DoubleAnimationUsingKeyFrames();
            scaleYAnimation.BeginTime = TimeSpan.FromMilliseconds(0);
            scaleYAnimation.KeyFrames.Add(CreateFrame(factor, 100));
            Storyboard.SetTarget(scaleYAnimation, controlToAnimate);
            Storyboard.SetTargetProperty(scaleYAnimation, new PropertyPath("(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)"));
            story.Children.Add(scaleYAnimation);

            if (!(controlToAnimate.RenderTransform is TransformGroup))
            {
                TransformGroup group = new TransformGroup();
                ScaleTransform transform = new ScaleTransform();
                transform.ScaleX = 1;
                transform.ScaleY = 1;
                group.Children.Add(transform);
                controlToAnimate.RenderTransformOrigin = new Point(0.5, 0.5);
                controlToAnimate.RenderTransform = group;
            }
            story.Begin();
        }
Example #4
0
        public Popup(String heading, String body, String imageSource, Int32 numPopups)
        {
            InitializeComponent();

            this.Left = SystemParameters.WorkArea.Width - this.Width;
            this.Top = SystemParameters.WorkArea.Height - (this.Height * (numPopups + 1));

            tweetText.Text = body;
            userName.Text = heading;

            ImageSourceConverter conv = new ImageSourceConverter();
            avatarImage.Source = (ImageSource)conv.ConvertFromString(imageSource);

            this.Topmost = true;

            sbFadeOut = (Storyboard)FindResource("sbFadeOut");
            sbFadeOut.Completed += new EventHandler(sbFadeOut_Completed);

            DoubleAnimationUsingKeyFrames animation = new DoubleAnimationUsingKeyFrames();
            Storyboard.SetTargetName(animation, "MainGrid");
            Storyboard.SetTargetProperty(animation, new PropertyPath(UIElement.OpacityProperty));

            animation.KeyFrames.Add(new SplineDoubleKeyFrame(1, KeyTime.FromTimeSpan(TimeSpan.FromSeconds(0))));
            animation.KeyFrames.Add(new SplineDoubleKeyFrame(1, KeyTime.FromTimeSpan(TimeSpan.FromSeconds(Double.Parse(Properties.Settings.Default.NotificationDisplayTime)))));
            animation.KeyFrames.Add(new SplineDoubleKeyFrame(0, KeyTime.FromTimeSpan(TimeSpan.FromSeconds(Double.Parse(Properties.Settings.Default.NotificationDisplayTime) + 1))));

            sbFadeOut.Children.Add(animation);

            ShowPopup = (Storyboard)FindResource("ShowPopup");
            ShowPopup.Completed += new EventHandler(ShowPopup_Completed);
            ShowPopup.Begin(this, true);
        }
        public void ClosingWindow()
        {
            //キーフレームで時間を区切る
            var frame0 = new EasingDoubleKeyFrame(this.Width,  KeyTime.FromTimeSpan(new TimeSpan(1)));
            var frame1 = new EasingDoubleKeyFrame(0,           KeyTime.FromTimeSpan(new TimeSpan(2500000)));
            var frame2 = new EasingDoubleKeyFrame(this.Height, KeyTime.FromTimeSpan(new TimeSpan(2500001)));
            var frame3 = new EasingDoubleKeyFrame(0,           KeyTime.FromTimeSpan(new TimeSpan(5000000)));
            //キーフレームをアニメーションとしてまとめる
            var animationWidth = new DoubleAnimationUsingKeyFrames();
            animationWidth.KeyFrames.Add(frame0);
            animationWidth.KeyFrames.Add(frame1);
            //アニメーションをアニメーションさせたいオブジェクトクラスのプロパティにひもづける
            //...ということはオブジェクト毎にアニメーションさせるのはだめ?
            Storyboard.SetTargetName(animationWidth, this.Name);
            Storyboard.SetTargetProperty(animationWidth, new PropertyPath(MainWindow.WidthProperty));

            var animationHeight = new DoubleAnimationUsingKeyFrames();
            animationHeight.KeyFrames.Add(frame2);
            animationHeight.KeyFrames.Add(frame3);
            Storyboard.SetTargetName(animationHeight, this.Name);
            Storyboard.SetTargetProperty(animationHeight, new PropertyPath(MainWindow.HeightProperty));

            //静的にひもづけられたストーリーボードへアニメーションを登録する
            myStoryboard = new Storyboard();
            myStoryboard.Completed += new EventHandler(endAnimation);
            myStoryboard.Children.Add(animationWidth);
            myStoryboard.Children.Add(animationHeight);
            //アニメーションを実行する
            myStoryboard.Begin(this);

            myStoryboard.Stop();
        }
        public Storyboard GetAnimation(DependencyObject target, double to, double from)
        {
            Storyboard story = new Storyboard();
            Storyboard.SetTargetProperty(story, new PropertyPath("(TextBlock.RenderTransform).(TranslateTransform.X)"));
            Storyboard.SetTarget(story, target);

            var doubleAnimation = new DoubleAnimationUsingKeyFrames();

            var fromFrame = new EasingDoubleKeyFrame(from)
            {
                EasingFunction = new ExponentialEase() {EasingMode = EasingMode.EaseIn},
                KeyTime = KeyTime.FromTimeSpan(TimeSpan.FromMilliseconds(0))
            };

            var toFrame = new EasingDoubleKeyFrame(to)
            {
                EasingFunction = new QuadraticEase() {EasingMode = EasingMode.EaseOut},
                KeyTime = KeyTime.FromTimeSpan(TimeSpan.FromMilliseconds(600))
            };

            doubleAnimation.KeyFrames.Add(fromFrame);
            doubleAnimation.KeyFrames.Add(toFrame);
            story.Children.Add(doubleAnimation);

            return story;
        }
Example #7
0
        private void AnimateBorder()
        {
            if (_animationRunning) return;

            _animationRunning = true;
            var offset = VisualTreeHelper.GetOffset(_menuBorder);
            var top = offset.Y;

            var menuOffset = VisualTreeHelper.GetOffset(_menus[_currentMenu]);
            var topOffSet = menuOffset.Y;

            var animation = new DoubleAnimationUsingKeyFrames {Duration = new Duration(TimeSpan.FromSeconds(0.5))};
            var easingFunction = new QuarticEase {EasingMode = EasingMode.EaseInOut};
            var startAnimation = new EasingDoubleKeyFrame(_startPoint, KeyTime.FromPercent(0));
            var endAnimation = new EasingDoubleKeyFrame(topOffSet - top, KeyTime.FromPercent(1.0), easingFunction);
            animation.KeyFrames.Add(startAnimation);
            animation.KeyFrames.Add(endAnimation);

            animation.Completed += delegate
            {
                _animationRunning = false;
            };

            var trans = new TranslateTransform();
            _menuBorder.RenderTransform = trans;
            trans.BeginAnimation(TranslateTransform.YProperty, animation);

            _startPoint = topOffSet - top;
        }
Example #8
0
        private void Down()
        {
            Storyboard sb2 = new Storyboard();

            if((SystemParameters.WorkArea.Height -Top - Height) <= 0)
            {
                DoubleAnimationUsingKeyFrames da1 = new DoubleAnimationUsingKeyFrames();
                var top = SystemParameters.WorkArea.Height - this.Height;
                da1.KeyFrames.Add(new LinearDoubleKeyFrame(top, TimeSpan.FromSeconds(0)));
                da1.KeyFrames.Add(new LinearDoubleKeyFrame(top + 260, TimeSpan.FromSeconds(1)));
                Storyboard.SetTarget(da1, metroWindow);
                Storyboard.SetTargetProperty(da1, new PropertyPath("Top"));
                sb2.Children.Add(da1);
            }

            DoubleAnimationUsingKeyFrames da2 = new DoubleAnimationUsingKeyFrames();
            da2.KeyFrames.Add(new LinearDoubleKeyFrame(406, TimeSpan.FromSeconds(0)));
            da2.KeyFrames.Add(new LinearDoubleKeyFrame(146, TimeSpan.FromSeconds(1)));
            Storyboard.SetTarget(da2, metroWindow);
            Storyboard.SetTargetProperty(da2, new PropertyPath("Height"));
            sb2.Children.Add(da2);

            DoubleAnimationUsingKeyFrames da3 = new DoubleAnimationUsingKeyFrames();
            da3.KeyFrames.Add(new LinearDoubleKeyFrame(260, TimeSpan.FromSeconds(0)));
            da3.KeyFrames.Add(new LinearDoubleKeyFrame(0, TimeSpan.FromSeconds(1)));
            Storyboard.SetTarget(da3, grid);
            Storyboard.SetTargetProperty(da3, new PropertyPath("Height"));
            sb2.Children.Add(da3);

            sb2.Begin(this);

            _isOpen = false;
        }
Example #9
0
 private void btnSaveConfig_Click(object sender, RoutedEventArgs e)
 {
     BmclCore.Config.Autostart = checkAutoStart.IsChecked != null && (bool)checkAutoStart.IsChecked;
     BmclCore.Config.ExtraJvmArg = txtExtJArg.Text;
     BmclCore.Config.Javaw = txtJavaPath.Text;
     BmclCore.Config.Javaxmx = txtJavaXmx.Text;
     BmclCore.Config.Login = listAuth.SelectedItem.ToString();
     BmclCore.Config.LastPlayVer = BmclCore.MainWindow.GridGame.GetSelectedVersion();
     BmclCore.Config.Passwd = Encoding.UTF8.GetBytes(txtPwd.Password);
     BmclCore.Config.Username = txtUserName.Text;
     BmclCore.Config.WindowTransparency = sliderWindowTransparency.Value;
     BmclCore.Config.Report = checkReport.IsChecked != null && checkReport.IsChecked.Value;
     BmclCore.Config.CheckUpdate = checkCheckUpdate.IsChecked != null && checkCheckUpdate.IsChecked.Value;
     BmclCore.Config.DownloadSource = listDownSource.SelectedIndex;
     BmclCore.Config.Lang = LangManager.GetLangFromResource("LangName");
     BmclCore.Config.Height = int.Parse(ScreenHeightTextBox.Text);
     BmclCore.Config.Width = int.Parse(ScreenWidthTextBox.Text);
     BmclCore.Config.FullScreen = FullScreenCheckBox.IsChecked??false;
     BmclCore.Config.Save(null);
     var dak = new DoubleAnimationUsingKeyFrames();
     dak.KeyFrames.Add(new LinearDoubleKeyFrame(0, TimeSpan.FromSeconds(0)));
     dak.KeyFrames.Add(new LinearDoubleKeyFrame(30, TimeSpan.FromSeconds(0.3)));
     dak.KeyFrames.Add(new LinearDoubleKeyFrame(30, TimeSpan.FromSeconds(2.3)));
     dak.KeyFrames.Add(new LinearDoubleKeyFrame(0, TimeSpan.FromSeconds(2.6)));
     popupSaveSuccess.BeginAnimation(FrameworkElement.HeightProperty, dak);
 }
        public Task StopAsync()
        {
            TaskCompletionSource<object> tcs = new TaskCompletionSource<object>();

            if (_Running != true)
            {
                tcs.SetResult(null);
                return tcs.Task;
            }

            Storyboard SB = new Storyboard();

            _Running = false;

            double cangle = RotateTransform.Angle;

            int Nb = (int)Math.Round((360 - cangle) / 45) + 1;

            DoubleAnimationUsingKeyFrames dauk = new DoubleAnimationUsingKeyFrames();
            for (int i = 0; i < 17; i++)
            {
                DiscreteDoubleKeyFrame first = new DiscreteDoubleKeyFrame(cangle + 45 * i, KeyTime.FromTimeSpan(TimeSpan.FromSeconds(i * Frequency)));
                dauk.KeyFrames.Add(first);
            }
            Storyboard.SetTarget(dauk, VB);
            Storyboard.SetTargetProperty(dauk, new PropertyPath("(RenderTransform).(RotateTransform.Angle)"));
            SB.Children.Add(dauk);

            for (int i = 0; i < 8; i++)
            {
                ObjectAnimationUsingKeyFrames oauk = new ObjectAnimationUsingKeyFrames();

                oauk.RepeatBehavior = new RepeatBehavior(1);

                DiscreteObjectKeyFrame first = new DiscreteObjectKeyFrame(Visibility.Visible, KeyTime.FromTimeSpan(TimeSpan.FromSeconds(Frequency * Nb)));
                oauk.KeyFrames.Add(first);
                DiscreteObjectKeyFrame first_1 = new DiscreteObjectKeyFrame(Visibility.Collapsed, KeyTime.FromTimeSpan(TimeSpan.FromSeconds((i + Nb) * Frequency)));
                oauk.KeyFrames.Add(first_1);
                DiscreteObjectKeyFrame second = new DiscreteObjectKeyFrame(Visibility.Collapsed, KeyTime.FromTimeSpan(TimeSpan.FromSeconds((i + Nb) * Frequency)));
                oauk.KeyFrames.Add(second);

                Storyboard.SetTarget(oauk, this.FindName(string.Format("E{0}", i)) as DependencyObject);
                Storyboard.SetTargetProperty(oauk, new PropertyPath("Visibility"));

                SB.Children.Add(oauk);
            }

            _SB.Stop();
           
            EventHandler handler = null;
            handler = delegate
            {
                SB.Completed -= handler;
                tcs.SetResult(null);
            };
            SB.Completed += handler;
            SB.Begin();

            return tcs.Task;
        }
Example #11
0
        public void DoubleAnimationKeyFrameTest()
        {
            DoubleAnimationUsingKeyFrames animation;

            animation = new DoubleAnimationUsingKeyFrames();
            animation.KeyFrames.Add(new DiscreteDoubleKeyFrame { KeyTime = KeyTime.FromTimeSpan(TimeSpan.FromSeconds(0.2)), Value = 2 });
            animation.KeyFrames.Add(new DiscreteDoubleKeyFrame { KeyTime = KeyTime.FromTimeSpan(TimeSpan.FromSeconds(0.2)), Value = 4 });
            animation.KeyFrames.Add(new DiscreteDoubleKeyFrame { KeyTime = KeyTime.FromTimeSpan(TimeSpan.FromSeconds(0.8)), Value = 6 });

            DoubleAnimationBasicTest(animation, 10, 20, 10, 4, 6);

            animation = new DoubleAnimationUsingKeyFrames();
            animation.KeyFrames.Add(new DiscreteDoubleKeyFrame { KeyTime = KeyTime.FromPercent(0.2), Value = 4 });
            animation.KeyFrames.Add(new DiscreteDoubleKeyFrame { KeyTime = KeyTime.FromPercent(0.8), Value = 6 });

            DoubleAnimationBasicTest(animation, 10, 20, 10, 4, 6);

            animation = new DoubleAnimationUsingKeyFrames();
            animation.KeyFrames.Add(new LinearDoubleKeyFrame { KeyTime = KeyTime.FromTimeSpan(TimeSpan.FromSeconds(0.2)), Value = 4 });
            animation.KeyFrames.Add(new LinearDoubleKeyFrame { KeyTime = KeyTime.FromTimeSpan(TimeSpan.FromSeconds(0.8)), Value = 6 });

            DoubleAnimationBasicTest(animation, 10, 20, 10, 5, 6);

            animation = new DoubleAnimationUsingKeyFrames();
            animation.KeyFrames.Add(new LinearDoubleKeyFrame { KeyTime = KeyTime.FromPercent(0.2), Value = 2 });
            animation.KeyFrames.Add(new LinearDoubleKeyFrame { KeyTime = KeyTime.FromPercent(0.2), Value = 4 });
            animation.KeyFrames.Add(new LinearDoubleKeyFrame { KeyTime = KeyTime.FromPercent(0.8), Value = 6 });

            DoubleAnimationBasicTest(animation, 10, 20, 10, 5, 6);
        }
Example #12
0
 /// <summary>
 /// 空间扭曲波动
 /// </summary>
 public void Wave(Point center)
 {
     DoubleAnimationUsingKeyFrames d0 = new DoubleAnimationUsingKeyFrames();
     SplineDoubleKeyFrame s0 = new SplineDoubleKeyFrame() { KeyTime = TimeSpan.Zero, Value = 70 };
     EasingDoubleKeyFrame e0 = new EasingDoubleKeyFrame() { EasingFunction = new SineEase() { EasingMode = EasingMode.EaseOut }, KeyTime = TimeSpan.FromMilliseconds(300), Value = 0 };
     d0.KeyFrames.Add(s0);
     d0.KeyFrames.Add(e0);
     Storyboard.SetTarget(d0, this);
     Storyboard.SetTargetProperty(d0, new PropertyPath("(UIElement.Effect).(RippleEffect.Frequency)"));
     DoubleAnimationUsingKeyFrames d1 = new DoubleAnimationUsingKeyFrames();
     SplineDoubleKeyFrame s1 = new SplineDoubleKeyFrame() { KeyTime = TimeSpan.Zero, Value = 0 };
     EasingDoubleKeyFrame e1 = new EasingDoubleKeyFrame() { KeyTime = TimeSpan.FromMilliseconds(150), Value = 0.01 };
     EasingDoubleKeyFrame e11 = new EasingDoubleKeyFrame() { EasingFunction = new SineEase() { EasingMode = EasingMode.EaseOut }, KeyTime = TimeSpan.FromMilliseconds(300), Value = 0 };
     d1.KeyFrames.Add(s1);
     d1.KeyFrames.Add(e1);
     d1.KeyFrames.Add(e11);
     Storyboard.SetTarget(d1, this);
     Storyboard.SetTargetProperty(d1, new PropertyPath("(UIElement.Effect).(RippleEffect.Amplitude)"));
     if (waveStoryboard != null) { Wave_Completed(waveStoryboard, null); }
     center.X = (center.X + offset.X) / mapRoot.BodyWidth;
     center.Y = (center.Y + offset.Y) / mapRoot.BodyHeight;
     this.Effect = new WaveRipple() { Phase = 0, Amplitude = 0, Frequency = 0, Center = center };
     waveStoryboard = new Storyboard();
     waveStoryboard.Children.Add(d0);
     waveStoryboard.Children.Add(d1);
     waveStoryboard.Completed += new EventHandler(Wave_Completed);
     waveStoryboard.Begin();
 }
        void StartAnimation(DependencyProperty property, TimeSpan beginTime, bool isLast = false)
        {
            DoubleAnimationUsingKeyFrames d = new DoubleAnimationUsingKeyFrames();

            d.KeyFrames.Add(new LinearDoubleKeyFrame(.25d, KeyTime.FromPercent(.10d)));
            d.KeyFrames.Add(new LinearDoubleKeyFrame(.3d, KeyTime.FromPercent(.15d)));
            d.KeyFrames.Add(new LinearDoubleKeyFrame(.7d, KeyTime.FromPercent(.85d)));
            d.KeyFrames.Add(new LinearDoubleKeyFrame(.75d, KeyTime.FromPercent(.90d)));
            d.KeyFrames.Add(new LinearDoubleKeyFrame(1d, KeyTime.FromPercent(1d)));

            d.Duration = TimeSpan.FromSeconds(3);
            d.BeginTime = beginTime;
            d.FillBehavior = FillBehavior.Stop;

            if (isLast)
            {
                if (this.observedAnimation != null)
                {
                    this.observedAnimation.StopObserving();
                }

                this.observedAnimation = new AnimationObserver(this, d);
            }

            this.BeginAnimation(property, null);
            this.BeginAnimation(property, d);
        }
        protected override Storyboard CreateStoryboard(FrameworkElement element)
        {
            var storyboard = new Storyboard();

            var WidthAnimation = new DoubleAnimationUsingKeyFrames();
            var HeightAnimation = new DoubleAnimationUsingKeyFrames();

            Storyboard.SetTargetProperty(WidthAnimation, new PropertyPath("(FrameworkElement.Width)"));
            Storyboard.SetTargetProperty(HeightAnimation, new PropertyPath("(FrameworkElement.Height)"));

            storyboard.Children.Add(WidthAnimation);
            storyboard.Children.Add(HeightAnimation);

            WidthAnimation.KeyFrames.Add(new SplineDoubleKeyFrame()
            {
                KeySpline = new KeySpline()
                {
                    ControlPoint1 = new Point(0.528, 0),
                    ControlPoint2 = new Point(0.142, 0.847)
                }
            });

            HeightAnimation.KeyFrames.Add(new SplineDoubleKeyFrame()
            {
                KeySpline = new KeySpline()
                {
                    ControlPoint1 = new Point(0.528, 0),
                    ControlPoint2 = new Point(0.142, 0.847)
                }
            });

            return storyboard;
        }
Example #15
0
        /// <summary>
        /// Fade in opacity of the window, let the progress ring appear and collapse the NoMouvieFound label when loading movies
        /// </summary>
        /// <param name="sender">Sender object</param>
        /// <param name="e">EventArgs</param>
        private void OnMoviesLoading(object sender, EventArgs e)
        {
            // We have to deal with the DispatcherHelper, otherwise we're having the classic cross-thread access exception
            DispatcherHelper.CheckBeginInvokeOnUI(() =>
            {
                ProgressRing.IsActive = true;

                #region Fade in opacity
                DoubleAnimationUsingKeyFrames opacityAnimation = new DoubleAnimationUsingKeyFrames();
                opacityAnimation.Duration = new Duration(TimeSpan.FromSeconds(0.5));
                PowerEase opacityEasingFunction = new PowerEase();
                opacityEasingFunction.EasingMode = EasingMode.EaseInOut;
                EasingDoubleKeyFrame startOpacityEasing = new EasingDoubleKeyFrame(1, KeyTime.FromPercent(0));
                EasingDoubleKeyFrame endOpacityEasing = new EasingDoubleKeyFrame(0.2, KeyTime.FromPercent(1.0),
                    opacityEasingFunction);
                opacityAnimation.KeyFrames.Add(startOpacityEasing);
                opacityAnimation.KeyFrames.Add(endOpacityEasing);
                ItemsList.BeginAnimation(OpacityProperty, opacityAnimation);
                #endregion

                if (NoMouvieFound.Visibility == Visibility.Visible)
                {
                    NoMouvieFound.Visibility = Visibility.Collapsed;
                }
            });
        }
Example #16
0
        public void DoubleAnimationKeyFrameRepeatTest()
        {
            DoubleAnimationUsingKeyFrames animation;

            animation = new DoubleAnimationUsingKeyFrames();
            animation.KeyFrames.Add(new LinearDoubleKeyFrame { KeyTime = KeyTime.FromTimeSpan(TimeSpan.FromSeconds(0)), Value = 0 });
            animation.KeyFrames.Add(new LinearDoubleKeyFrame { KeyTime = KeyTime.FromTimeSpan(TimeSpan.FromSeconds(1)), Value = 1 });
            animation.Duration = new Duration(TimeSpan.FromSeconds(2));
            animation.RepeatBehavior = RepeatBehavior.Forever;

            TestRootClock rootClock = new TestRootClock();
            AnimationTimelineClock clock = (AnimationTimelineClock)animation.CreateClock();
            clock.Begin(rootClock);

            rootClock.Tick(TimeSpan.FromSeconds(0.1));
            Assert.AreEqual(0.1, (double)animation.GetCurrentValue(0.0, 0.0, clock));

            rootClock.Tick(TimeSpan.FromSeconds(0.9));
            Assert.AreEqual(0.9, (double)animation.GetCurrentValue(0.0, 0.0, clock));

            rootClock.Tick(TimeSpan.FromSeconds(1));
            Assert.AreEqual(1, (double)animation.GetCurrentValue(0.0, 0.0, clock));

            rootClock.Tick(TimeSpan.FromSeconds(1.9));
            Assert.AreEqual(1, (double)animation.GetCurrentValue(0.0, 0.0, clock));

            rootClock.Tick(TimeSpan.FromSeconds(2.1));
            Assert.AreEqual(0.1, (double)animation.GetCurrentValue(0.0, 0.0, clock));

            rootClock.Tick(TimeSpan.FromSeconds(2.9));
            Assert.AreEqual(0.9, (double)animation.GetCurrentValue(0.0, 0.0, clock));
        }
Example #17
0
        private void btn2_1_Click(object sender, RoutedEventArgs e)
        {
            RotateTransform animatedTranslateTransform = new RotateTransform();
              btn2_1.RenderTransform = animatedTranslateTransform;
              RegisterName("animateButton2", animatedTranslateTransform);

              DoubleAnimationUsingKeyFrames translationAnimation = new DoubleAnimationUsingKeyFrames();
              translationAnimation.KeyFrames.Add(new EasingDoubleKeyFrame(0, KeyTime.FromTimeSpan(TimeSpan.FromSeconds(0))));

              EasingDoubleKeyFrame doubleKeyFrame2 = new EasingDoubleKeyFrame(360, KeyTime.FromTimeSpan(TimeSpan.FromSeconds(10)));

              ElasticEase ease = new ElasticEase();
              ease.Oscillations = 3;
              ease.Springiness = 8;
              ease.EasingMode = EasingMode.EaseOut;

              doubleKeyFrame2.EasingFunction = ease;
              translationAnimation.KeyFrames.Add(doubleKeyFrame2);

              Storyboard.SetTargetName(translationAnimation, "animateButton2");
              Storyboard.SetTargetProperty(translationAnimation, new PropertyPath(RotateTransform.AngleProperty));

              Storyboard strbStoryboard = new Storyboard();
              strbStoryboard.Children.Add(translationAnimation);

              strbStoryboard.Begin(this);
              UnregisterName("animateButton2");
        }
Example #18
0
 public void expand(Image control, String direction)
 {
     DoubleAnimationUsingKeyFrames dax = new DoubleAnimationUsingKeyFrames();
     DoubleAnimationUsingKeyFrames day = new DoubleAnimationUsingKeyFrames();
     TransformGroup tg = new TransformGroup();
     switch (direction)
     {
         case ("Left"):
             dax.KeyFrames.Add(new LinearDoubleKeyFrame(-80, KeyTime.FromTimeSpan(TimeSpan.FromSeconds(2))));
             day.KeyFrames.Add(new LinearDoubleKeyFrame(0, KeyTime.FromTimeSpan(TimeSpan.FromSeconds(2))));
             control.RenderTransform = leftTrans;
             leftTrans.BeginAnimation(TranslateTransform.XProperty, dax);
             break;
         case ("Top"):
             dax.KeyFrames.Add(new LinearDoubleKeyFrame(0, KeyTime.FromTimeSpan(TimeSpan.FromSeconds(2))));
             day.KeyFrames.Add(new LinearDoubleKeyFrame(-80, KeyTime.FromTimeSpan(TimeSpan.FromSeconds(2))));
             control.RenderTransform = topTrans;
             topTrans.BeginAnimation(TranslateTransform.YProperty, day);
             break;
         case ("Right"):
             dax.KeyFrames.Add(new LinearDoubleKeyFrame(80, KeyTime.FromTimeSpan(TimeSpan.FromSeconds(2))));
             day.KeyFrames.Add(new LinearDoubleKeyFrame(0, KeyTime.FromTimeSpan(TimeSpan.FromSeconds(2))));
             control.RenderTransform = rightTrans;
             rightTrans.BeginAnimation(TranslateTransform.XProperty, dax);
             break;
         case ("Bottom"):
             dax.KeyFrames.Add(new LinearDoubleKeyFrame(0, KeyTime.FromTimeSpan(TimeSpan.FromSeconds(2))));
             day.KeyFrames.Add(new LinearDoubleKeyFrame(80, KeyTime.FromTimeSpan(TimeSpan.FromSeconds(2))));
             control.RenderTransform = bottomTrans;
             bottomTrans.BeginAnimation(TranslateTransform.YProperty, day);
             break;
     }
         //tg.Children.Add(ttx);
         //tg.Children.Add(tty);
 }
        public PopupMsg(TextBlock msg)
        {
            //Store TextBlock for message display
            this.msg = msg;
            //Register the textblock's name, this is necessary for creating Storyboard using codes instead of XAML
            NameScope.SetNameScope(msg, new NameScope());
            msg.RegisterName("fadetext", msg);

            //Create the fade in & fade out animation
            DoubleAnimationUsingKeyFrames fadeInOutAni = new DoubleAnimationUsingKeyFrames();
            LinearDoubleKeyFrame keyframe = new LinearDoubleKeyFrame();
            keyframe.KeyTime = KeyTime.FromTimeSpan(TimeSpan.FromSeconds(2));
            keyframe.Value = 1;
            fadeInOutAni.KeyFrames.Add(keyframe);
            //keyframe = new LinearDoubleKeyFrame();

            fadeInOutAni.Duration = new Duration(TimeSpan.FromSeconds(4));        
            fadeInOutAni.AutoReverse = true;
            fadeInOutAni.AccelerationRatio = .2;
            fadeInOutAni.DecelerationRatio = .7;

            // Configure the animation to target the message's opacity property
            Storyboard.SetTargetName(fadeInOutAni, "fadetext");
            Storyboard.SetTargetProperty(fadeInOutAni, new PropertyPath(TextBlock.OpacityProperty));

            // Add the fade in & fade out animation to the Storyboard
            Storyboard fadeInOutStoryBoard = new Storyboard();
            fadeInOutStoryBoard.Children.Add(fadeInOutAni);

            // Set event trigger, make this animation played on an event we can control
            msg.IsVisibleChanged += delegate(object sender,  System.Windows.DependencyPropertyChangedEventArgs e)
            {
                if (msg.IsVisible) fadeInOutStoryBoard.Begin(msg);
            };
        }
Example #20
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.begin1 = ((System.Windows.Media.Animation.BeginStoryboard)(target));
                return;

            case 2:
                this.Animation = ((System.Windows.Media.Animation.DoubleAnimationUsingKeyFrames)(target));
                return;

            case 3:
                this.GridMain = ((System.Windows.Controls.Grid)(target));
                return;

            case 4:
                this.Pause1 = ((System.Windows.Controls.Button)(target));
                return;

            case 5:
                this.Resume1 = ((System.Windows.Controls.Button)(target));
                return;
            }
            this._contentLoaded = true;
        }
        public override void OnApplyTemplate()
        {
            base.OnApplyTemplate();

            for (int i = 0; i < 5; i++)
            {
                var r = GetTemplateChild(string.Format(CultureInfo.InvariantCulture, "R{0}", i)) as FrameworkElement;

                if (r == null) throw new ArgumentNullException(string.Format(CultureInfo.InvariantCulture, "R{0}", i));

                r.RenderTransform = new TranslateTransform();

                // Horizontal (x) animation
                var a = new DoubleAnimationUsingKeyFrames { BeginTime = TimeSpan.FromSeconds(i*0.2) };
                a.KeyFrames.Add(kf1);
                a.KeyFrames.Add(kf2);
                a.KeyFrames.Add(kf3);
                a.KeyFrames.Add(kf4);

                iStoryboard.Children.Add(a);
                Storyboard.SetTarget(a, r);
                Storyboard.SetTargetProperty(a, new PropertyPath("(UIElement.RenderTransform).(TranslateTransform.X)"));

                // Opacity animation for moving in and out of view
                var b = new DoubleAnimationUsingKeyFrames { BeginTime = TimeSpan.FromSeconds(i*0.2) };
                b.KeyFrames.Add(new DiscreteDoubleKeyFrame(1, KeyTime.FromTimeSpan(TimeSpan.FromSeconds(0))));
                b.KeyFrames.Add(new DiscreteDoubleKeyFrame(0, KeyTime.FromTimeSpan(TimeSpan.FromSeconds(2.5))));

                iStoryboard.Children.Add(b);
                Storyboard.SetTarget(b, r);
                Storyboard.SetTargetProperty(b, new PropertyPath(OpacityProperty));
            }

            StartIndeterminateAnimation();
        }
Example #22
0
 public static void SetScrollEffect(DependencyObject obj, int value)
 {
     var elem = obj as FrameworkElement;
     var transGroup = new TransformGroup();
     transGroup.Children.Add(new ScaleTransform());
     transGroup.Children.Add(new SkewTransform());
     transGroup.Children.Add(new RotateTransform());
     transGroup.Children.Add(new TranslateTransform());
     elem.RenderTransform = transGroup;
     var sb = new Storyboard();
     var da = new DoubleAnimationUsingKeyFrames();
     Storyboard.SetTarget(da, obj);
     Storyboard.SetTargetProperty(da, new PropertyPath("(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)", new object[0]));
     da.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = KeyTime.FromTimeSpan(TimeSpan.Zero), Value = 60 });
     da.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = KeyTime.FromTimeSpan(TimeSpan.FromMilliseconds(value)), Value = 60 });
     da.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = KeyTime.FromTimeSpan(TimeSpan.FromMilliseconds(value + 900)), Value = 0, EasingFunction = new CircleEase { EasingMode = EasingMode.EaseOut } });
     sb.Children.Add(da);
     var da2 = new DoubleAnimationUsingKeyFrames();
     Storyboard.SetTarget(da2, obj);
     Storyboard.SetTargetProperty(da2, new PropertyPath(UIElement.OpacityProperty));
     da2.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = KeyTime.FromTimeSpan(TimeSpan.Zero), Value = 0 });
     da2.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = KeyTime.FromTimeSpan(TimeSpan.FromMilliseconds(value)), Value = 0 });
     da2.KeyFrames.Add(new EasingDoubleKeyFrame { KeyTime = KeyTime.FromTimeSpan(TimeSpan.FromMilliseconds(value + 400)), Value = 1 });
     sb.Children.Add(da2);
     elem.Loaded += (a, b) =>
     {
         sb.Begin();
     };
     obj.SetValue(ScrollEffectProperty, value);
 }
Example #23
0
        private void SetupAnimationForGear(Canvas gearBox, double ratio, SweepDirection direction)
        {
            var duration = TimeSpan.FromMilliseconds(30000*ratio);

            var animationRotation = new DoubleAnimationUsingKeyFrames
                                        {
                                            Duration = new Duration(duration),
                                            RepeatBehavior = RepeatBehavior.Forever
                                        };

            animationRotation.KeyFrames.Add(new LinearDoubleKeyFrame(0, KeyTime.FromPercent(0)));
            animationRotation.KeyFrames.Add(new LinearDoubleKeyFrame(
                                                direction == SweepDirection.Clockwise ? 360 : -360,
                                                KeyTime.FromPercent(1)));

            var rotateTransform = new RotateTransform();
            gearBox.RenderTransform = rotateTransform;
            gearBox.RenderTransformOrigin = new Point(0.5, 0.5);

            Storyboard.SetTarget(animationRotation, rotateTransform);
            Storyboard.SetTargetProperty(animationRotation, new PropertyPath(RotateTransform.AngleProperty));

            animationRotation.Freeze();

            _storyBoard.Children.Add(animationRotation);
        }
        protected override Storyboard CreateStoryboard(FrameworkElement element)
        {
            var storyboard = new Storyboard();

            var LeftAnimation = new DoubleAnimationUsingKeyFrames();
            var TopAnimation = new DoubleAnimationUsingKeyFrames();

            Storyboard.SetTargetProperty(LeftAnimation, new PropertyPath("(Canvas.Left)"));
            Storyboard.SetTargetProperty(TopAnimation, new PropertyPath("(Canvas.Top)"));

            storyboard.Children.Add(LeftAnimation);
            storyboard.Children.Add(TopAnimation);

            LeftAnimation.KeyFrames.Add(new SplineDoubleKeyFrame()
            {
                KeySpline = new KeySpline()
                {
                    ControlPoint1 = new Point(0.528, 0),
                    ControlPoint2 = new Point(0.142, 0.847)
                }
            });

            TopAnimation.KeyFrames.Add(new SplineDoubleKeyFrame()
            {
                KeySpline = new KeySpline()
                {
                    ControlPoint1 = new Point(0.528, 0),
                    ControlPoint2 = new Point(0.142, 0.847)
                }
            });

            return storyboard;
        }
Example #25
0
        public Spinner()
        {
            var duration = TimeSpan.FromSeconds(1.3);

            m_Animation = new DoubleAnimationUsingKeyFrames()
            {
                RepeatBehavior = RepeatBehavior.Forever,
                Duration = duration
            };

            for (int i = 0; i < c_Blobs; i++)
            {
                m_Animation.KeyFrames.Add(new DiscreteDoubleKeyFrame(i * 360.0 / c_Blobs, KeyTime.Paced));
            }

            var rotateTransform = new RotateTransform();
            RenderTransform = rotateTransform;

            for (int i = 0; i < c_Blobs; i++)
            {
                var r = (byte)(0xFF - (((0xFF - 0x17) / c_Blobs) * i));
                var g = (byte)(0xFF - (((0xFF - 0x7F) / c_Blobs) * i));
                var b = (byte)(0xFF - (((0xFF - 0x2E) / c_Blobs) * i));

                m_Brushes[i] = new SolidColorBrush(Color.FromRgb(r, g, b));
                m_Brushes[i].Freeze();
            }
        }
Example #26
0
        private void StartAnimationHour(DateTime now)
        {
            Storyboard stH = new Storyboard();
            stH.RepeatBehavior = RepeatBehavior.Forever;

            DoubleAnimationUsingKeyFrames daHour = new DoubleAnimationUsingKeyFrames();
            daHour.Duration = new Duration(TimeSpan.FromHours(12));

            LinearDoubleKeyFrame keyHour = new LinearDoubleKeyFrame();
            //keyHour.Value = 360;
            daHour.KeyFrames.Add(keyHour);

            double hour = now.Hour;
            if (hour >= 12)
            {
                hour = hour - 12;
            }
            double angleHour = 360 * ((hour + (double)now.Minute / 60 + (double)now.Second / 3600) / 12);
            keyHour.Value = angleHour + 360;

            RotateTransform rtHour = ((TransformGroup)pathHour.RenderTransform).Children[2] as RotateTransform;
            rtHour.Angle = angleHour;
            this.RegisterName("RtHour", rtHour);
            Storyboard.SetTargetName(daHour, "RtHour");
            Storyboard.SetTargetProperty(daHour, new PropertyPath(RotateTransform.AngleProperty));
            stH.Children.Add(daHour);
            stH.Begin(this);
        }
Example #27
0
 public ButtonAnimate()
 {
     growImageX = new DoubleAnimationUsingKeyFrames();
     growImageY = new DoubleAnimationUsingKeyFrames();
     killImageX = new DoubleAnimationUsingKeyFrames();
     killImageY = new DoubleAnimationUsingKeyFrames();
     RectXForm.Changed += new EventHandler(RectXForm_Changed);
 }
Example #28
0
 public MainWindow()
 {
     InitializeComponent();
     _fade = new DoubleAnimationUsingKeyFrames { Duration = new Duration(TimeSpan.FromSeconds(3)) };
     _fade.KeyFrames.Add(new LinearDoubleKeyFrame(1, KeyTime.FromPercent(0)));
     _fade.KeyFrames.Add(new LinearDoubleKeyFrame(1, KeyTime.FromPercent(0.75)));
     _fade.KeyFrames.Add(new LinearDoubleKeyFrame(0, KeyTime.FromPercent(1)));
 }
		public CaretLayer(TextView textView) : base(textView, KnownLayer.Caret)
		{
			this.IsHitTestVisible = false;
			
			blinkAnimation = new DoubleAnimationUsingKeyFrames();
			blinkAnimation.KeyFrames.Add(new DiscreteDoubleKeyFrame(1, KeyTime.FromPercent(0)));
			blinkAnimation.KeyFrames.Add(new DiscreteDoubleKeyFrame(0, KeyTime.FromPercent(0.5)));
			blinkAnimation.RepeatBehavior = RepeatBehavior.Forever;
		}
 private void Back()
 {
     MeCore.MainWindow.gridOthers.Children.Clear();
     MeCore.MainWindow.gridOthers.Children.Add(parent);
     var ani = new DoubleAnimationUsingKeyFrames();
     ani.KeyFrames.Add(new LinearDoubleKeyFrame(0, TimeSpan.FromSeconds(0)));
     ani.KeyFrames.Add(new LinearDoubleKeyFrame(1, TimeSpan.FromSeconds(0.2)));
     MeCore.MainWindow.gridOthers.BeginAnimation(OpacityProperty, ani);
 }
Example #31
0
 private void Back()
 {
     MeCore.MainWindow.gridMain.Visibility = Visibility.Visible;
     MeCore.MainWindow.gridOthers.Visibility = Visibility.Collapsed;
     var ani = new DoubleAnimationUsingKeyFrames();
     ani.KeyFrames.Add(new LinearDoubleKeyFrame(0, TimeSpan.FromSeconds(0)));
     ani.KeyFrames.Add(new LinearDoubleKeyFrame(1, TimeSpan.FromSeconds(0.2)));
     MeCore.MainWindow.gridMain.BeginAnimation(OpacityProperty, ani);
 }
 public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/GetMoving;component/SimpleAnimation.xaml", System.UriKind.Relative));
     this.FadeOut          = ((System.Windows.Media.Animation.Storyboard)(this.FindName("FadeOut")));
     this.FadeOutTarget    = ((System.Windows.Media.Animation.DoubleAnimationUsingKeyFrames)(this.FindName("FadeOutTarget")));
     this.FadeIn           = ((System.Windows.Media.Animation.Storyboard)(this.FindName("FadeIn")));
     this.FadeInTarget     = ((System.Windows.Media.Animation.DoubleAnimationUsingKeyFrames)(this.FindName("FadeInTarget")));
     this.PageFlip         = ((System.Windows.Media.Animation.Storyboard)(this.FindName("PageFlip")));
     this.LayoutRoot       = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.TitlePanel       = ((System.Windows.Controls.StackPanel)(this.FindName("TitlePanel")));
     this.ApplicationTitle = ((System.Windows.Controls.TextBlock)(this.FindName("ApplicationTitle")));
     this.PageTitle        = ((System.Windows.Controls.TextBlock)(this.FindName("PageTitle")));
     this.ContentPanel     = ((System.Windows.Controls.Grid)(this.FindName("ContentPanel")));
 }
 public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/Zires%20Explorer;component/Player/VideoPlayer.xaml", System.UriKind.Relative));
     this.Open_Controls  = ((System.Windows.Media.Animation.Storyboard)(this.FindName("Open_Controls")));
     this.Close_Controls = ((System.Windows.Media.Animation.Storyboard)(this.FindName("Close_Controls")));
     this.objectAnimationUsingKeyFrames   = ((System.Windows.Media.Animation.ObjectAnimationUsingKeyFrames)(this.FindName("objectAnimationUsingKeyFrames")));
     this.doubleAnimationUsingKeyFrames_1 = ((System.Windows.Media.Animation.DoubleAnimationUsingKeyFrames)(this.FindName("doubleAnimationUsingKeyFrames_1")));
     this.doubleAnimationUsingKeyFrames_2 = ((System.Windows.Media.Animation.DoubleAnimationUsingKeyFrames)(this.FindName("doubleAnimationUsingKeyFrames_2")));
     this.Open_Zoompage                 = ((System.Windows.Media.Animation.Storyboard)(this.FindName("Open_Zoompage")));
     this.Close_Zoompage                = ((System.Windows.Media.Animation.Storyboard)(this.FindName("Close_Zoompage")));
     this.Open_detailsPage              = ((System.Windows.Media.Animation.Storyboard)(this.FindName("Open_detailsPage")));
     this.Close_detailsPage             = ((System.Windows.Media.Animation.Storyboard)(this.FindName("Close_detailsPage")));
     this.LayoutRoot                    = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.background                    = ((System.Windows.Controls.Grid)(this.FindName("background")));
     this.ContentPanel                  = ((System.Windows.Controls.ScrollViewer)(this.FindName("ContentPanel")));
     this.player                        = ((System.Windows.Controls.MediaElement)(this.FindName("player")));
     this.controls                      = ((System.Windows.Controls.Grid)(this.FindName("controls")));
     this.AudioControls                 = ((System.Windows.Controls.Grid)(this.FindName("AudioControls")));
     this.controlsButtomPlaneProjection = ((System.Windows.Media.PlaneProjection)(this.FindName("controlsButtomPlaneProjection")));
     this.durationHours                 = ((System.Windows.Controls.TextBlock)(this.FindName("durationHours")));
     this.durationMinutes               = ((System.Windows.Controls.TextBlock)(this.FindName("durationMinutes")));
     this.durationSeconds               = ((System.Windows.Controls.TextBlock)(this.FindName("durationSeconds")));
     this.Dimensions                    = ((System.Windows.Controls.TextBlock)(this.FindName("Dimensions")));
     this.lenght                        = ((System.Windows.Controls.TextBlock)(this.FindName("lenght")));
     this.slider                        = ((System.Windows.Controls.Slider)(this.FindName("slider")));
     this.play     = ((System.Windows.Controls.Button)(this.FindName("play")));
     this.pause    = ((System.Windows.Controls.Button)(this.FindName("pause")));
     this.pau      = ((System.Windows.Media.PlaneProjection)(this.FindName("pau")));
     this.stop     = ((System.Windows.Controls.Button)(this.FindName("stop")));
     this.sto      = ((System.Windows.Media.PlaneProjection)(this.FindName("sto")));
     this.next     = ((System.Windows.Controls.Button)(this.FindName("next")));
     this.nex      = ((System.Windows.Media.PlaneProjection)(this.FindName("nex")));
     this.previous = ((System.Windows.Controls.Button)(this.FindName("previous")));
     this.pre      = ((System.Windows.Media.PlaneProjection)(this.FindName("pre")));
     this.inFo     = ((System.Windows.Controls.Button)(this.FindName("inFo")));
     this.pre1     = ((System.Windows.Media.PlaneProjection)(this.FindName("pre1")));
     this.zoom     = ((System.Windows.Controls.Button)(this.FindName("zoom")));
     this.sto1     = ((System.Windows.Media.PlaneProjection)(this.FindName("sto1")));
     this.Stretch  = ((System.Windows.Controls.Primitives.ToggleButton)(this.FindName("Stretch")));
     this.Stre     = ((System.Windows.Media.PlaneProjection)(this.FindName("Stre")));
     this.controlsTopPlaneProjection = ((System.Windows.Media.PlaneProjection)(this.FindName("controlsTopPlaneProjection")));
     this.name                   = ((System.Windows.Controls.TextBlock)(this.FindName("name")));
     this.time                   = ((System.Windows.Controls.TextBlock)(this.FindName("time")));
     this.zoomPage               = ((System.Windows.Controls.Border)(this.FindName("zoomPage")));
     this.ZoomPlaneProjection    = ((System.Windows.Media.PlaneProjection)(this.FindName("ZoomPlaneProjection")));
     this.ZoomPageBack           = ((System.Windows.Controls.Button)(this.FindName("ZoomPageBack")));
     this.PlaneProjection1       = ((System.Windows.Media.PlaneProjection)(this.FindName("PlaneProjection1")));
     this.PlaneProjection2       = ((System.Windows.Media.PlaneProjection)(this.FindName("PlaneProjection2")));
     this.PlaneProjection3       = ((System.Windows.Media.PlaneProjection)(this.FindName("PlaneProjection3")));
     this.PlaneProjection4       = ((System.Windows.Media.PlaneProjection)(this.FindName("PlaneProjection4")));
     this.PlaneProjection5       = ((System.Windows.Media.PlaneProjection)(this.FindName("PlaneProjection5")));
     this.detailsPage            = ((System.Windows.Controls.Grid)(this.FindName("detailsPage")));
     this.PlaneProjectionDetails = ((System.Windows.Media.PlaneProjection)(this.FindName("PlaneProjectionDetails")));
     this.detailsPageBack        = ((System.Windows.Controls.Button)(this.FindName("detailsPageBack")));
     this.detailsName            = ((System.Windows.Controls.TextBlock)(this.FindName("detailsName")));
     this.detailsFrameWidth      = ((System.Windows.Controls.TextBlock)(this.FindName("detailsFrameWidth")));
     this.detailsFrameHeight     = ((System.Windows.Controls.TextBlock)(this.FindName("detailsFrameHeight")));
     this.detailsLength          = ((System.Windows.Controls.TextBlock)(this.FindName("detailsLength")));
     this.detailsFolderPath      = ((System.Windows.Controls.TextBlock)(this.FindName("detailsFolderPath")));
     this.detailsSize            = ((System.Windows.Controls.TextBlock)(this.FindName("detailsSize")));
     this.detailsDateCreated     = ((System.Windows.Controls.TextBlock)(this.FindName("detailsDateCreated")));
     this.detailsLastAccessTime  = ((System.Windows.Controls.TextBlock)(this.FindName("detailsLastAccessTime")));
 }
Example #34
0
 public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/User.XBoxCtrlViewer;component/XBoxCtrlGraphic.xaml", System.UriKind.Relative));
     this.LeftShoulderDown       = ((System.Windows.Media.Animation.Storyboard)(this.FindName("LeftShoulderDown")));
     this.LeftShoulderUp         = ((System.Windows.Media.Animation.Storyboard)(this.FindName("LeftShoulderUp")));
     this.PadDownDown            = ((System.Windows.Media.Animation.Storyboard)(this.FindName("PadDownDown")));
     this.PadDownUp              = ((System.Windows.Media.Animation.Storyboard)(this.FindName("PadDownUp")));
     this.PadRightUp             = ((System.Windows.Media.Animation.Storyboard)(this.FindName("PadRightUp")));
     this.PadRightDown           = ((System.Windows.Media.Animation.Storyboard)(this.FindName("PadRightDown")));
     this.PadUpUp                = ((System.Windows.Media.Animation.Storyboard)(this.FindName("PadUpUp")));
     this.PadUpDown              = ((System.Windows.Media.Animation.Storyboard)(this.FindName("PadUpDown")));
     this.PadLeftUp              = ((System.Windows.Media.Animation.Storyboard)(this.FindName("PadLeftUp")));
     this.PadLeftDown            = ((System.Windows.Media.Animation.Storyboard)(this.FindName("PadLeftDown")));
     this.RightShoulderDown      = ((System.Windows.Media.Animation.Storyboard)(this.FindName("RightShoulderDown")));
     this.RightShoulderUp        = ((System.Windows.Media.Animation.Storyboard)(this.FindName("RightShoulderUp")));
     this.A_letter_down          = ((System.Windows.Media.Animation.Storyboard)(this.FindName("A_letter_down")));
     this.A_letter_up            = ((System.Windows.Media.Animation.Storyboard)(this.FindName("A_letter_up")));
     this.B_letter_down          = ((System.Windows.Media.Animation.Storyboard)(this.FindName("B_letter_down")));
     this.B_letter_up            = ((System.Windows.Media.Animation.Storyboard)(this.FindName("B_letter_up")));
     this.X_letter_down          = ((System.Windows.Media.Animation.Storyboard)(this.FindName("X_letter_down")));
     this.X_letter_up            = ((System.Windows.Media.Animation.Storyboard)(this.FindName("X_letter_up")));
     this.Y_letter_down          = ((System.Windows.Media.Animation.Storyboard)(this.FindName("Y_letter_down")));
     this.Y_letter_up            = ((System.Windows.Media.Animation.Storyboard)(this.FindName("Y_letter_up")));
     this.StartButtonDown        = ((System.Windows.Media.Animation.Storyboard)(this.FindName("StartButtonDown")));
     this.StartButtonUp          = ((System.Windows.Media.Animation.Storyboard)(this.FindName("StartButtonUp")));
     this.BackButtonDown         = ((System.Windows.Media.Animation.Storyboard)(this.FindName("BackButtonDown")));
     this.BackButtonUp           = ((System.Windows.Media.Animation.Storyboard)(this.FindName("BackButtonUp")));
     this.RightStickDown         = ((System.Windows.Media.Animation.Storyboard)(this.FindName("RightStickDown")));
     this.RightStickUp           = ((System.Windows.Media.Animation.Storyboard)(this.FindName("RightStickUp")));
     this.LeftStickDown          = ((System.Windows.Media.Animation.Storyboard)(this.FindName("LeftStickDown")));
     this.LeftStickUp            = ((System.Windows.Media.Animation.Storyboard)(this.FindName("LeftStickUp")));
     this.RightStickMove         = ((System.Windows.Media.Animation.Storyboard)(this.FindName("RightStickMove")));
     this.RightStickLeftPosition = ((System.Windows.Media.Animation.DoubleAnimationUsingKeyFrames)(this.FindName("RightStickLeftPosition")));
     this.RightStickTopPosition  = ((System.Windows.Media.Animation.DoubleAnimationUsingKeyFrames)(this.FindName("RightStickTopPosition")));
     this.LeftStickMove          = ((System.Windows.Media.Animation.Storyboard)(this.FindName("LeftStickMove")));
     this.LeftStickLeftPosition  = ((System.Windows.Media.Animation.DoubleAnimationUsingKeyFrames)(this.FindName("LeftStickLeftPosition")));
     this.LeftStickTopPosition   = ((System.Windows.Media.Animation.DoubleAnimationUsingKeyFrames)(this.FindName("LeftStickTopPosition")));
     this.LayoutRoot             = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.Controller             = ((System.Windows.Controls.Canvas)(this.FindName("Controller")));
     this.Body                 = ((System.Windows.Shapes.Path)(this.FindName("Body")));
     this.Top                  = ((System.Windows.Shapes.Path)(this.FindName("Top")));
     this.Very_Top             = ((System.Windows.Shapes.Path)(this.FindName("Very_Top")));
     this.Bottom               = ((System.Windows.Shapes.Path)(this.FindName("Bottom")));
     this.X_edge               = ((System.Windows.Shapes.Path)(this.FindName("X_edge")));
     this.X_top                = ((System.Windows.Shapes.Path)(this.FindName("X_top")));
     this.X_right              = ((System.Windows.Shapes.Path)(this.FindName("X_right")));
     this.X_bottom             = ((System.Windows.Shapes.Path)(this.FindName("X_bottom")));
     this.X_left               = ((System.Windows.Shapes.Path)(this.FindName("X_left")));
     this.X                    = ((System.Windows.Shapes.Path)(this.FindName("X")));
     this.X_edge_line          = ((System.Windows.Shapes.Path)(this.FindName("X_edge_line")));
     this.X_one                = ((System.Windows.Shapes.Path)(this.FindName("X_one")));
     this.X_two                = ((System.Windows.Shapes.Path)(this.FindName("X_two")));
     this.X_three              = ((System.Windows.Shapes.Path)(this.FindName("X_three")));
     this.X_four               = ((System.Windows.Shapes.Path)(this.FindName("X_four")));
     this.Left_Handle          = ((System.Windows.Controls.Canvas)(this.FindName("Left_Handle")));
     this.Bottom_Linear        = ((System.Windows.Shapes.Path)(this.FindName("Bottom_Linear")));
     this.Top_Circular         = ((System.Windows.Shapes.Path)(this.FindName("Top_Circular")));
     this.Inner_Filler         = ((System.Windows.Shapes.Ellipse)(this.FindName("Inner_Filler")));
     this.LeftStickHat         = ((System.Windows.Controls.Canvas)(this.FindName("LeftStickHat")));
     this.Outer_Edge           = ((System.Windows.Shapes.Path)(this.FindName("Outer_Edge")));
     this.Inner_Edge           = ((System.Windows.Shapes.Path)(this.FindName("Inner_Edge")));
     this.Inner_Edge_Highlight = ((System.Windows.Shapes.Path)(this.FindName("Inner_Edge_Highlight")));
     this.Buttons              = ((System.Windows.Controls.Canvas)(this.FindName("Buttons")));
     this.A_light_accent       = ((System.Windows.Shapes.Path)(this.FindName("A_light_accent")));
     this.A_dark_accent        = ((System.Windows.Shapes.Path)(this.FindName("A_dark_accent")));
     this.A_center             = ((System.Windows.Shapes.Path)(this.FindName("A_center")));
     this.A_letter             = ((System.Windows.Shapes.Path)(this.FindName("A_letter")));
     this.A_letter_glow        = ((System.Windows.Controls.Image)(this.FindName("A_letter_glow")));
     this.X_light_accent       = ((System.Windows.Shapes.Path)(this.FindName("X_light_accent")));
     this.X_center             = ((System.Windows.Shapes.Path)(this.FindName("X_center")));
     this.X_dark_accent        = ((System.Windows.Shapes.Path)(this.FindName("X_dark_accent")));
     this.X_letter             = ((System.Windows.Shapes.Path)(this.FindName("X_letter")));
     this.X_letter_glow        = ((System.Windows.Controls.Image)(this.FindName("X_letter_glow")));
     this.Back_Button          = ((System.Windows.Shapes.Path)(this.FindName("Back_Button")));
     this.Back_Button_Arrow    = ((System.Windows.Shapes.Path)(this.FindName("Back_Button_Arrow")));
     this.Right_Top_Button     = ((System.Windows.Shapes.Path)(this.FindName("Right_Top_Button")));
     this.Left_Top_Button      = ((System.Windows.Shapes.Path)(this.FindName("Left_Top_Button")));
     this.Start_Button         = ((System.Windows.Shapes.Path)(this.FindName("Start_Button")));
     this.Start_Button_Arrow   = ((System.Windows.Shapes.Path)(this.FindName("Start_Button_Arrow")));
     this.Y_dark_accent        = ((System.Windows.Shapes.Path)(this.FindName("Y_dark_accent")));
     this.Y_light_accent       = ((System.Windows.Shapes.Path)(this.FindName("Y_light_accent")));
     this.Y_center             = ((System.Windows.Shapes.Path)(this.FindName("Y_center")));
     this.Y_letter             = ((System.Windows.Shapes.Path)(this.FindName("Y_letter")));
     this.Y_letter_glow        = ((System.Windows.Controls.Image)(this.FindName("Y_letter_glow")));
     this.B_dark_accent        = ((System.Windows.Shapes.Path)(this.FindName("B_dark_accent")));
     this.B_light_accent       = ((System.Windows.Shapes.Path)(this.FindName("B_light_accent")));
     this.B_center             = ((System.Windows.Shapes.Path)(this.FindName("B_center")));
     this.B_letter             = ((System.Windows.Shapes.Path)(this.FindName("B_letter")));
     this.B_letter_glow        = ((System.Windows.Controls.Image)(this.FindName("B_letter_glow")));
     this.RightHandle          = ((System.Windows.Controls.Canvas)(this.FindName("RightHandle")));
     this.Base                 = ((System.Windows.Shapes.Path)(this.FindName("Base")));
     this.Base_3               = ((System.Windows.Shapes.Path)(this.FindName("Base_3")));
     this.RightStickHat        = ((System.Windows.Controls.Canvas)(this.FindName("RightStickHat")));
     this.Edge                 = ((System.Windows.Shapes.Path)(this.FindName("Edge")));
     this.Center               = ((System.Windows.Shapes.Path)(this.FindName("Center")));
     this.Center_highlight     = ((System.Windows.Shapes.Path)(this.FindName("Center_highlight")));
     this.DirectionPad         = ((System.Windows.Controls.Canvas)(this.FindName("DirectionPad")));
     this.Outer_Rim            = ((System.Windows.Shapes.Path)(this.FindName("Outer_Rim")));
     this.Inner_Rim            = ((System.Windows.Shapes.Path)(this.FindName("Inner_Rim")));
     this.Inner_Inner_Rim      = ((System.Windows.Shapes.Path)(this.FindName("Inner_Inner_Rim")));
     this.Top_Left             = ((System.Windows.Shapes.Path)(this.FindName("Top_Left")));
     this.Top_Right            = ((System.Windows.Shapes.Path)(this.FindName("Top_Right")));
     this.Bottom_Left          = ((System.Windows.Shapes.Path)(this.FindName("Bottom_Left")));
     this.Center_4             = ((System.Windows.Shapes.Path)(this.FindName("Center_4")));
     this.Bottom_Right         = ((System.Windows.Shapes.Path)(this.FindName("Bottom_Right")));
     this.Pad_Down             = ((System.Windows.Shapes.Path)(this.FindName("Pad_Down")));
     this.Pad_Right            = ((System.Windows.Shapes.Path)(this.FindName("Pad_Right")));
     this.Pad_Top              = ((System.Windows.Shapes.Path)(this.FindName("Pad_Top")));
     this.Pad_Left             = ((System.Windows.Shapes.Path)(this.FindName("Pad_Left")));
 }