protected virtual void RunOpeningEffects()
        {
            if (!IsLoaded)
            {
                return;
            }

            var storyboard    = new Storyboard();
            var openingEffect = OpeningEffect?.Build(this);

            if (openingEffect != null)
            {
                storyboard.Children.Add(openingEffect);
            }
            foreach (var effect in OpeningEffects.Select(e => e.Build(this)).Where(tl => tl != null))
            {
                storyboard.Children.Add(effect);
            }

            storyboard.Begin(this);
        }
Exemplo n.º 2
0
        protected virtual void RunOpeningEffects()
        {
            if (!IsLoaded || _matrixTransform == null)
            {
                _isOpeningEffectPending = true;
                return;
            }
            _isOpeningEffectPending = false;

            var storyboard    = new Storyboard();
            var openingEffect = OpeningEffect?.Build(this);

            if (openingEffect != null)
            {
                storyboard.Children.Add(openingEffect);
            }
            foreach (var effect in OpeningEffects.Select(e => e.Build(this)).Where(tl => tl != null))
            {
                storyboard.Children.Add(effect);
            }

            storyboard.Begin(this);
        }