示例#1
2
 /// <summary/>
 protected internal override TimeSpan DefineTimeline(ParallelTimeline parentTimeline, TimeSpan parentOffset) {
    var duration = TimeSpan.Zero;
    if (_hasCenterDifference) {
       var timeline = new VectorInterpolation(Interpolator, FromCenter, ToCenter, IsRelative, IsCumulative);
       parentTimeline.Children.Add(timeline);
       duration = DefineTimelineCore(timeline, parentOffset);
    }
    var fromX = _getValue(From, FromScaleX);
    var toX = _getValue(To, ToScaleX);
    if (fromX.CertainlyDifferent(toX)) {
       var timeline = new DoubleInterpolation(Interpolator, fromX, toX, IsRelative, IsCumulative);
       parentTimeline.Children.Add(timeline);
       duration = DefineTimelineCore(timeline, parentOffset);
    }
    var fromY = _getValue(From, FromScaleY);
    var toY = _getValue(To, ToScaleY);
    if (fromY.CertainlyDifferent(toY)) {
       var timeline = new DoubleInterpolation(Interpolator, fromY, toY, IsRelative, IsCumulative);
       parentTimeline.Children.Add(timeline);
       duration = DefineTimelineCore(timeline, parentOffset);
    }
    return duration;
 }
示例#2
1
 /// <summary/>
 protected internal override TimeSpan DefineTimeline(ParallelTimeline parentTimeline, TimeSpan parentOffset) {
    var duration = TimeSpan.Zero;
    var fromW = _getWidth(From, FromWidth);
    var toW = _getWidth(To, ToWidth);
    if (fromW.CertainlyDifferent(toW)) {
       var timeline = new DoubleInterpolation(Interpolator, fromW, toW, IsRelative, IsCumulative);
       parentTimeline.Children.Add(timeline);
       duration = DefineTimelineCore(timeline, parentOffset);
    }
    var fromH = _getHeight(From, FromHeight);
    var toH = _getHeight(To, ToHeight);
    if (fromH.CertainlyDifferent(toH)) {
       var timeline = new DoubleInterpolation(Interpolator, fromH, toH, IsRelative, IsCumulative);
       parentTimeline.Children.Add(timeline);
       duration = DefineTimelineCore(timeline, parentOffset);
    }
    return duration;
 }
示例#3
1
 /// <summary/>
 protected internal override TimeSpan DefineTimeline(ParallelTimeline parentTimeline, TimeSpan parentOffset) {
    var duration = TimeSpan.Zero;
    if (_hasValueDifference) {
       Timeline timeline = null;
       if (Property.PropertyType.IsA(typeof(double))) {
          timeline = new DoubleInterpolation(Interpolator, From, To, IsRelative, IsCumulative);
       } else if (Property.PropertyType.IsA(typeof(int))) {
          timeline = new Int32Interpolation(Interpolator, (int?)From, (int?)To, IsRelative, IsCumulative);
       }
       parentTimeline.Children.Add(timeline);
       duration = DefineTimelineCore(timeline, parentOffset);
    }
    return duration;
 }
示例#4
1
 /// <summary/>
 protected internal override TimeSpan DefineTimeline(ParallelTimeline parentTimeline, TimeSpan parentOffset) {
    var duration = TimeSpan.Zero;
    if (_hasCenterDifference) {
       var timeline = new VectorInterpolation(Interpolator, FromCenter, ToCenter, IsRelative, IsCumulative);
       parentTimeline.Children.Add(timeline);
       duration = DefineTimelineCore(timeline, parentOffset);
    }
    if (_hasSkewXDifference) {
       var timeline = new DoubleInterpolation(Interpolator, FromSkewX, ToSkewX, IsRelative, IsCumulative);
       parentTimeline.Children.Add(timeline);
       duration = DefineTimelineCore(timeline, parentOffset);
    }
    if (_hasSkewYDifference) {
       var timeline = new DoubleInterpolation(Interpolator, FromSkewY, ToSkewY, IsRelative, IsCumulative);
       parentTimeline.Children.Add(timeline);
       duration = DefineTimelineCore(timeline, parentOffset);
    }
    return duration;
 }