示例#1
0
        void InitializeControls()
        {
            var menuWindow = new MenuWindow(this);

            menuWindow.Show();

            var startEffectOverlay = new Overlay(this)
            {
                Opacity = 1
            };

            startEffectOverlay.Show();

            var startEffectOverlay_opacityAnimation = new FloatLerpAnimation
            {
                Action   = (current) => { startEffectOverlay.Opacity = current; },
                From     = 1,
                To       = 0,
                Duration = TimeSpan.FromSeconds(0.5d),
                Enabled  = true
            };

            startEffectOverlay_opacityAnimation.Completed += (s, e) =>
            {
                startEffectOverlay.Close();
                menuWindow.Activate();
            };
            startEffectOverlay.Animations.Add(startEffectOverlay_opacityAnimation);
        }
示例#2
0
        void InitializeControls()
        {
            var menuWindow = new MenuWindow(this);
            menuWindow.Show();

            var startEffectOverlay = new Overlay(this)
            {
                Opacity = 1
            };
            startEffectOverlay.Show();

            var startEffectOverlay_opacityAnimation = new FloatLerpAnimation
            {
                Action = (current) => { startEffectOverlay.Opacity = current; },
                From = 1,
                To = 0,
                Duration = TimeSpan.FromSeconds(0.5d),
                Enabled = true
            };
            startEffectOverlay_opacityAnimation.Completed += (s, e) =>
            {
                startEffectOverlay.Close();
                menuWindow.Activate();
            };
            startEffectOverlay.Animations.Add(startEffectOverlay_opacityAnimation);
        }