Exemple #1
0
    public override void NotifyAnimatedValueChanged(CompositionProperty offset)
    {
        base.NotifyAnimatedValueChanged(offset);
        if (offset == s_IdOfClipToBoundsProperty ||
            offset == s_IdOfOpacityProperty ||
            offset == s_IdOfSizeProperty)
        {
            IsDirtyComposition = true;
        }

        if (offset == s_IdOfSizeProperty ||
            offset == s_IdOfAnchorPointProperty ||
            offset == s_IdOfCenterPointProperty ||
            offset == s_IdOfAdornedVisualProperty ||
            offset == s_IdOfTransformMatrixProperty ||
            offset == s_IdOfScaleProperty ||
            offset == s_IdOfRotationAngleProperty ||
            offset == s_IdOfOrientationProperty ||
            offset == s_IdOfOffsetProperty)
        {
            _combinedTransformDirty = true;
        }

        if (offset == s_IdOfClipToBoundsProperty ||
            offset == s_IdOfSizeProperty)
        {
            _clipSizeDirty = true;
        }
    }
        public override void Initialize(TimeSpan startedAt, ExpressionVariant startingValue, CompositionProperty property)
        {
            _startingValue = startingValue;
            var hs = new HashSet <(string, string)>();

            _expression.CollectReferences(hs);
            base.Initialize(property, hs);
        }
Exemple #3
0
        public override void Initialize(TimeSpan startedAt, ExpressionVariant startingValue, CompositionProperty property)
        {
            _startedAt     = startedAt;
            _startingValue = startingValue.CastOrDefault <T>();
            var hs = new HashSet <(string, string)>();

            // TODO: Update subscriptions based on the current keyframe rather than keeping subscriptions to all of them
            foreach (var frame in _keyFrames)
            {
                frame.Expression?.CollectReferences(hs);
            }
            Initialize(property, hs);
        }